instead activate kernel in-place whenever the EFI boot env found a free chunk.
The advantages are that we:
- do not silently destroy EFI RT code/data or any other memory that BIOS still needs at runtime, if it happens to be located at 2M/kernel size.
- do not corrupt trampoline if it happens to be allocated at the location that is copied to
- the 1G 1:1 all over VA trick is eliminated, kernel and other loaded blobs can be located anywhere below 4G
- the AP startup is streamlined, AP now directly loads %cr3 with pointer to kernel page table without intermediate page, which removed the need to reserve low memory at early boot, and made startup compatible with the new boot scheme
The new kernel is compatbile with an old loader.
Loader code currently support both old and new handoff scheme. Loader automaticly detects supported handoff scheme for booting kernel. A new loader command copy_staging does that manually. Do copy_staging enable to switch loader into legacy mode, copy_staging disable sets new mode, 'auto' uses autodetected. Without argument, it prints current mode.