From a9f2fc628e3a26a829fd79aff74eb49839d1e74b Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Wed, 13 Apr 2016 05:20:02 +0300 Subject: xtensa: cleanup MMU setup and kernel layout macros Make kernel load address explicit, independent of the selected MMU configuration and configurable from Kconfig. Do not restrict it to the first 512MB of the physical address space. Cleanup kernel memory layout macros: - rename VECBASE_RESET_VADDR to VECBASE_VADDR, XC_VADDR to VECTOR_VADDR; - drop VIRTUAL_MEMORY_ADDRESS and LOAD_MEMORY_ADDRESS; - introduce PHYS_OFFSET and use it in __va and __pa definitions; - synchronize MMU/noMMU vectors, drop unused NMI vector; - replace hardcoded vectors offset of 0x3000 with Kconfig symbol. Signed-off-by: Max Filippov --- arch/xtensa/Kconfig | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) (limited to 'arch/xtensa/Kconfig') diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index c17496bc37f0..9b1f8c3c8cba 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig @@ -249,6 +249,25 @@ config KSEG_PADDR If unsure, leave the default value here. +config KERNEL_LOAD_ADDRESS + hex "Kernel load address" + default 0x00003000 + help + This is the address where the kernel is loaded. + It is virtual address for MMUv2 configurations and physical address + for all other configurations. + + If unsure, leave the default value here. + +config VECTORS_OFFSET + hex "Kernel vectors offset" + default 0x00003000 + help + This is the offset of the kernel image from the relocatable vectors + base. + + If unsure, leave the default value here. + choice prompt "KSEG layout" depends on MMU @@ -487,12 +506,7 @@ config DEFAULT_MEM_START used when no physical memory size is passed through DTB or through boot parameter from bootloader. - In noMMU configuration the following parameters are derived from it: - - kernel load address; - - kernel entry point address; - - relocatable vectors base address; - - uBoot load address; - - TASK_SIZE. + It's also used for TASK_SIZE calculation in noMMU configuration. If unsure, leave the default value here. -- cgit v1.2.3