diff --git a/arch/common/Makefile.gen_isr_tables b/arch/common/Makefile.gen_isr_tables index 4d0a21505cd..4bcd8e29a0e 100644 --- a/arch/common/Makefile.gen_isr_tables +++ b/arch/common/Makefile.gen_isr_tables @@ -4,6 +4,8 @@ OUTPUT_OBJ := isr_tables.o ifeq ($(ARCH),riscv32) OUTPUT_FORMAT := elf32-littleriscv +else ifeq ($(ARCH),xtensa) +OUTPUT_FORMAT := elf32-xtensa-le else OUTPUT_FORMAT := elf32-little$(ARCH) endif diff --git a/arch/xtensa/core/Makefile b/arch/xtensa/core/Makefile index 6a5a23a8985..df5d485da37 100644 --- a/arch/xtensa/core/Makefile +++ b/arch/xtensa/core/Makefile @@ -13,5 +13,3 @@ obj-y = ${obj-atomic} cpu_idle.o fatal.o \ xtensa_intr.o xtensa_vectors.o irq_manage.o obj-$(CONFIG_XTENSA_USE_CORE_CRT1) += crt1.o obj-$(CONFIG_IRQ_OFFLOAD) += irq_offload.o -# Keep this last so that vague linking works -obj-y += sw_isr_table.o diff --git a/arch/xtensa/core/sw_isr_table.S b/arch/xtensa/core/sw_isr_table.S deleted file mode 100644 index a672f95f840..00000000000 --- a/arch/xtensa/core/sw_isr_table.S +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (c) 2016 Cadence Design Systems, Inc. - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @file - * @brief ISR table for static ISR declarations for XTENSA - * - * Software ISR table for XTENSA - */ - -#include -#include -#include -#include - -/* - * Xtensa assembly code uses xt_unhandled_interrupt for default IRQ handler. - */ -#define _irq_spurious xt_unhandled_interrupt - -/* - * enable preprocessor features, such - * as %expr - evaluate the expression and use it as a string - */ -.altmacro - -/* - * Define an ISR table entry - * Define symbol as weak and give the section .gnu.linkonce.d - * prefix. This allows linker overload the symbol and the - * whole section by the one defined by a device driver - */ -.macro _isr_table_entry_declare index - WDATA(_isr_irq\index) - .section .gnu.linkonce.d.isr_irq\index - _isr_irq\index: .word 0xABAD1DEA, _irq_spurious -.endm - -/* - * Declare the ISR table - */ -.macro _isr_table_declare from, to - counter = \from - .rept (\to - \from) - _isr_table_entry_declare %counter - counter = counter + 1 - .endr -.endm - -GTEXT(_irq_spurious) -GDATA(_sw_isr_table) - -.section .isr_irq0 -.align -_sw_isr_table: - -_isr_table_declare 0 XCHAL_NUM_INTERRUPTS diff --git a/arch/xtensa/core/xtensa_intr.c b/arch/xtensa/core/xtensa_intr.c index 765a4a410f4..38031c965dd 100644 --- a/arch/xtensa/core/xtensa_intr.c +++ b/arch/xtensa/core/xtensa_intr.c @@ -14,6 +14,7 @@ #include "xtensa_rtos.h" #include "xtensa_api.h" #include +#include #if XCHAL_HAVE_EXCEPTIONS @@ -21,7 +22,6 @@ extern xt_exc_handler _xt_exception_table[XCHAL_EXCCAUSE_NUM]; - /* * Default handler for unhandled exceptions. */ @@ -57,13 +57,10 @@ xt_exc_handler _xt_set_exception_handler(int n, xt_exc_handler f) #endif -#if XCHAL_HAVE_INTERRUPTS -/* - * Default handler for unhandled interrupts. - */ -void xt_unhandled_interrupt(void *arg) +#if defined(CONFIG_SW_ISR_TABLE) && defined(XCHAL_HAVE_INTERRUPTS) +void _irq_spurious(void *arg) { ReservedInterruptHandler((unsigned int)arg); CODE_UNREACHABLE; } -#endif /* XCHAL_HAVE_INTERRUPTS */ +#endif diff --git a/arch/xtensa/soc/D_108mini/linker.ld b/arch/xtensa/soc/D_108mini/linker.ld index f366060eef4..94d62e591a3 100644 --- a/arch/xtensa/soc/D_108mini/linker.ld +++ b/arch/xtensa/soc/D_108mini/linker.ld @@ -49,6 +49,9 @@ MEMORY srom0_seg : org = 0x50000000, len = 0x300 srom1_seg : org = 0x50000300, len = 0xFFFD00 sram0_seg : org = 0x60000000, len = 0x4000000 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -604,4 +607,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/D_212GP/linker.ld b/arch/xtensa/soc/D_212GP/linker.ld index ab50c4427b9..375a51221df 100644 --- a/arch/xtensa/soc/D_212GP/linker.ld +++ b/arch/xtensa/soc/D_212GP/linker.ld @@ -49,6 +49,9 @@ MEMORY sram17_seg : org = 0x60000378, len = 0x48 sram18_seg : org = 0x600003C0, len = 0x40 sram19_seg : org = 0x60000400, len = 0x3FFFC00 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -610,4 +613,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/D_233L/linker.ld b/arch/xtensa/soc/D_233L/linker.ld index 2901066dac0..e84f8af2c46 100644 --- a/arch/xtensa/soc/D_233L/linker.ld +++ b/arch/xtensa/soc/D_233L/linker.ld @@ -46,6 +46,9 @@ MEMORY sram20_seg : org = 0x00002500, len = 0x3FFDB00 srom0_seg : org = 0xFE000000, len = 0x300 srom1_seg : org = 0xFE000300, len = 0xFFFD00 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -511,4 +514,8 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } + +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld b/arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld index 59fb7c7a7c0..189a4dd0e06 100644 --- a/arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld +++ b/arch/xtensa/soc/XRC_D2PM_5swIrq/linker.ld @@ -49,6 +49,9 @@ MEMORY sram17_seg : org = 0x60000278, len = 0x4 sram18_seg : org = 0x6000027C, len = 0x1C sram19_seg : org = 0x60000298, len = 0x3FFFD68 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -614,4 +617,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/linker.ld b/arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/linker.ld index 1c262e065e0..6ce6a140f1a 100644 --- a/arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/linker.ld +++ b/arch/xtensa/soc/XRC_FUSION_AON_ALL_LM/linker.ld @@ -34,6 +34,9 @@ MEMORY srom0_seg : org = 0x50000000, len = 0x300 srom1_seg : org = 0x50000300, len = 0xFFFD00 sram0_seg : org = 0x60000000, len = 0x4000000 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -443,4 +446,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/esp32/linker.ld b/arch/xtensa/soc/esp32/linker.ld index 44c8eeca4b5..efd4adc43ee 100644 --- a/arch/xtensa/soc/esp32/linker.ld +++ b/arch/xtensa/soc/esp32/linker.ld @@ -37,6 +37,9 @@ MEMORY drom0_0_seg(R): org = 0x3F400010, len = 0x800000 rtc_iram_seg(RWX): org = 0x400C0000, len = 0x2000 rtc_slow_seg(RW): org = 0x50000000, len = 0x1000 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST(RW): org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -219,4 +222,8 @@ SECTIONS _bss_end = ABSOLUTE(.); _heap_start = ABSOLUTE(.); } GROUP_LINK_IN(RAMABLE_REGION) + +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi2_std/linker.ld b/arch/xtensa/soc/hifi2_std/linker.ld index fa20946c715..6ef738547ad 100644 --- a/arch/xtensa/soc/hifi2_std/linker.ld +++ b/arch/xtensa/soc/hifi2_std/linker.ld @@ -49,6 +49,9 @@ MEMORY sram17_seg : org = 0x60000378, len = 0x48 sram18_seg : org = 0x600003C0, len = 0x40 sram19_seg : org = 0x60000400, len = 0x3FFFC00 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -614,4 +617,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi3_bd5/linker.ld b/arch/xtensa/soc/hifi3_bd5/linker.ld index 039e6e11e01..ee00d60bdc8 100644 --- a/arch/xtensa/soc/hifi3_bd5/linker.ld +++ b/arch/xtensa/soc/hifi3_bd5/linker.ld @@ -36,6 +36,9 @@ MEMORY sram7_seg : org = 0x600001D8, len = 0x4 sram8_seg : org = 0x600001DC, len = 0x1C sram9_seg : org = 0x600001F8, len = 0x3FFFE08 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -390,4 +393,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi3_bd5_call0/linker.ld b/arch/xtensa/soc/hifi3_bd5_call0/linker.ld index 039e6e11e01..ee00d60bdc8 100644 --- a/arch/xtensa/soc/hifi3_bd5_call0/linker.ld +++ b/arch/xtensa/soc/hifi3_bd5_call0/linker.ld @@ -36,6 +36,9 @@ MEMORY sram7_seg : org = 0x600001D8, len = 0x4 sram8_seg : org = 0x600001DC, len = 0x1C sram9_seg : org = 0x600001F8, len = 0x3FFFE08 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -390,4 +393,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi4_bd7/linker.ld b/arch/xtensa/soc/hifi4_bd7/linker.ld index 5c1a9ce3a06..392608155ff 100644 --- a/arch/xtensa/soc/hifi4_bd7/linker.ld +++ b/arch/xtensa/soc/hifi4_bd7/linker.ld @@ -40,6 +40,9 @@ MEMORY sram11_seg : org = 0x600002B8, len = 0x48 sram12_seg : org = 0x60000300, len = 0x40 sram13_seg : org = 0x60000340, len = 0x3FFCC0 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -437,4 +440,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi_mini/linker.ld b/arch/xtensa/soc/hifi_mini/linker.ld index 55a57fd92a6..2f1841bb248 100644 --- a/arch/xtensa/soc/hifi_mini/linker.ld +++ b/arch/xtensa/soc/hifi_mini/linker.ld @@ -33,6 +33,9 @@ MEMORY iram0_5_seg : org = 0x60020320, len = 0x4 iram0_6_seg : org = 0x60020324, len = 0x1C iram0_7_seg : org = 0x60020340, len = 0x1FCC0 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -362,4 +365,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/hifi_mini_4swIrq/linker.ld b/arch/xtensa/soc/hifi_mini_4swIrq/linker.ld index 7a6ec776020..5afc9795f5a 100644 --- a/arch/xtensa/soc/hifi_mini_4swIrq/linker.ld +++ b/arch/xtensa/soc/hifi_mini_4swIrq/linker.ld @@ -33,6 +33,9 @@ MEMORY iram0_5_seg : org = 0x60020320, len = 0x4 iram0_6_seg : org = 0x60020324, len = 0x1C iram0_7_seg : org = 0x60020340, len = 0x1FCC0 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -362,4 +365,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/arch/xtensa/soc/sample_controller/linker.ld b/arch/xtensa/soc/sample_controller/linker.ld index f366060eef4..94d62e591a3 100644 --- a/arch/xtensa/soc/sample_controller/linker.ld +++ b/arch/xtensa/soc/sample_controller/linker.ld @@ -49,6 +49,9 @@ MEMORY srom0_seg : org = 0x50000000, len = 0x300 srom1_seg : org = 0x50000300, len = 0xFFFD00 sram0_seg : org = 0x60000000, len = 0x4000000 +#ifdef CONFIG_GEN_ISR_TABLES + IDT_LIST : org = 0xffffdfff, len = 0x2000 +#endif } PHDRS @@ -604,4 +607,7 @@ SECTIONS { KEEP (*(.debug.xt.callgraph .debug.xt.callgraph.* .gnu.linkonce.xt.callgraph.*)) } +#ifdef CONFIG_GEN_ISR_TABLES +#include +#endif } diff --git a/boards/xtensa/esp32/esp32_defconfig b/boards/xtensa/esp32/esp32_defconfig index 678f38b1245..ef4cfd56b39 100644 --- a/boards/xtensa/esp32/esp32_defconfig +++ b/boards/xtensa/esp32/esp32_defconfig @@ -24,3 +24,7 @@ CONFIG_GPIO=y CONFIG_GPIO_ESP32=y CONFIG_RANDOM_ESP32_RNG=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/qemu_xtensa/qemu_xtensa_defconfig b/boards/xtensa/qemu_xtensa/qemu_xtensa_defconfig index 5226022559a..0eccf9490af 100644 --- a/boards/xtensa/qemu_xtensa/qemu_xtensa_defconfig +++ b/boards/xtensa/qemu_xtensa/qemu_xtensa_defconfig @@ -6,3 +6,7 @@ CONFIG_CONSOLE=y CONFIG_SOC_XTENSA_SAMPLE_CONTROLLER=y CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=10000000 CONFIG_TOOLCHAIN_VARIANT="" + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_D_108mini_defconfig b/boards/xtensa/xt-sim/xt-sim_D_108mini_defconfig index 2dac7dca8f6..ab0e3e938fc 100644 --- a/boards/xtensa/xt-sim/xt-sim_D_108mini_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_D_108mini_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_D_108mini=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_D_212GP_defconfig b/boards/xtensa/xt-sim/xt-sim_D_212GP_defconfig index ff568f07a1c..4faa1d1e05b 100644 --- a/boards/xtensa/xt-sim/xt-sim_D_212GP_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_D_212GP_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_D_212GP=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_D_233L_defconfig b/boards/xtensa/xt-sim/xt-sim_D_233L_defconfig index 439ab64007a..36b99f371e1 100644 --- a/boards/xtensa/xt-sim/xt-sim_D_233L_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_D_233L_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_D_233L=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_XRC_FUSION_AON_ALL_LM_defconfig b/boards/xtensa/xt-sim/xt-sim_XRC_FUSION_AON_ALL_LM_defconfig index 16e01931f27..c5efaa98788 100644 --- a/boards/xtensa/xt-sim/xt-sim_XRC_FUSION_AON_ALL_LM_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_XRC_FUSION_AON_ALL_LM_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_XRC_FUSION_AON_ALL_LM=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_defconfig b/boards/xtensa/xt-sim/xt-sim_defconfig index 03d23f894c0..7256a044fee 100644 --- a/boards/xtensa/xt-sim/xt-sim_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_XTENSA_SAMPLE_CONTROLLER=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_hifi2_std_defconfig b/boards/xtensa/xt-sim/xt-sim_hifi2_std_defconfig index bca099f7070..33853fd46f3 100644 --- a/boards/xtensa/xt-sim/xt-sim_hifi2_std_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_hifi2_std_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_HIFI2_STD=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/boards/xtensa/xt-sim/xt-sim_hifi3_bd5_defconfig b/boards/xtensa/xt-sim/xt-sim_hifi3_bd5_defconfig index f300680acf2..b39f437c6ad 100644 --- a/boards/xtensa/xt-sim/xt-sim_hifi3_bd5_defconfig +++ b/boards/xtensa/xt-sim/xt-sim_hifi3_bd5_defconfig @@ -4,3 +4,7 @@ CONFIG_XTENSA=y CONFIG_SOC_HIFI3_BD5=y CONFIG_BOARD_XT_SIM=y CONFIG_CONSOLE=y + +CONFIG_SW_ISR_TABLE=y +CONFIG_GEN_ISR_TABLES=y +CONFIG_GEN_IRQ_VECTOR_TABLE=n diff --git a/include/arch/xtensa/arch.h b/include/arch/xtensa/arch.h index 22e91aabac8..02c42102db5 100644 --- a/include/arch/xtensa/arch.h +++ b/include/arch/xtensa/arch.h @@ -114,17 +114,12 @@ extern void _irq_priority_set(u32_t irq, u32_t prio, u32_t flags); */ #define _ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \ ({ \ - enum { IRQ = irq_p }; \ - static struct _isr_table_entry \ - _CONCAT(_isr_irq, irq_p) \ - __attribute__ ((used)) \ - __attribute__ ((section(\ - STRINGIFY(_CONCAT(.gnu.linkonce.d.isr_irq, irq_p)))\ - )) = {isr_param_p, isr_p}; \ - _irq_priority_set(irq_p, priority_p, flags_p); \ + _ISR_DECLARE(irq_p, flags_p, isr_p, isr_param_p); \ irq_p; \ }) +/* Spurious interrupt handler. Throws an error if called */ +extern void _irq_spurious(void *unused); FUNC_NORETURN void _SysFatalErrorHandler(unsigned int reason, const NANO_ESF *esf); diff --git a/include/arch/xtensa/xtensa_irq.h b/include/arch/xtensa/xtensa_irq.h index 9c2d7f647fb..3727f93deb2 100644 --- a/include/arch/xtensa/xtensa_irq.h +++ b/include/arch/xtensa/xtensa_irq.h @@ -9,6 +9,9 @@ #include #include +#define CONFIG_NUM_IRQS XCHAL_NUM_INTERRUPTS +#define CONFIG_GEN_IRQ_START_VECTOR 0 + /** * * @brief Enable an interrupt line