Skip to content

Commit 80c546c

Browse files
arch: add dependencie for CONFIG_SRAM_VECTOR_TABLE
Move SRAM_VECTOR_TABLE symbol from general Kconfig to Arch Kconfig because it depends on the architecture possibility to relocate the vector table. Signed-off-by: Martin Hoff <[email protected]>
1 parent e02bd58 commit 80c546c

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

Kconfig.zephyr

-6
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ config LINKER_SORT_BY_ALIGNMENT
215215
in decreasing size of symbols. This helps to minimize
216216
padding between symbols.
217217

218-
config SRAM_VECTOR_TABLE
219-
bool "Place the vector table in SRAM instead of flash"
220-
help
221-
The option specifies that the vector table should be placed at the
222-
start of SRAM instead of the start of flash.
223-
224218
config HAS_SRAM_OFFSET
225219
bool
226220
help

arch/Kconfig

+11
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,14 @@ config IRQ_OFFLOAD
573573
run in interrupt context. Only useful for test cases that need
574574
to validate the correctness of kernel objects in IRQ context.
575575

576+
config SRAM_VECTOR_TABLE
577+
bool "Place the vector table in SRAM instead of flash"
578+
depends on ARCH_HAS_VECTOR_TABLE_RELOCATION
579+
depends on XIP
580+
help
581+
When XiP is enabled, this option will result in the vector table being
582+
relocated from Flash to SRAM.
583+
576584
config IRQ_OFFLOAD_NESTED
577585
bool "irq_offload() supports nested IRQs"
578586
depends on IRQ_OFFLOAD
@@ -671,6 +679,9 @@ config ARCH_HAS_NOCACHE_MEMORY_SUPPORT
671679
config ARCH_HAS_RAMFUNC_SUPPORT
672680
bool
673681

682+
config ARCH_HAS_VECTOR_TABLE_RELOCATION
683+
bool
684+
674685
config ARCH_HAS_NESTED_EXCEPTION_DETECTION
675686
bool
676687

arch/arm/core/Kconfig

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ config CPU_CORTEX_M
1616
select ARCH_HAS_USERSPACE if ARM_MPU
1717
select ARCH_HAS_NOCACHE_MEMORY_SUPPORT if ARM_MPU && CPU_HAS_ARM_MPU && CPU_HAS_DCACHE
1818
select ARCH_HAS_RAMFUNC_SUPPORT
19+
select ARCH_HAS_VECTOR_TABLE_RELOCATION if CPU_CORTEX_M_HAS_VTOR
1920
select ARCH_HAS_NESTED_EXCEPTION_DETECTION
2021
select SWAP_NONATOMIC
2122
select ARCH_HAS_EXTRA_EXCEPTION_INFO

doc/releases/release-notes-4.2.rst

+5
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,11 @@ Deprecated APIs and options
9595
New APIs and options
9696
====================
9797

98+
* Architectures
99+
* :kconfig:option:`ARCH_HAS_VECTOR_TABLE_RELOCATION`
100+
* Move :kconfig:option:`CONFIG_SRAM_VECTOR_TABLE` from ``zephyr/Kconfig.zephyr`` to
101+
``zephyr/arch/Kconfig`` and added dependencies to it.
102+
98103
* Kernel
99104

100105
* :c:macro:`K_TIMEOUT_ABS_SEC`

0 commit comments

Comments
 (0)