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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

605 Views
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 Kudos
2 Replies

410 Views
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 Kudos

410 Views
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 Kudos