Skip to content

RFC x86_64: Relocatable bzImage Support (V2)

Vivek Goyal lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest16 patches 31 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16x86_64: Align data segment to page size boundaryarch/x86_64/kernel/vmlinux.lds.S+1 -00 replies
2/16x86_64: Assembly safe page.h and pgtable.hinclude/asm-x86_64/const.h include/asm-x86_64/page.h include/asm-x86_64/pgtable.h+54 -335 replies
3/16x86_64: Kill temp_boot_pmdsarch/x86_64/kernel/head.S arch/x86_64/mm/init.c+45 -580 replies
4/16x86_64: Clean up the early boot page tablearch/x86_64/kernel/head.S include/asm-x86_64/pgtable.h+28 -340 replies
5/16x86_64: Fix earlyprintk to use standard ISA mappingarch/x86_64/kernel/early_printk.c+1 -20 replies
6/16x86_64: Modify copy_bootdata to to use virtual addressarch/x86_64/kernel/head64.c+8 -90 replies
7/16x86_64: cleanup segmentsarch/x86_64/kernel/head.S include/asm-x86_64/segment.h+7 -70 replies
8/16x86_64: Add EFER to the set registers saved by save_processor_statearch/x86_64/kernel/suspend.c include/asm-x86_64/suspend.h+3 -10 replies
9/16x86_64: 64bit PIC SMP trampolinearch/x86_64/kernel/head.S arch/x86_64/kernel/setup.c arch/x86_64/kernel/trampoline.S+156 -221 reply
10/16x86_64: 64bit PIC ACPI wakeuparch/x86_64/kernel/acpi/sleep.c arch/x86_64/kernel/acpi/wakeup.S arch/x86_64/kernel/head.S +1 more+153 -21628 replies
11/16x86_64: Modify discover_ebda to use virtual addressarch/x86_64/kernel/setup.c+2 -20 replies
12/16x86_64: Remove the identity mapping as early as possiblearch/x86_64/kernel/head.S arch/x86_64/kernel/head64.c arch/x86_64/kernel/setup.c +4 more+24 -610 replies
13/16x86_64: __pa and __pa_symbol address space separationarch/i386/kernel/alternative.c arch/i386/mm/init.c arch/x86_64/kernel/machine_kexec.c +7 more+58 -480 replies
14/16x86_64: Remove CONFIG_PHYSICAL_STARTarch/x86_64/Kconfig arch/x86_64/boot/compressed/head.S arch/x86_64/boot/compressed/misc.c +4 more+9 -310 replies
15/16x86_64: Relocatable kernel supportarch/x86_64/boot/compressed/Makefile arch/x86_64/boot/compressed/head.S arch/x86_64/boot/compressed/misc.c +4 more+532 -3180 replies
16/16x86_64: Extend bzImage protocol for relocatable bzImagearch/x86_64/boot/setup.S+7 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 0/16] x86_64: Relocatable bzImage Support (V2)

Hi All,

Eric Biederman implemented the relocatable bzImage for x86_64 and posted patches for comments quite some time back.

http://marc.theaimsgroup.com/?l=linux-kernel&m=115443019026302&w=2

We have been testing the patches in RHEL kernels since then and things are looking up. I think this is the time that patches can be included in -mm and get more testing done and get rest of the issues sorted out.

Eric is currently held up with other things, so I have taken his patches and forward ported to 2.6.19-rc5-git2. Did few cleanups and fixed few bugs as faced in our testing. I have also accomodated the review comments received last time.

These changes make a bzImage and vmlinux relocatable hence kernel can be loaded at and run from a non-1MB location. These changes are especially useful for kdump where a single kernel can be used both as production kernel and dump capture kernel hence making the life easier both for distros and developers.

Following is a brief account of changes I have done since patches were posted last time.

- Forward ported the changes to latest kernel.
- Extended bzImage protocol to handle relocatable kernel
- Dropped support for elf bzImage
- Dropped support for the serial debugging in decompressor code.
- Fixed a bug related to memory hotplug.
- Fixed a bug related to setting NX bit (Thanks to larry woodman)
- Fixed a bug regarding jumping to secondary_startup_64 instead of assuming that align fills empty space with "nop".
- Fixed a bug regarding phys_base being put in initdata section.
- Fixed a but where bss was not being zeroed properly
- Reverted the change back to cotinue to compile the kernel for 2MB so that loaders loading vmlinux directly are not broken.
- Aligned data segment to 4K boundary to make kexec using vmlinux work.
- Tested to patch for making sure suspend/resume to/from memory is working. (Required due to ACPI wake up code changes)

Your comments/suggestions are welcome.

Thanks
Vivek