Skip to content

Commit 8943213

Browse files
arch: split dynamic interrupt symbol
This commit introduces the SRAM_SW_ISR_TABLE option which is selected by DYNAMIC_INTERRUPT. It allows splitting the DYNAMIC_INTERRUPT option into two parts: - One for the relocation of the ISR vector table in RAM - One for the inclusion of functions needed to install ISRs dynamically The goal is to later only select the relocation of the ISR vector table in RAM and not all the associated functions from the dynamic interrupt mechanism. Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
1 parent f52d71c commit 8943213

File tree

9 files changed

+20
-6
lines changed

9 files changed

+20
-6
lines changed

arch/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,7 @@ config ISR_TABLES_LOCAL_DECLARATION
472472

473473
config DYNAMIC_INTERRUPTS
474474
bool "Installation of IRQs at runtime"
475+
select SRAM_SW_ISR_TABLE
475476
help
476477
Enable installation of interrupts at runtime, which will move some
477478
interrupt-related data structures to RAM instead of ROM, and
@@ -598,6 +599,12 @@ config SRAM_VECTOR_TABLE
598599
When XiP is enabled, this option will result in the vector table being
599600
relocated from Flash to SRAM.
600601

602+
config SRAM_SW_ISR_TABLE
603+
bool "Place the software ISR table in SRAM instead of flash"
604+
help
605+
The option specifies that the software interrupts vector table will be
606+
placed inside SRAM instead of the flash.
607+
601608
config IRQ_OFFLOAD_NESTED
602609
bool "irq_offload() supports nested IRQs"
603610
depends on IRQ_OFFLOAD

arch/arm/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ zephyr_linker_sources(ROM_START SORT_KEY 0x1vectors cortex_m/vector_table_pad.ld
3737
endif()
3838

3939
if(CONFIG_GEN_SW_ISR_TABLE)
40-
if(CONFIG_DYNAMIC_INTERRUPTS)
40+
if(CONFIG_SRAM_SW_ISR_TABLE)
4141
zephyr_linker_sources(RWDATA swi_tables.ld)
4242
else()
4343
zephyr_linker_sources(RODATA swi_tables.ld)

arch/arm64/core/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ endif()
6060
add_subdirectory_ifdef(CONFIG_XEN xen)
6161

6262
if(CONFIG_GEN_SW_ISR_TABLE)
63-
if(CONFIG_DYNAMIC_INTERRUPTS)
63+
if(CONFIG_SRAM_SW_ISR_TABLE)
6464
zephyr_linker_sources(RWDATA swi_tables.ld)
6565
else()
6666
zephyr_linker_sources(RODATA swi_tables.ld)

cmake/linker_script/common/common-ram.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# The contents of this file is based on include/zephyr/linker/common-ram.ld
33
# Please keep in sync
44

5-
if(CONFIG_GEN_SW_ISR_TABLE AND CONFIG_DYNAMIC_INTERRUPTS)
5+
if(CONFIG_GEN_SW_ISR_TABLE AND CONFIG_SRAM_SW_ISR_TABLE)
66
# ld align has been changed to subalign to provide identical behavior scatter vs. ld.
77
zephyr_linker_section(NAME sw_isr_table
88
GROUP DATA_REGION

cmake/linker_script/common/common-rom.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ zephyr_linker_section_obj_level(SECTION init LEVEL SMP)
1414
zephyr_iterable_section(NAME device NUMERIC KVMA RAM_REGION GROUP RODATA_REGION)
1515
zephyr_iterable_section(NAME service NUMERIC KVMA RAM_REGION GROUP RODATA_REGION)
1616

17-
if(CONFIG_GEN_SW_ISR_TABLE AND NOT CONFIG_DYNAMIC_INTERRUPTS)
17+
if(CONFIG_GEN_SW_ISR_TABLE AND NOT CONFIG_SRAM_SW_ISR_TABLE)
1818
# ld align has been changed to subalign to provide identical behavior scatter vs. ld.
1919
zephyr_linker_section(NAME sw_isr_table KVMA FLASH GROUP RODATA_REGION SUBALIGN ${CONFIG_ARCH_SW_ISR_TABLE_ALIGN} NOINPUT)
2020
zephyr_linker_section_configure(

doc/releases/migration-guide-4.3.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,6 @@ Modules
4646

4747
Architectures
4848
*************
49+
50+
* The :kconfig:option:`CONFIG_DYNAMIC_INTERRUPTS` option has a new dependency on
51+
:kconfig:option:`CONFIG_SRAM_SW_ISR_TABLE`.

doc/releases/release-notes-4.3.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ New APIs and options
6363
like you need to add more details, add them in the API documentation code
6464
instead.
6565
66+
* Architectures
67+
68+
* :kconfig:option:`CONFIG_SRAM_SW_ISR_TABLE`
69+
6670
New Boards
6771
**********
6872

include/zephyr/linker/common-ram.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
ITERABLE_SECTION_RAM(scmi_protocol, Z_LINK_ITERABLE_SUBALIGN)
1818
#endif /* CONFIG_ARM_SCMI */
1919

20-
#if defined(CONFIG_GEN_SW_ISR_TABLE) && defined(CONFIG_DYNAMIC_INTERRUPTS)
20+
#if defined(CONFIG_GEN_SW_ISR_TABLE) && defined(CONFIG_SRAM_SW_ISR_TABLE)
2121
SECTION_DATA_PROLOGUE(sw_isr_table,,)
2222
{
2323
/*

include/zephyr/linker/common-rom/common-rom-kernel-devices.ld

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
} GROUP_ROM_LINK_IN(RAMABLE_REGION, ROMABLE_REGION)
4545
#endif
4646

47-
#if defined(CONFIG_GEN_SW_ISR_TABLE) && !defined(CONFIG_DYNAMIC_INTERRUPTS)
47+
#if defined(CONFIG_GEN_SW_ISR_TABLE) && !defined(CONFIG_SRAM_SW_ISR_TABLE)
4848
SECTION_PROLOGUE(sw_isr_table,,)
4949
{
5050
/*

0 commit comments

Comments
 (0)