diff options
author | Suzuki Poulose <suzuki@in.ibm.com> | 2011-12-14 22:57:15 +0000 |
---|---|---|
committer | Josh Boyer <jwboyer@gmail.com> | 2011-12-20 10:20:19 -0500 |
commit | 0f890c8d205e47f7cb0d381ffba582a170fd4f72 (patch) | |
tree | 66d8370622f15636134b83bd19145ce61d8d719c /arch/powerpc/Kconfig | |
parent | 3f53638c805f75989f4b4be07efcfd173cdd5e2d (diff) |
powerpc: Rename mapping based RELOCATABLE to DYNAMIC_MEMSTART for BookE
The current implementation of CONFIG_RELOCATABLE in BookE is based
on mapping the page aligned kernel load address to KERNELBASE. This
approach however is not enough for platforms, where the TLB page size
is large (e.g, 256M on 44x). So we are renaming the RELOCATABLE used
currently in BookE to DYNAMIC_MEMSTART to reflect the actual method.
The CONFIG_RELOCATABLE for PPC32(BookE) based on processing of the
dynamic relocations will be introduced in the later in the patch series.
This change would allow the use of the old method of RELOCATABLE for
platforms which can afford to enforce the page alignment (platforms with
smaller TLB size).
Changes since v3:
* Introduced a new config, NONSTATIC_KERNEL, to denote a kernel which is
either a RELOCATABLE or DYNAMIC_MEMSTART(Suggested by: Josh Boyer)
Suggested-by: Scott Wood <scottwood@freescale.com>
Tested-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Suzuki K. Poulose <suzuki@in.ibm.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Josh Boyer <jwboyer@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linux ppc dev <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r-- | arch/powerpc/Kconfig | 60 |
1 files changed, 41 insertions, 19 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index d66a47fde80c..6c8475692322 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -368,7 +368,8 @@ config KEXEC config CRASH_DUMP bool "Build a kdump crash kernel" depends on PPC64 || 6xx || FSL_BOOKE - select RELOCATABLE if PPC64 || FSL_BOOKE + select RELOCATABLE if PPC64 + select DYNAMIC_MEMSTART if FSL_BOOKE help Build a kernel suitable for use as a kdump capture kernel. The same kernel binary can be used as production kernel and dump @@ -777,6 +778,10 @@ source "drivers/rapidio/Kconfig" endmenu +config NONSTATIC_KERNEL + bool + default n + menu "Advanced setup" depends on PPC32 @@ -826,23 +831,39 @@ config LOWMEM_CAM_NUM int "Number of CAMs to use to map low memory" if LOWMEM_CAM_NUM_BOOL default 3 -config RELOCATABLE - bool "Build a relocatable kernel (EXPERIMENTAL)" +config DYNAMIC_MEMSTART + bool "Enable page aligned dynamic load address for kernel (EXPERIMENTAL)" depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || PPC_47x) - help - This builds a kernel image that is capable of running at the - location the kernel is loaded at (some alignment restrictions may - exist). - - One use is for the kexec on panic case where the recovery kernel - must live at a different physical address than the primary - kernel. - - Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address - it has been loaded at and the compile time physical addresses - CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START - setting can still be useful to bootwrappers that need to know the - load location of the kernel (eg. u-boot/mkimage). + select NONSTATIC_KERNEL + help + This option enables the kernel to be loaded at any page aligned + physical address. The kernel creates a mapping from KERNELBASE to + the address where the kernel is loaded. The page size here implies + the TLB page size of the mapping for kernel on the particular platform. + Please refer to the init code for finding the TLB page size. + + DYNAMIC_MEMSTART is an easy way of implementing pseudo-RELOCATABLE + kernel image, where the only restriction is the page aligned kernel + load address. When this option is enabled, the compile time physical + address CONFIG_PHYSICAL_START is ignored. + +# Mapping based RELOCATABLE is moved to DYNAMIC_MEMSTART +# config RELOCATABLE +# bool "Build a relocatable kernel (EXPERIMENTAL)" +# depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && (FSL_BOOKE || PPC_47x) +# help +# This builds a kernel image that is capable of running at the +# location the kernel is loaded at, without any alignment restrictions. +# +# One use is for the kexec on panic case where the recovery kernel +# must live at a different physical address than the primary +# kernel. +# +# Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address +# it has been loaded at and the compile time physical addresses +# CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START +# setting can still be useful to bootwrappers that need to know the +# load location of the kernel (eg. u-boot/mkimage). config PAGE_OFFSET_BOOL bool "Set custom page offset address" @@ -872,7 +893,7 @@ config KERNEL_START_BOOL config KERNEL_START hex "Virtual address of kernel base" if KERNEL_START_BOOL default PAGE_OFFSET if PAGE_OFFSET_BOOL - default "0xc2000000" if CRASH_DUMP && !RELOCATABLE + default "0xc2000000" if CRASH_DUMP && !NONSTATIC_KERNEL default "0xc0000000" config PHYSICAL_START_BOOL @@ -885,7 +906,7 @@ config PHYSICAL_START_BOOL config PHYSICAL_START hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL - default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !RELOCATABLE + default "0x02000000" if PPC_STD_MMU && CRASH_DUMP && !NONSTATIC_KERNEL default "0x00000000" config PHYSICAL_ALIGN @@ -931,6 +952,7 @@ endmenu if PPC64 config RELOCATABLE bool "Build a relocatable kernel" + select NONSTATIC_KERNEL help This builds a kernel image that is capable of running anywhere in the RMA (real memory area) at any 16k-aligned base address. |