mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-08-20 15:01:16 +00:00
arch: x86: Always set the bootloader type
We set it to 0xff, which is for unregistered loaders. The kernel checks that the bootloader ID is set when e.g. loading ramdisks, so not setting it when we get a bootparams header from the loader will prevent the kernel from loading ramdisks. Fixes: #918 Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
ad354700c9
commit
9cf67d133f
@ -307,13 +307,15 @@ fn configure_64bit_boot(
|
|||||||
// We should use the header if the loader provides one (e.g. from a bzImage).
|
// We should use the header if the loader provides one (e.g. from a bzImage).
|
||||||
params.0.hdr = hdr;
|
params.0.hdr = hdr;
|
||||||
} else {
|
} else {
|
||||||
params.0.hdr.type_of_loader = KERNEL_LOADER_OTHER;
|
|
||||||
params.0.hdr.boot_flag = KERNEL_BOOT_FLAG_MAGIC;
|
params.0.hdr.boot_flag = KERNEL_BOOT_FLAG_MAGIC;
|
||||||
params.0.hdr.header = KERNEL_HDR_MAGIC;
|
params.0.hdr.header = KERNEL_HDR_MAGIC;
|
||||||
params.0.hdr.kernel_alignment = KERNEL_MIN_ALIGNMENT_BYTES;
|
params.0.hdr.kernel_alignment = KERNEL_MIN_ALIGNMENT_BYTES;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Common bootparams settings
|
// Common bootparams settings
|
||||||
|
if params.0.hdr.type_of_loader == 0 {
|
||||||
|
params.0.hdr.type_of_loader = KERNEL_LOADER_OTHER;
|
||||||
|
}
|
||||||
params.0.hdr.cmd_line_ptr = cmdline_addr.raw_value() as u32;
|
params.0.hdr.cmd_line_ptr = cmdline_addr.raw_value() as u32;
|
||||||
params.0.hdr.cmdline_size = cmdline_size as u32;
|
params.0.hdr.cmdline_size = cmdline_size as u32;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user