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