Struct multiboot::Multiboot[][src]

pub struct Multiboot<'a, F: Fn(PAddr, usize) -> Option<&'a [u8]>> { /* fields omitted */ }

Multiboot struct clients mainly interact with To create this use Multiboot::new()

Methods

impl<'a, F: Fn(PAddr, usize) -> Option<&'a [u8]>> Multiboot<'a, F>
[src]

Multiboot structure.

Initializes the multiboot structure.

Arguments

  • mboot_ptr - The physical address of the multiboot header. On qemu for example this is typically at 0x9500.
  • paddr_to_slice - Translation of the physical addresses into kernel addresses.

paddr_to_slice translates physical addr + size into a kernel accessible slice. The simplest paddr_to_slice function would for example be just the identity function. But this may vary depending on how your page table layout looks like.

Safety

The user must ensure that mboot_ptr holds the physical address of a valid Multiboot1 structure and that paddr_to_slice provides correct translations.

Indicate the amount of lower memory in kilobytes.

Lower memory starts at address 0. The maximum possible value for lower memory is 640 kilobytes.

Indicate the amount of upper memory in kilobytes.

Upper memory starts at address 1 megabyte. The value returned for upper memory is maximally the address of the first upper memory hole minus 1 megabyte. It is not guaranteed to be this value.

Indicates which bios disk device the boot loader loaded the OS image from.

If the OS image was not loaded from a bios disk, then this returns None. The operating system may use this field as a hint for determining its own root device, but is not required to.

Command line to be passed to the kernel.

Discover all additional modules in multiboot.

Discover all memory regions in the multiboot memory map.

Auto Trait Implementations

impl<'a, F> Send for Multiboot<'a, F> where
    F: Send

impl<'a, F> Sync for Multiboot<'a, F> where
    F: Sync