Enum fidl_data_zbi::Type

source ·
#[repr(u32)]
pub enum Type {
Show 34 variants Container = 1_414_483_778, KernelX64 = 1_280_201_291, KernelArm64 = 944_656_971, KernelRiscv64 = 1_447_973_451, Discard = 1_346_980_691, StorageRamdisk = 1_263_748_178, StorageBootfs = 1_112_753_730, StorageKernel = 1_381_258_059, StorageBootfsFactory = 1_179_862_594, Cmdline = 1_279_544_643, Crashlog = 1_297_043_266, Nvram = 1_280_071_246, PlatformId = 1_145_654_352, DrvBoardInfo = 1_230_193_261, CpuTopology = 1_129_338_163, MemConfig = 1_129_137_485, KernelDriver = 1_448_232_011, AcpiRsdp = 1_346_655_058, Smbios = 1_229_081_939, EfiSystemTable = 1_397_311_045, EfiMemoryAttributesTable = 1_413_565_765, Framebuffer = 1_111_906_131, ImageArgs = 1_196_573_001, BootVersion = 1_397_904_962, DrvMacAddress = 1_128_353_133, DrvPartitionMap = 1_414_680_685, DrvBoardPrivate = 1_380_926_061, HwRebootReason = 1_112_692_552, SerialNumber = 1_313_624_659, BootloaderFile = 1_279_677_506, Devicetree = 3_490_578_157, SecureEntropy = 1_145_979_218, Debugdata = 1_145_520_708, Riscv64IsaStrtab = 1_095_977_302,
}

Variants§

§

Container = 1_414_483_778

‘BOOT’

Each ZBI starts with a container header. length: Total size of the image after this header. This includes all item headers, payloads, and padding. It does not include the container header itself. Must be a multiple of ZBI_ALIGNMENT. extra: Must be ZBI_CONTAINER_MAGIC. flags: Must be ZBI_FLAGS_VERSION and no other flags.

§

KernelX64 = 1_280_201_291

x86-64 kernel. See zbi_kernel_t for a payload description.

‘KRNL’

§

KernelArm64 = 944_656_971

ARM64 kernel. See zbi_kernel_t for a payload description.

KRN8

§

KernelRiscv64 = 1_447_973_451

RISC-V kernel. See zbi_kernel_t for a payload description.

‘KRNV’

§

Discard = 1_346_980_691

A discarded item that should just be ignored. This is used for an item that was already processed and should be ignored by whatever stage is now looking at the ZBI. An earlier stage already “consumed” this information, but avoided copying data around to remove it from the ZBI item stream.

‘SKIP’

§

StorageRamdisk = 1_263_748_178

A virtual disk image. This is meant to be treated as if it were a storage device. The payload (after decompression) is the contents of the storage device, in whatever format that might be.

‘RDSK’

§

StorageBootfs = 1_112_753_730

The /boot filesystem in BOOTFS format, specified in <lib/zbi-format/internal/bootfs.h>. This represents an internal contract between Zircon userboot (//docs/userboot.md), which handles the contents of this filesystem, and platform tooling, which prepares them.

‘BFSB’

§

StorageKernel = 1_381_258_059

Storage used by the kernel (such as a compressed image containing the actual kernel). The meaning and format of the data is specific to the kernel, though it always uses the standard (private) storage compression protocol. Each particular KERNEL_{ARCH} item image and its STORAGE_KERNEL item image are intimately tied and one cannot work without the exact correct corresponding other.

‘KSTR’

§

StorageBootfsFactory = 1_179_862_594

Device-specific factory data, stored in BOOTFS format.

TODO(https://fxbug.dev/42109921): This should not use the “STORAGE” infix.

‘BFSF’

§

Cmdline = 1_279_544_643

A kernel command line fragment, a UTF-8 string that need not be NUL-terminated. The kernel’s own option parsing accepts only printable ’ASCI’I and treats all other characters as equivalent to whitespace. Multiple ZBI_TYPE_CMDLINE items can appear. They are treated as if concatenated with ’ ’ between each item, in the order they appear: first items in the bootable ZBI containing the kernel; then items in the ZBI synthesized by the boot loader. The kernel interprets the whole command line.

‘CMDL’

§

Crashlog = 1_297_043_266

The crash log from the previous boot, a UTF-8 string.

‘BOOM’

§

Nvram = 1_280_071_246

Physical memory region that will persist across warm boots. See zbi_nvram_t for payload description.

‘NVLL’

§

PlatformId = 1_145_654_352

Platform ID Information.

‘PLID’

§

DrvBoardInfo = 1_230_193_261

Board-specific information.

mBSI

§

CpuTopology = 1_129_338_163

CPU configuration. See zbi_topology_node_t for a description of the payload.

§

MemConfig = 1_129_137_485

Device memory configuration. See zbi_mem_range_t for a description of the payload.

‘MEMC’

§

KernelDriver = 1_448_232_011

Kernel driver configuration. The zbi_header_t.extra field gives a ZBI_KERNEL_DRIVER_* type that determines the payload format. See <lib/zbi-format/driver-config.h> for details.

‘KDRV’

§

AcpiRsdp = 1_346_655_058

‘ACPI’ Root Table Pointer, a uint64_t physical address.

‘RSDP’

§

Smbios = 1_229_081_939

‘SMBI’

’SMBI’OS entry point, a uint64_t physical address.

§

EfiSystemTable = 1_397_311_045

EFI system table, a uint64_t physical address.

‘EFIS’

§

EfiMemoryAttributesTable = 1_413_565_765

EFI memory attributes table. An example of this format can be found in UEFI 2.10 section 4.6.4, but the consumer of this item is responsible for interpreting whatever the bootloader supplies (in particular the “version” field may differ as the format evolves).

‘EMAT’

§

Framebuffer = 1_111_906_131

Framebuffer parameters, a zbi_swfb_t entry.

‘SWFB’

§

ImageArgs = 1_196_573_001

The image arguments, data is a trivial text format of one “key=value” per line with leading whitespace stripped and “#” comment lines and blank lines ignored. It is processed by bootsvc and parsed args are shared to others via Arguments service. TODO: the format can be streamlined after the /config/additional_boot_args compat support is removed.

‘IARG’

§

BootVersion = 1_397_904_962

A copy of the boot version stored within the sysconfig partition

‘BVRS’

§

DrvMacAddress = 1_128_353_133

MAC address for Ethernet, Wifi, Bluetooth, etc. zbi_header_t.extra is a board-specific index to specify which device the MAC address applies to. zbi_header_t.length gives the size in bytes, which varies depending on the type of address appropriate for the device.

mMAC

§

DrvPartitionMap = 1_414_680_685

A partition map for a storage device, a zbi_partition_map_t header followed by one or more zbi_partition_t entries. zbi_header_t.extra is a board-specific index to specify which device this applies to.

mPRT

§

DrvBoardPrivate = 1_380_926_061

Private information for the board driver.

mBOR

§

HwRebootReason = 1_112_692_552

‘HWRB’

§

SerialNumber = 1_313_624_659

The serial number, an unterminated ASCII string of printable non-whitespace characters with length zbi_header_t.length.

‘SRLN’

§

BootloaderFile = 1_279_677_506

This type specifies a binary file passed in by the bootloader. The first byte specifies the length of the filename without a NUL terminator. The filename starts on the second byte. The file contents are located immediately after the filename.

Layout: | name_len | name | payload ^(1 byte) ^(name_len bytes) ^(length of file)

‘BTFL’

§

Devicetree = 3_490_578_157

The devicetree blob from the legacy boot loader, if any. This is used only for diagnostic and development purposes. Zircon kernel and driver configuration is entirely driven by specific ZBI items from the boot loader. The boot shims for legacy boot loaders pass the raw devicetree along for development purposes, but extract information from it to populate specific ZBI items such as ZBI_TYPE_KERNEL_DRIVER et al.

§

SecureEntropy = 1_145_979_218

An arbitrary number of random bytes attested to have high entropy. Any number of items of any size can be provided, but no data should be provided that is not true entropy of cryptographic quality. This is used to seed secure cryptographic pseudo-random number generators.

‘RAND’

§

Debugdata = 1_145_520_708

This provides a data dump and associated logging from a boot loader, shim, or earlier incarnation that wants its data percolated up by the booting Zircon kernel. See zbi_debugdata_t for a description of the payload.

‘DBGD’

§

Riscv64IsaStrtab = 1_095_977_302

Each RISC-V hart has an associated “ISA string” encoding its supported extensions: see Chapter 27 (ISA Extension Naming Conventions) in https://riscv.org/wp-content/uploads/2019/12/riscv-spec-20191213.pdf. This item gives the NUL-separated (and -terminated) concatenation of all such strings in the system.

The first character of the table must be NUL; that is, the first entry in the table must be the empty and invalid, which is pointed to by a default-constructructed index. Beyond that, there are no guarantees to order the strings in the table or the extent of their (de)duplication.

A given hart’s index into the table is encoded within its associated node structure in the ZBI_TYPE_CPU_TOPOLOGY item.

‘VISA’

Trait Implementations§

source§

impl Clone for Type

source§

fn clone(&self) -> Type

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 Type

source§

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

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

impl PartialEq for Type

source§

fn eq(&self, other: &Type) -> 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 Copy for Type

source§

impl Eq for Type

source§

impl IntoBytes for Type

source§

impl StructuralPartialEq for Type

Auto Trait Implementations§

§

impl Freeze for Type

§

impl RefUnwindSafe for Type

§

impl Send for Type

§

impl Sync for Type

§

impl Unpin for Type

§

impl UnwindSafe for Type

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> CloneToUninit for T
where T: Copy,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. 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 T
where 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> ToOwned for T
where 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 T
where 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 T
where 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.