crosvm/x86_64
Daniel Verkamp 050af40382 x86_64: support loading bzImage kernels
The current kernel loader expects an extracted ELF kernel; this adds
complexity to the build and test process for the guest kernel, since the
normal output of a Linux kernel build is a bzImage-format kernel.

bzImage also supports compressed kernels, which are smaller on disk and
potentially quicker to load, depending on disk and CPU speed.

Add support for loading of bzImage-format kernels, and use the 64-bit
boot protocol as described in the official Linux/x86 boot protocol:
https://www.kernel.org/doc/Documentation/x86/boot.txt

The existing ELF loader is kept for compatibility with shipping kernel
images; if a kernel image doesn't have the ELF signature, it is passed
to the bzImage loader as a fallback.

BUG=None
TEST=Boot bzImage and extracted ELF kernels on x86-64

Change-Id: I90be4cd597d15bc89e63f0f6cbc781c5c8c2eaeb
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1609969
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Zach Reizner <zachr@chromium.org>
2019-05-14 23:57:41 -07:00
..
src x86_64: support loading bzImage kernels 2019-05-14 23:57:41 -07:00
build.rs edition: Remove extern crate lines 2019-04-15 02:06:08 -07:00
Cargo.toml clippy: Resolve cast_ptr_alignment 2019-04-18 19:51:29 -07:00
host_cpuid.c x86_64: fill cache info in cpuid, stop spoofing CPU vendor id 2018-07-09 12:42:42 -07:00