diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2020-01-31 20:11:24 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2020-02-04 21:57:02 -0800 |
commit | 5e4417f921238b5acf101bfcd59a7b3463fb2dbd (patch) | |
tree | d4d46c0c679937e483f4a2de6e105a5f6afbcbec /arch/xtensa/Kconfig | |
parent | 4f17664a4407004f71dc76de01c89fdb6efc0776 (diff) | |
download | linux-5e4417f921238b5acf101bfcd59a7b3463fb2dbd.tar.gz linux-5e4417f921238b5acf101bfcd59a7b3463fb2dbd.tar.bz2 linux-5e4417f921238b5acf101bfcd59a7b3463fb2dbd.zip |
xtensa: reorganize vectors placement
Allow vectors to be either merged into the kernel .text or put at a
fixed virtual address independently of XIP option. Drop option that
puts vectors at a fixed offset from the kernel text. Add choice to
Kconfig.
Vectors at fixed virtual address may be useful for XIP-aware MTD support
and for noMMU configurations with available IRAM. Configurations without
VECBASE register must put their vectors at specific locations regardless
of the selected option. All other configurations should happily use
merged vectors.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/Kconfig')
-rw-r--r-- | arch/xtensa/Kconfig | 40 |
1 files changed, 33 insertions, 7 deletions
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 06e6161797fa..133385d13c02 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -572,15 +572,41 @@ config KERNEL_LOAD_ADDRESS If unsure, leave the default value here. -config VECTORS_OFFSET - hex "Kernel vectors offset" - default 0x00003000 - depends on !XIP_KERNEL +choice + prompt "Relocatable vectors location" + default XTENSA_VECTORS_IN_TEXT help - This is the offset of the kernel image from the relocatable vectors - base. + Choose whether relocatable vectors are merged into the kernel .text + or placed separately at runtime. This option does not affect + configurations without VECBASE register where vectors are always + placed at their hardware-defined locations. - If unsure, leave the default value here. +config XTENSA_VECTORS_IN_TEXT + bool "Merge relocatable vectors into kernel text" + depends on !MTD_XIP + help + This option puts relocatable vectors into the kernel .text section + with proper alignment. + This is a safe choice for most configurations. + +config XTENSA_VECTORS_SEPARATE + bool "Put relocatable vectors at fixed address" + help + This option puts relocatable vectors at specific virtual address. + Vectors are merged with the .init data in the kernel image and + are copied into their designated location during kernel startup. + Use it to put vectors into IRAM or out of FLASH on kernels with + XIP-aware MTD support. + +endchoice + +config VECTORS_ADDR + hex "Kernel vectors virtual address" + default 0x00000000 + depends on XTENSA_VECTORS_SEPARATE + help + This is the virtual address of the (relocatable) vectors base. + It must be within KSEG if MMU is used. config XIP_DATA_ADDR hex "XIP kernel data virtual address" |