diff options
author | Evan Lojewski <github@meklort.com> | 2021-02-06 11:56:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-06 11:56:07 -0700 |
commit | bbd2bb18c7ba73d3ff180532435de241d2afc21e (patch) | |
tree | 29548083c6f60bba80d0ce8e5cb1c8a86c3d96c5 | |
parent | d41199eb44665c4c0665feeeffa29a6756018af6 (diff) | |
download | bcm5719-ortega-bbd2bb18c7ba73d3ff180532435de241d2afc21e.tar.gz bcm5719-ortega-bbd2bb18c7ba73d3ff180532435de241d2afc21e.zip |
vectors: Move vector names to a header. (#204)
-rw-r--r-- | ape/include/ape_main.h | 15 | ||||
-rw-r--r-- | ape/vectors.c | 88 |
2 files changed, 60 insertions, 43 deletions
diff --git a/ape/include/ape_main.h b/ape/include/ape_main.h index 7fe3ee6..8eae90d 100644 --- a/ape/include/ape_main.h +++ b/ape/include/ape_main.h @@ -74,4 +74,19 @@ typedef struct */ extern vector_table_t gVectors; +void __attribute__((interrupt)) IRQ_NMI(void); +void __attribute__((interrupt)) IRQ_HardFault(void); +void __attribute__((interrupt)) IRQ_MemoryManagmentFault(void); +void __attribute__((interrupt)) IRQ_BusFault(void); +void __attribute__((interrupt)) IRQ_UsageFault(void); +void __attribute__((interrupt)) IRQ_SVCall(void); +void __attribute__((interrupt)) IRQ_Debug(void); +void __attribute__((interrupt)) IRQ_PendSV(void); +void __attribute__((interrupt)) IRQ_Systick(void); + +void __attribute__((interrupt)) IRQ_RxPacketEven(void); +void __attribute__((interrupt)) IRQ_RxPacketOdd(void); +void __attribute__((interrupt)) IRQ_RMU(void); +void __attribute__((interrupt)) IRQ_VoltageSource(void); + #endif /* APE_MAIN_H */ diff --git a/ape/vectors.c b/ape/vectors.c index ddcaa42..895b439 100644 --- a/ape/vectors.c +++ b/ape/vectors.c @@ -55,20 +55,22 @@ void __attribute__((interrupt)) IRQ_Default(void) printf("ISR: %d\n", vector); } -void __attribute__((interrupt)) IRQ_NMI(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_HardFault(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_MemoryManagmentFault(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_BusFault(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_UsageFault(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_SVCall(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_Debug(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_PendSV(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_Systick(void) __attribute__((weak, alias("IRQ_Default"))); +// Alias all IRQ routines ot the default handler. +void __attribute__((interrupt)) IRQ_NMI(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_HardFault(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_MemoryManagmentFault(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_BusFault(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_UsageFault(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_SVCall(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_Debug(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_PendSV(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_Systick(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 -void __attribute__((interrupt)) IRQ_RxPacketEven(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_RxPacketOdd(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_RMU(void) __attribute__((weak, alias("IRQ_Default"))); -void __attribute__((interrupt)) IRQ_VoltageSource(void) __attribute__((weak, alias("IRQ_Default"))); +void __attribute__((interrupt)) IRQ_RxPacketEven(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_RxPacketOdd(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_RMU(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_VoltageSource(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 +void __attribute__((interrupt)) IRQ_PowerStatusChanged(void) __attribute__((weak, alias("IRQ_Default"))); //lint !e762 //lint -esym(714, gVectors) // Referenced by linker script vector_table_t gVectors __attribute__((section(".init"))) = { @@ -93,35 +95,35 @@ vector_table_t gVectors __attribute__((section(".init"))) = { [0xF] = IRQ_Default, /* Reserved */ /* External Interrupts */ - [0x10] = IRQ_Default, /* Handle Event */ - [0x11] = IRQ_Default, /* -- */ - [0x12] = IRQ_Default, /* -- */ - [0x13] = IRQ_Default, /* -- */ - [0x14] = IRQ_Default, /* -- */ - [0x15] = IRQ_Default, /* -- */ - [0x16] = IRQ_Default, /* Host to BMC */ - [0x17] = IRQ_Default, /* -- */ - [0x18] = IRQ_Default, /* TX Error */ - [0x19] = IRQ_RxPacketEven, /* RX Packet - Even ports */ - [0x1A] = IRQ_Default, /* -- */ - [0x1B] = IRQ_Default, /* -- */ - [0x1C] = IRQ_Default, /* SMBUS 0 */ - [0x1D] = IRQ_Default, /* -- */ - [0x1E] = IRQ_Default, /* SMBUS 1 */ - [0x1F] = IRQ_RMU, /* RMU Egress */ - [0x20] = IRQ_Default, /* -- */ - [0x21] = IRQ_Default, /* -- */ - [0x22] = IRQ_Default, /* Gen Status Changed */ - [0x23] = IRQ_Default, /* seems to be always pending, but always masked. no handler (i.e., uses exception handler) */ - [0x24] = IRQ_Default, /* -- */ - [0x25] = IRQ_Default, /* -- */ - [0x26] = IRQ_VoltageSource, /* Voltage Source Changed */ - [0x27] = IRQ_Default, /* Link Status Changed (Even Ports) */ - [0x28] = IRQ_Default, /* Link Status Changed (Odd Ports) */ - [0x29] = IRQ_RxPacketOdd, /* RX Packet (Odd ports) */ - [0x2A] = IRQ_Default, /* -- */ - [0x2B] = IRQ_Default, /* -- */ - [0x2C] = IRQ_Default, /* -- */ - [0x2D] = IRQ_Default, /* -- */ + [0x10] = IRQ_Default, /* Handle Event */ + [0x11] = IRQ_Default, /* -- */ + [0x12] = IRQ_Default, /* -- */ + [0x13] = IRQ_Default, /* -- */ + [0x14] = IRQ_Default, /* -- */ + [0x15] = IRQ_Default, /* -- */ + [0x16] = IRQ_Default, /* Host to BMC */ + [0x17] = IRQ_Default, /* -- */ + [0x18] = IRQ_Default, /* TX Error */ + [0x19] = IRQ_RxPacketEven, /* RX Packet - Even ports */ + [0x1A] = IRQ_Default, /* -- */ + [0x1B] = IRQ_Default, /* -- */ + [0x1C] = IRQ_Default, /* SMBUS 0 */ + [0x1D] = IRQ_Default, /* -- */ + [0x1E] = IRQ_Default, /* SMBUS 1 */ + [0x1F] = IRQ_RMU, /* RMU Egress */ + [0x20] = IRQ_Default, /* -- */ + [0x21] = IRQ_Default, /* -- */ + [0x22] = IRQ_PowerStatusChanged, /* Gen Status Changed */ + [0x23] = IRQ_Default, /* seems to be always pending, but always masked. no handler (i.e., uses exception handler) */ + [0x24] = IRQ_Default, /* -- */ + [0x25] = IRQ_Default, /* -- */ + [0x26] = IRQ_VoltageSource, /* Voltage Source Changed */ + [0x27] = IRQ_Default, /* Link Status Changed (Even Ports) */ + [0x28] = IRQ_Default, /* Link Status Changed (Odd Ports) */ + [0x29] = IRQ_RxPacketOdd, /* RX Packet (Odd ports) */ + [0x2A] = IRQ_Default, /* -- */ + [0x2B] = IRQ_Default, /* -- */ + [0x2C] = IRQ_Default, /* -- */ + [0x2D] = IRQ_Default, /* -- */ }, }; |