Commit ceefccc9 authored by H. Peter Anvin's avatar H. Peter Anvin

x86: default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN to 16 MB

Default CONFIG_PHYSICAL_START and CONFIG_PHYSICAL_ALIGN each to 16 MB,
so that both non-relocatable and relocatable kernels are loaded at
16 MB by a non-relocating bootloader.  This is somewhat hacky, but it
appears to be the only way to do this that does not break some some
set of existing bootloaders.

We want to avoid the bottom 16 MB because of large page breakup,
memory holes, and ZONE_DMA.  Embedded systems may need to reduce this,
or update their bootloaders to be aware of the new min_alignment field.

[ Impact: performance improvement, avoids problems on some systems ]
Signed-off-by: default avatarH. Peter Anvin <hpa@zytor.com>
parent d297366b
...@@ -1455,9 +1455,7 @@ config KEXEC_JUMP ...@@ -1455,9 +1455,7 @@ config KEXEC_JUMP
config PHYSICAL_START config PHYSICAL_START
hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP)
default "0x1000000" if X86_NUMAQ default "0x1000000"
default "0x200000" if X86_64
default "0x100000"
---help--- ---help---
This gives the physical address where the kernel is loaded. This gives the physical address where the kernel is loaded.
...@@ -1476,15 +1474,15 @@ config PHYSICAL_START ...@@ -1476,15 +1474,15 @@ config PHYSICAL_START
to be specifically compiled to run from a specific memory area to be specifically compiled to run from a specific memory area
(normally a reserved region) and this option comes handy. (normally a reserved region) and this option comes handy.
So if you are using bzImage for capturing the crash dump, leave So if you are using bzImage for capturing the crash dump,
the value here unchanged to 0x100000 and set CONFIG_RELOCATABLE=y. leave the value here unchanged to 0x1000000 and set
Otherwise if you plan to use vmlinux for capturing the crash dump CONFIG_RELOCATABLE=y. Otherwise if you plan to use vmlinux
change this value to start of the reserved region (Typically 16MB for capturing the crash dump change this value to start of
0x1000000). In other words, it can be set based on the "X" value as the reserved region. In other words, it can be set based on
specified in the "crashkernel=YM@XM" command line boot parameter the "X" value as specified in the "crashkernel=YM@XM"
passed to the panic-ed kernel. Typically this parameter is set as command line boot parameter passed to the panic-ed
crashkernel=64M@16M. Please take a look at kernel. Please take a look at Documentation/kdump/kdump.txt
Documentation/kdump/kdump.txt for more details about crash dumps. for more details about crash dumps.
Usage of bzImage for capturing the crash dump is recommended as Usage of bzImage for capturing the crash dump is recommended as
one does not have to build two kernels. Same kernel can be used one does not have to build two kernels. Same kernel can be used
...@@ -1521,9 +1519,8 @@ config X86_NEED_RELOCS ...@@ -1521,9 +1519,8 @@ config X86_NEED_RELOCS
config PHYSICAL_ALIGN config PHYSICAL_ALIGN
hex hex
prompt "Alignment value to which kernel should be aligned" if X86_32 prompt "Alignment value to which kernel should be aligned" if X86_32
default "0x100000" if X86_32 default "0x1000000"
default "0x200000" if X86_64 range 0x2000 0x1000000
range 0x2000 0x400000
---help--- ---help---
This value puts the alignment restrictions on physical address This value puts the alignment restrictions on physical address
where kernel is loaded and run from. Kernel is compiled for an where kernel is loaded and run from. Kernel is compiled for an
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment