I need write MPC8306 interrupt function by c language in Uboot. But I cann't find a handbook to describe it.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

I need write MPC8306 interrupt function by c language in Uboot. But I cann't find a handbook to describe it.

1,184 次查看
leimao
Contributor II

My processor is Mpc8306. And my code must run in Uboot., not in linux. But I can not find any handbook to describe wirte interrupt function. I download gcc manual. The manual does not say about gramma about ppc interrupt. For example, gcc book describe the ARM interrupt:  "void f () __attribute__ ((interrupt ("IRQ")));" , it is a interrupt handle function to tell gcc compile.  Also, I don't know how to write assemble like start.s in uboot,  The start's file has something like "GOT_ENTRY(_FIXUP_TABLE_)",  I don't know what it mean.

Please help me?

.

0 项奖励
回复
2 回复数

989 次查看
yipingwang
NXP TechSupport
NXP TechSupport

In u-boot, code or variable addresses cannot be decided when compiling, GOT is used to solve this problem.

STARG_GOT is used to define the start of the table, END_GOT is used to define the end of the table,

GOT_ENTRY is used to write the offset into the table and "GOT" is used for reading the offset from the table.

Please refer to cpu/mpc83xx/u-boot.lds for _FIXUP_TABLE_ defination.

0 项奖励
回复

989 次查看
yipingwang
NXP TechSupport
NXP TechSupport

Please refer to the section "Vector Table" in cpu/mpc83xx/start.S and the file cpu/mpc83xx/interrupts.c and cpu/mpc83xx/traps.c.

0 项奖励
回复