summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-02-04 19:13:27 -0700
committerGitHub <noreply@github.com>2021-02-04 19:13:27 -0700
commit01b7af197ca3fbc64c12185820b7e6954f6727c3 (patch)
treef3a3b020078815c23e764553db22c772619de7d4
parent0265533188143e88cfef536f896e973d717af437 (diff)
downloadbcm5719-ortega-01b7af197ca3fbc64c12185820b7e6954f6727c3.tar.gz
bcm5719-ortega-01b7af197ca3fbc64c12185820b7e6954f6727c3.zip
ape: Prepare for RX/RMU/Vaux/VMain interrupt handlers. (#195)
-rw-r--r--ape/vectors.c117
1 files changed, 61 insertions, 56 deletions
diff --git a/ape/vectors.c b/ape/vectors.c
index 46a912f..ddcaa42 100644
--- a/ape/vectors.c
+++ b/ape/vectors.c
@@ -49,74 +49,79 @@
extern uint32_t _estack; // Defined by linker
extern vector_t __start; // Defined by crt1.s
-void __attribute__((interrupt)) Vector_Default(void)
+void __attribute__((interrupt)) IRQ_Default(void)
{
uint32_t vector = NVIC.InterruptControlState.bits.VECTACTIVE;
printf("ISR: %d\n", vector);
}
-void __attribute__((interrupt)) Vector_NMI(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_HardFault(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_MemoryManagmentFault(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_BusFault(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_UsageFault(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_SVCall(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_Debug(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_PendSV(void) __attribute__((weak, alias("Vector_Default")));
-void __attribute__((interrupt)) Vector_Systick(void) __attribute__((weak, alias("Vector_Default")));
+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")));
+
+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")));
//lint -esym(714, gVectors) // Referenced by linker script
vector_table_t gVectors __attribute__((section(".init"))) = {
.sp = &_estack,
.__start = &__start,
.vectors = {
- [0x0] = Vector_NMI,
- [0x1] = Vector_HardFault,
- [0x2] = Vector_MemoryManagmentFault,
- [0x3] = Vector_BusFault,
- [0x4] = Vector_UsageFault,
- [0x5] = Vector_Default, /* Reserved */
- [0x6] = Vector_Default, /* Reserved */
- [0x7] = Vector_Default, /* Reserved */
- [0x8] = Vector_Default, /* Reserved */
- [0x9] = Vector_SVCall,
- [0xA] = Vector_Debug,
- [0xB] = Vector_Default, /* Reserved */
- [0xC] = Vector_PendSV,
- [0xD] = Vector_Systick,
- [0xE] = Vector_Default, /* Reserved */
- [0xF] = Vector_Default, /* Reserved */
+ [0x0] = IRQ_NMI,
+ [0x1] = IRQ_HardFault,
+ [0x2] = IRQ_MemoryManagmentFault,
+ [0x3] = IRQ_BusFault,
+ [0x4] = IRQ_UsageFault,
+ [0x5] = IRQ_Default, /* Reserved */
+ [0x6] = IRQ_Default, /* Reserved */
+ [0x7] = IRQ_Default, /* Reserved */
+ [0x8] = IRQ_Default, /* Reserved */
+ [0x9] = IRQ_SVCall,
+ [0xA] = IRQ_Debug,
+ [0xB] = IRQ_Default, /* Reserved */
+ [0xC] = IRQ_PendSV,
+ [0xD] = IRQ_Systick,
+ [0xE] = IRQ_Default, /* Reserved */
+ [0xF] = IRQ_Default, /* Reserved */
/* External Interrupts */
- [0x10] = Vector_Default, /* Handle Event */
- [0x11] = Vector_Default, /* -- */
- [0x12] = Vector_Default, /* -- */
- [0x13] = Vector_Default, /* -- */
- [0x14] = Vector_Default, /* -- */
- [0x15] = Vector_Default, /* -- */
- [0x16] = Vector_Default, /* Host to BMC */
- [0x17] = Vector_Default, /* -- */
- [0x18] = Vector_Default, /* TX Error */
- [0x19] = Vector_Default, /* RX Packet - Even ports */
- [0x1A] = Vector_Default, /* -- */
- [0x1B] = Vector_Default, /* -- */
- [0x1C] = Vector_Default, /* SMBUS 0 */
- [0x1D] = Vector_Default, /* -- */
- [0x1E] = Vector_Default, /* SMBUS 1 */
- [0x1F] = Vector_Default, /* RMU Egress */
- [0x20] = Vector_Default, /* -- */
- [0x21] = Vector_Default, /* -- */
- [0x22] = Vector_Default, /* Gen Status Changed */
- [0x23] = Vector_Default, /* seems to be always pending, but always masked. no handler (i.e., uses exception handler) */
- [0x24] = Vector_Default, /* -- */
- [0x25] = Vector_Default, /* -- */
- [0x26] = Vector_Default, /* Voltage Source Changed */
- [0x27] = Vector_Default, /* Link Status Changed (Even Ports) */
- [0x28] = Vector_Default, /* Link Status Changed (Odd Ports) */
- [0x29] = Vector_Default, /* RX Packet (Odd ports) */
- [0x2A] = Vector_Default, /* -- */
- [0x2B] = Vector_Default, /* -- */
- [0x2C] = Vector_Default, /* -- */
- [0x2D] = Vector_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_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, /* -- */
},
};
OpenPOWER on IntegriCloud