aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/Kconfig
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2008-04-21 14:22:34 -0400
committerPaul Mackerras <paulus@samba.org>2008-04-24 06:58:01 -0400
commit37dd2badcfcec35f5e21a0926968d77a404f03c3 (patch)
treed659c5713a15b4b70e3f49cbe58c9dfeb0e7c117 /arch/powerpc/Kconfig
parent96f1bb8a412aec3fc16306ef07c5bdb426edb615 (diff)
[POWERPC] 85xx: Add support for relocatable kernel (and booting at non-zero)
Added support to allow an 85xx kernel to be run from a non-zero physical address (useful for cooperative asymmetric multiprocessing situations and kdump). The support can be configured at compile time by setting CONFIG_PAGE_OFFSET, CONFIG_KERNEL_START, and CONFIG_PHYSICAL_START as desired. Alternatively, the kernel build can set CONFIG_RELOCATABLE. Setting this config option causes the kernel to determine at runtime the physical addresses of CONFIG_PAGE_OFFSET and CONFIG_KERNEL_START. If CONFIG_RELOCATABLE is set, then CONFIG_PHYSICAL_START has no meaning. However, CONFIG_PHYSICAL_START will always be used to set the LOAD program header physical address field in the resulting ELF image. Currently we are limited to running at a physical address that is a multiple of 256M. This is due to how we map TLBs to cover lowmem. This should be fixed to allow 64M or maybe even 16M alignment in the future. It is considered an error to try and run a kernel at a non-aligned physical address. All the magic for this support is accomplished by proper initialization of the kernel memory subsystem and use of ARCH_PFN_OFFSET. The use of ARCH_PFN_OFFSET only affects normal memory and not IO mappings. ioremap uses map_page and isn't affected by ARCH_PFN_OFFSET. /dev/mem continues to allow access to any physical address in the system regardless of how CONFIG_PHYSICAL_START is set. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/Kconfig')
-rw-r--r--arch/powerpc/Kconfig69
1 files changed, 66 insertions, 3 deletions
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 4bb2e9310a56..fdc755a05f70 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -656,21 +656,76 @@ config LOWMEM_SIZE
656 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL 656 hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
657 default "0x30000000" 657 default "0x30000000"
658 658
659config RELOCATABLE
660 bool "Build a relocatable kernel (EXPERIMENTAL)"
661 depends on EXPERIMENTAL && ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
662 help
663 This builds a kernel image that is capable of running at the
664 location the kernel is loaded at (some alignment restrictions may
665 exist).
666
667 One use is for the kexec on panic case where the recovery kernel
668 must live at a different physical address than the primary
669 kernel.
670
671 Note: If CONFIG_RELOCATABLE=y, then the kernel runs from the address
672 it has been loaded at and the compile time physical addresses
673 CONFIG_PHYSICAL_START is ignored. However CONFIG_PHYSICAL_START
674 setting can still be useful to bootwrappers that need to know the
675 load location of the kernel (eg. u-boot/mkimage).
676
677config PAGE_OFFSET_BOOL
678 bool "Set custom page offset address"
679 depends on ADVANCED_OPTIONS
680 help
681 This option allows you to set the kernel virtual address at which
682 the kernel will map low memory. This can be useful in optimizing
683 the virtual memory layout of the system.
684
685 Say N here unless you know what you are doing.
686
687config PAGE_OFFSET
688 hex "Virtual address of memory base" if PAGE_OFFSET_BOOL
689 default "0xc0000000"
690
659config KERNEL_START_BOOL 691config KERNEL_START_BOOL
660 bool "Set custom kernel base address" 692 bool "Set custom kernel base address"
661 depends on ADVANCED_OPTIONS 693 depends on ADVANCED_OPTIONS
662 help 694 help
663 This option allows you to set the kernel virtual address at which 695 This option allows you to set the kernel virtual address at which
664 the kernel will map low memory (the kernel image will be linked at 696 the kernel will be loaded. Normally this should match PAGE_OFFSET
665 this address). This can be useful in optimizing the virtual memory 697 however there are times (like kdump) that one might not want them
666 layout of the system. 698 to be the same.
667 699
668 Say N here unless you know what you are doing. 700 Say N here unless you know what you are doing.
669 701
670config KERNEL_START 702config KERNEL_START
671 hex "Virtual address of kernel base" if KERNEL_START_BOOL 703 hex "Virtual address of kernel base" if KERNEL_START_BOOL
704 default PAGE_OFFSET if PAGE_OFFSET_BOOL
705 default "0xc2000000" if CRASH_DUMP
672 default "0xc0000000" 706 default "0xc0000000"
673 707
708config PHYSICAL_START_BOOL
709 bool "Set physical address where the kernel is loaded"
710 depends on ADVANCED_OPTIONS && FLATMEM && FSL_BOOKE
711 help
712 This gives the physical address where the kernel is loaded.
713
714 Say N here unless you know what you are doing.
715
716config PHYSICAL_START
717 hex "Physical address where the kernel is loaded" if PHYSICAL_START_BOOL
718 default "0x02000000" if PPC_STD_MMU && CRASH_DUMP
719 default "0x00000000"
720
721config PHYSICAL_ALIGN
722 hex
723 default "0x10000000" if FSL_BOOKE
724 help
725 This value puts the alignment restrictions on physical address
726 where kernel is loaded and run from. Kernel is compiled for an
727 address which meets above alignment restriction.
728
674config TASK_SIZE_BOOL 729config TASK_SIZE_BOOL
675 bool "Set custom user task size" 730 bool "Set custom user task size"
676 depends on ADVANCED_OPTIONS 731 depends on ADVANCED_OPTIONS
@@ -717,9 +772,17 @@ config PIN_TLB
717endmenu 772endmenu
718 773
719if PPC64 774if PPC64
775config PAGE_OFFSET
776 hex
777 default "0xc000000000000000"
720config KERNEL_START 778config KERNEL_START
721 hex 779 hex
780 default "0xc000000002000000" if CRASH_DUMP
722 default "0xc000000000000000" 781 default "0xc000000000000000"
782config PHYSICAL_START
783 hex
784 default "0x02000000" if CRASH_DUMP
785 default "0x00000000"
723endif 786endif
724 787
725source "net/Kconfig" 788source "net/Kconfig"