CONFIG_PHYSICAL_ALIGN gives the physical address's alignment where the kernel is loaded. CONFIG_PHYSICAL_ALIGN's default value is different from i386 kernel with the x86_84 kernel. The i386's default CONFIG_PHYSICAL_ALIGN value is 1MB, but the x86_64's is 2MB. The problem is, if you compile x86_64 kernel, the value of CONFIG_PHYSICAL_ALIGN will be fixed, and the next time you compile i386 kernel, previous CONFIG_PHYSICAL_ALIGN value of x86_64(default: 2MB) will be used by default. The follwing patch will fix this problem. With this patch, either CONFIG_RELOCATABLE's option or CONFIG_EMNBEDDED's option is set "Y", you can configure the value of CONFIG_PHYSICAL_ALIGN. Signed-off-by: Yoshimi Ichiyanagi <ichiyanagi.yoshimi@lab.ntt.co.jp> --- diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index f952493..05c3316 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig @@ -880,7 +880,7 @@ config RELOCATABLE kernel. config PHYSICAL_ALIGN - hex "Alignment value to which kernel should be aligned" + hex "Alignment value to which kernel should be aligned" if (EMBEDDED || RELOCATABLE) default "0x100000" range 0x2000 0x400000 help -- Yoshimi Ichiyanagi Open source software computing project, NTT Cyber Space Laboratories E-mail : ichiyanagi.yoshimi@lab.ntt.co.jp
On Tue, Aug 14, 2007 at 09:55:50AM +0900, Yoshimi Ichiyanagi wrote: How is this related to virtualization?> The problem is, if you compile x86_64 kernel, the value of > CONFIG_PHYSICAL_ALIGN will be fixed, and the next time you compile i386 > kernel, previous CONFIG_PHYSICAL_ALIGN value of x86_64(default: 2MB) will > be used by default.2/4MB is better for i386 too for PAE/non PAE because it will use less TLB entries. I guess it's better to just change the defaults. Anyways, both values should work, or did you see failures?> The follwing patch will fix this problem. With this patch, either > CONFIG_RELOCATABLE's option or CONFIG_EMNBEDDED's option is set "Y", > you can configure the value of CONFIG_PHYSICAL_ALIGN.How does that change anything? iirc what you want cannot be really expressed in Kconfig :- what you would really want is a flag for the number that says "this came from a default value and user hasn't changed it" and then Kconfig knowing that if the new default is different change it to new default. But I'm not sure such complexity would be really a good idea. Probably it's not. -Andi