bootloader_x86_64_common

Function create_boot_info

Source
pub fn create_boot_info<I, D>(
    config: &BootloaderConfig,
    boot_config: &BootConfig,
    frame_allocator: LegacyFrameAllocator<I, D>,
    page_tables: &mut PageTables,
    mappings: &mut Mappings,
    system_info: SystemInfo,
) -> &'static mut BootInfo
where I: ExactSizeIterator<Item = D> + Clone, D: LegacyMemoryRegion,
Expand description

Allocates and initializes the boot info struct and the memory map.

The boot info and memory map are mapped to both the kernel and bootloader address space at the same address. This makes it possible to return a Rust reference that is valid in both address spaces. The necessary physical frames are taken from the given frame_allocator.