Enum multiboot2::TagType

source ·
pub enum TagType {
Show 23 variants End, Cmdline, BootLoaderName, Module, BasicMeminfo, Bootdev, Mmap, Vbe, Framebuffer, ElfSections, Apm, Efi32, Efi64, Smbios, AcpiV1, AcpiV2, Network, EfiMmap, EfiBs, Efi32Ih, Efi64Ih, LoadBaseAddr, Custom(u32),
}
Expand description

Higher level abstraction for TagTypeId that assigns each possible value to a specific semantic according to the specification. Additionally, it allows to use the TagType::Custom variant. It is not binary compatible with TagTypeId.

Variants§

§

End

Tag 0: Marks the end of the tags.

§

Cmdline

Tag 1: Additional command line string. For example '' or '--my-custom-option foo --provided by_grub, if your GRUB config contains multiboot2 /boot/multiboot2-binary.elf --my-custom-option foo --provided by_grub

§

BootLoaderName

Tag 2: Name of the bootloader, e.g. ‘GRUB 2.04-1ubuntu44.2’

§

Module

Tag 3: Additional Multiboot modules, which are BLOBs provided in memory. For example an initial ram disk with essential drivers.

§

BasicMeminfo

Tag 4: ‘mem_lower’ and ‘mem_upper’ indicate the amount of lower and upper memory, respectively, in kilobytes. Lower memory starts at address 0, and upper memory starts at address 1 megabyte. The maximum possible value for lower memory is 640 kilobytes. 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.

This tag may not be provided by some boot loaders on EFI platforms if EFI boot services are enabled and available for the loaded image (EFI boot services not terminated tag exists in Multiboot2 information structure).

§

Bootdev

Tag 5: This tag 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 tag must not be present. The operating system may use this field as a hint for determining its own root device, but is not required to.

§

Mmap

Tag 6: Memory map. The map provided is guaranteed to list all standard RAM that should be available for normal use. This type however includes the regions occupied by kernel, mbi, segments and modules. Kernel must take care not to overwrite these regions.

This tag may not be provided by some boot loaders on EFI platforms if EFI boot services are enabled and available for the loaded image (EFI boot services not terminated tag exists in Multiboot2 information structure).

§

Vbe

Tag 7: Contains the VBE control information returned by the VBE Function 0x00 and VBE mode information returned by the VBE Function 0x01, respectively. Note that VBE 3.0 defines another protected mode interface which is incompatible with the old one. If you want to use the new protected mode interface, you will have to find the table yourself.

§

Framebuffer

Tag 8: Framebuffer.

§

ElfSections

Tag 9: This tag contains section header table from an ELF kernel, the size of each entry, number of entries, and the string table used as the index of names. They correspond to the shdr_* entries (shdr_num, etc.) in the Executable and Linkable Format (ELF) specification in the program header.

§

Apm

Tag 10: APM table. See Advanced Power Management (APM) BIOS Interface Specification, for more information.

§

Efi32

Tag 11: This tag contains pointer to i386 EFI system table.

§

Efi64

Tag 21: This tag contains pointer to amd64 EFI system table.

§

Smbios

Tag 13: This tag contains a copy of SMBIOS tables as well as their version.

§

AcpiV1

Tag 14: Also called “AcpiOld” in other multiboot2 implementations.

§

AcpiV2

Tag 15: Refers to version 2 and later of Acpi. Also called “AcpiNew” in other multiboot2 implementations.

§

Network

Tag 16: This tag contains network information in the format specified as DHCP. It may be either a real DHCP reply or just the configuration info in the same format. This tag appears once per card.

§

EfiMmap

Tag 17: This tag contains EFI memory map as per EFI specification. This tag may not be provided by some boot loaders on EFI platforms if EFI boot services are enabled and available for the loaded image (EFI boot services not terminated tag exists in Multiboot2 information structure).

§

EfiBs

Tag 18: This tag indicates ExitBootServices wasn’t called.

§

Efi32Ih

Tag 19: This tag contains pointer to EFI i386 image handle. Usually it is boot loader image handle.

§

Efi64Ih

Tag 20: This tag contains pointer to EFI amd64 image handle. Usually it is boot loader image handle.

§

LoadBaseAddr

Tag 21: This tag contains image load base physical address. The spec tells “It is provided only if image has relocatable header tag.” but experience showed that this is not true for at least GRUB 2.

§

Custom(u32)

Custom tag types > 21. The Multiboot2 spec doesn’t explicitly allow or disallow them. Bootloader and OS developers are free to use custom tags.

Implementations§

source§

impl TagType

source

pub fn val(&self) -> u32

Convenient wrapper to get the underlying u32 representation of the tag.

Trait Implementations§

source§

impl Clone for TagType

source§

fn clone(&self) -> TagType

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for TagType

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<TagType> for TagTypeId

source§

fn from(value: TagType) -> Self

Converts to this type from the input type.
source§

impl From<TagType> for u32

source§

fn from(value: TagType) -> Self

Converts to this type from the input type.
source§

impl From<TagTypeId> for TagType

source§

fn from(value: TagTypeId) -> Self

Converts to this type from the input type.
source§

impl From<u32> for TagType

source§

fn from(value: u32) -> Self

Converts to this type from the input type.
source§

impl Hash for TagType

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for TagType

source§

fn cmp(&self, other: &TagType) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<TagType> for TagType

source§

fn eq(&self, other: &TagType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TagType> for TagTypeId

source§

fn eq(&self, other: &TagType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TagType> for u32

source§

fn eq(&self, other: &TagType) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<TagTypeId> for TagType

source§

fn eq(&self, other: &TagTypeId) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u32> for TagType

source§

fn eq(&self, other: &u32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<TagType> for TagType

source§

fn partial_cmp(&self, other: &TagType) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for TagType

source§

impl Eq for TagType

source§

impl StructuralEq for TagType

source§

impl StructuralPartialEq for TagType

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Pointee for T

§

type Metadata = ()

The type for metadata in pointers and references to Self.
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.