1 // Copyright (c) 2020 Brian Swetland
2 //
3 // Use of this source code is governed by a MIT-style
4 // license that can be found in the LICENSE file or at
5 // https://opensource.org/licenses/MIT
6 
7 #include <lk/debug.h>
8 #include <lk/compiler.h>
9 #include <arch/arm/cm.h>
10 
11 /* un-overridden irq handler */
rp20xx_dummy_irq(void)12 void rp20xx_dummy_irq(void) {
13     arm_cm_irq_entry();
14     panic("unhandled irq\n");
15 }
16 
17 /* a list of default handlers that are simply aliases to the dummy handler */
18 #define RP20XX_IRQ(name,num) \
19 void name##_IRQHandler(void) __WEAK_ALIAS("rp20xx_dummy_irq");
20 #include <platform/irqinfo.h>
21 #undef RP20XX_IRQ
22 
23 const void* const __SECTION(".text.boot.vectab2") vectab2[26] = {
24 #define RP20XX_IRQ(name,num) [name##_IRQn] = name##_IRQHandler,
25 #include <platform/irqinfo.h>
26 #undef RP20XX_IRQ
27 };
28 
29