Skip to main content

load_x86

Function load_x86 

Source
pub fn load_x86<F>(
    importer: &mut impl ImageLoad<X86Register>,
    kernel_image: &mut F,
    kernel_minimum_start_address: u64,
    initrd: Option<InitrdConfig<'_>>,
    command_line: CommandLineConfig<'_>,
    zero_page: ZeroPageConfig<'_>,
    acpi: AcpiConfig<'_>,
    registers: RegisterConfig,
) -> Result<LoadInfo, Error>
where F: Read + Seek,
Expand description

Load a Linux kernel into VTL0.

The kernel image may be either an uncompressed ELF (vmlinux) or a compressed bzImage. If a bzImage is detected, its protected-mode code is loaded directly into guest memory and the kernel’s built-in decompressor handles the rest at boot time.

§Arguments

  • importer - The importer to use.
  • kernel_image - Kernel image (uncompressed ELF or bzImage).
  • kernel_minimum_start_address - The minimum address the kernel can load at. It cannot contain an entrypoint or program headers that refer to memory below this address.
  • initrd - The initrd config, optional.
  • command_line - The kernel command line.
  • zero_page - The kernel zero page.
  • acpi - The acpi config.
  • registers - X86Register config.