Function ostd::boot::register_boot_init_callbacks
source ยท pub fn register_boot_init_callbacks(
bootloader_name: fn(_: &'static Once<String>),
kernel_cmdline: fn(_: &'static Once<KCmdlineArg>),
initramfs: fn(_: &'static Once<&'static [u8]>),
acpi_arg: fn(_: &'static Once<BootloaderAcpiArg>),
framebuffer_arg: fn(_: &'static Once<BootloaderFramebufferArg>),
memory_regions: fn(_: &'static Once<Vec<MemoryRegion>>),
)Expand description
The macro generated boot init callbacks registering interface.
For the introduction of a new boot protocol, the entry point could be a novel
one. The entry point function should register all the boot initialization
methods before ostd::main is called. A boot initialization method takes a
reference of the global static boot information variable and initialize it,
so that the boot information it represents could be accessed in the kernel
anywhere.
The reason why the entry point function is not designed to directly initialize the boot information variables is simply that the heap is not initialized at that moment.