Skip to content

Commit a085cfc

Browse files
Martinhoff-makerkartben
authored andcommitted
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 <martin.hoff@silabs.com>
1 parent c9f149c commit a085cfc

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

Kconfig.zephyr

Lines changed: 0 additions & 6 deletions
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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,15 @@ 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+
depends on !ROMSTART_RELOCATION_ROM
581+
help
582+
When XiP is enabled, this option will result in the vector table being
583+
relocated from Flash to SRAM.
584+
576585
config IRQ_OFFLOAD_NESTED
577586
bool "irq_offload() supports nested IRQs"
578587
depends on IRQ_OFFLOAD
@@ -671,6 +680,9 @@ config ARCH_HAS_NOCACHE_MEMORY_SUPPORT
671680
config ARCH_HAS_RAMFUNC_SUPPORT
672681
bool
673682

683+
config ARCH_HAS_VECTOR_TABLE_RELOCATION
684+
bool
685+
674686
config ARCH_HAS_NESTED_EXCEPTION_DETECTION
675687
bool
676688

arch/arm/core/Kconfig

Lines changed: 1 addition & 0 deletions
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/migration-guide-4.2.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,3 +329,9 @@ Modules
329329

330330
Architectures
331331
*************
332+
333+
* Moved :kconfig:option:`CONFIG_SRAM_VECTOR_TABLE` from ``zephyr/Kconfig.zephyr`` to
334+
``zephyr/arch/Kconfig`` and added dependency to :kconfig:option:`CONFIG_XIP`,
335+
:kconfig:option:`CONFIG_ARCH_HAS_VECTOR_TABLE_RELOCATION` and
336+
:kconfig:option:`CONFIG_ROMSTART_RELOCATION_ROM` to support relocation
337+
of vector table in RAM.

doc/releases/release-notes-4.2.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ Deprecated APIs and options
106106
New APIs and options
107107
====================
108108

109+
* Architectures
110+
111+
* :kconfig:option:`ARCH_HAS_VECTOR_TABLE_RELOCATION`
112+
* :kconfig:option:`CONFIG_SRAM_VECTOR_TABLE` moved from ``zephyr/Kconfig.zephyr`` to
113+
``zephyr/arch/Kconfig`` and added dependencies to it.
114+
109115
* Kernel
110116

111117
* :c:macro:`K_TIMEOUT_ABS_SEC`

0 commit comments

Comments
 (0)