fn load_bootshim_and_handoff(
loader: &mut IgvmLoader<X86Register>,
resources: &Resources,
linux_entry: u64,
linux_zero_page: u64,
memory_page_count: u64,
kernel_runtime_end: u64,
) -> Result<Vec<SnpBootShimRange>>Expand description
Places the bootshim and its measured handoff page.
The Linux loader first imports the kernel, initrd, boot metadata, and SNP special pages. The bootshim is placed at the first page after both those imports and the kernel’s runtime image. Its parameter page follows the bootshim. The BSP starts at the bootshim entry point with RSI pointing to that parameter page.
The parameter page lists every gap in configured RAM that has no measured page-data directive. The bootshim makes those pages private, validates them, and then enters Linux with RSI restored to the Linux zero page.