o Relocatable bzImage support had got rid of CONFIG_PHYSICAL_START option thinking that now this option is not required as people can build a second kernel as relocatable and load it anywhere. So need of compiling the kernel for a custom address was gone. But Magnus uses vmlinux images for second kernel in Xen environment and he wants to continue to use it. o Restoring the CONFIG_PHYSICAL_START option for the time being. I think down the line we can get rid of it.
Unified · Split
| @@ -777,6 +777,47 @@ config CRASH_DUMP · 776 unmodified lines | ||
| 777 | 777 | PHYSICAL_START. |
| 778 | 778 | For more details see Documentation/kdump/kdump.txt |
| 779 | 779 | |
| 780 | +config PHYSICAL_START | |
| 781 | + hex "Physical address where the kernel is loaded" if (EMBEDDED || CRASH_DUMP) | |
| 782 | + default "0x100000" | |
| 783 | + help | |
| 784 | + This gives the physical address where the kernel is loaded. | |
| 785 | + | |
| 786 | + If kernel is a not relocatable (CONFIG_RELOCATABLE=n) then | |
| 787 | + bzImage will decompress itself to above physical address and | |
| 788 | + run from there. Otherwise, bzImage will run from the address where | |
| 789 | + it has been loaded by the boot loader and will ignore above physical | |
| 790 | + address. | |
| 791 | + | |
| 792 | + In normal kdump cases one does not have to set/change this option | |
| 793 | + as now bzImage can be compiled as a completely relocatable image | |
| 794 | + (CONFIG_RELOCATABLE=y) and be used to load and run from a different | |
| 795 | + address. This option is mainly useful for the folks who don't want | |
| 796 | + to use a bzImage for capturing the crash dump and want to use a | |
| 797 | + vmlinux instead. vmlinux is not relocatable hence a kernel needs | |
| 798 | + to be specifically compiled to run from a specific memory area | |
| 799 | + (normally a reserved region) and this option comes handy. | |
| 800 | + | |
| 801 | + So if you are using bzImage for capturing the crash dump, leave | |
| 802 | + the value here unchanged to 0x100000 and set CONFIG_RELOCATABLE=y. | |
| 803 | + Otherwise if you plan to use vmlinux for capturing the crash dump | |
| 804 | + change this value to start of the reserved region (Typically 16MB | |
| 805 | + 0x1000000). In other words, it can be set based on the "X" value as | |
| 806 | + specified in the "crashkernel=YM@XM" command line boot parameter | |
| 807 | + passed to the panic-ed kernel. Typically this parameter is set as | |
| 808 | + crashkernel=64M@16M. Please take a look at | |
| 809 | + Documentation/kdump/kdump.txt for more details about crash dumps. | |
| 810 | + | |
| 811 | + Usage of bzImage for capturing the crash dump is recommended as | |
| 812 | + one does not have to build two kernels. Same kernel can be used | |
| 813 | + as production kernel and capture kernel. Above option should have | |
| 814 | + gone away after relocatable bzImage support is introduced. But it | |
| 815 | + is present because there are users out there who continue to use | |
| 816 | + vmlinux for dump capture. This option should go away down the | |
| 817 | + line. | |
| 818 | + | |
| 819 | + Don't change this unless you know what you are doing. | |
| 820 | + | |
| 780 | 821 | config RELOCATABLE |
| 781 | 822 | bool "Build a relocatable kernel(EXPERIMENTAL)" |
| 782 | 823 | depends on EXPERIMENTAL |
| @@ -13,7 +13,8 @@ · 12 unmodified lines | ||
| 13 | 13 | #define ASK_VGA 0xfffd /* ask for it at bootup */ |
| 14 | 14 | |
| 15 | 15 | /* Physical address where kenrel should be loaded. */ |
| 16 | −#define LOAD_PHYSICAL_ADDR ((0x100000 + CONFIG_PHYSICAL_ALIGN - 1) \ | |
| 16 | +#define LOAD_PHYSICAL_ADDR ((CONFIG_PHYSICAL_START \ | |
| 17 | + + (CONFIG_PHYSICAL_ALIGN - 1)) \ | |
| 17 | 18 | & ~(CONFIG_PHYSICAL_ALIGN - 1)) |
| 18 | 19 | |
| 19 | 20 | #endif /* _LINUX_BOOT_H */ |