#[repr(u32)]pub enum ZbiType {
Show 33 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,
}Expand description
All possible ZbiHeader.type values.
Variants§
Container = 1_414_483_778
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 ofZBI_ALIGNMENT_USIZE.extra: Must beZBI_CONTAINER_MAGIC.flags: Must beZbiFlags::VERSIONand no other flags.
KernelX64 = 1_280_201_291
x86-64 kernel. See ZbiKernel for a payload description.
KernelArm64 = 944_656_971
ARM64 kernel. See ZbiKernel for a payload description.
KernelRiscv64 = 1_447_973_451
RISC-V kernel. See ZbiKernel for a payload description.
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.
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.
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.
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 ZbiType::Kernel{ARCH} item image and its
StorageKernel item image are intimately tied and one cannot work
without the exact correct corresponding other.
StorageBootFsFactory = 1_179_862_594
Device-specific factory data, stored in BOOTFS format.
CmdLine = 1_279_544_643
A kernel command line fragment, a UTF-8 string that need not be
NULL-terminated. The kernel’s own option parsing accepts only printable
’ASCI’I and treats all other characters as equivalent to whitespace. Multiple
ZbiType::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.
CrashLog = 1_297_043_266
The crash log from the previous boot, a UTF-8 string.
Nvram = 1_280_071_246
Physical memory region that will persist across warm boots. See zbi_nvram_t
for payload description.
PlatformId = 1_145_654_352
Platform ID Information.
DrvBoardInfo = 1_230_193_261
Board-specific information.
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.
KernelDriver = 1_448_232_011
Kernel driver configuration. The ZbiHeader.extra field gives a
ZBI_KERNEL_DRIVER_* type that determines the payload format.
See <lib/zbi-format/driver-config.h> for details.
AcpiRsdp = 1_346_655_058
‘ACPI’ Root Table Pointer, a u64 physical address.
Smbios = 1_229_081_939
’SMBI’OS entry point, a u64 physical address.
EfiSystemTable = 1_397_311_045
EFI system table, a u64 physical address.
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).
FrameBuffer = 1_111_906_131
Framebuffer parameters, a zbi_swfb_t entry.
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.
BootVersion = 1_397_904_962
A copy of the boot version stored within the sysconfig partition
DrvMacAddress = 1_128_353_133
MAC address for Ethernet, Wifi, Bluetooth, etc. ZbiHeader.extra
is a board-specific index to specify which device the MAC address
applies to. ZbiHeader.length gives the size in bytes, which
varies depending on the type of address appropriate for the device.
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. ZbiHeader.extra
is a board-specific index to specify which device this applies to.
DrvBoardPrivate = 1_380_926_061
Private information for the board driver.
HwRebootReason = 1_112_692_552
Information about reboot
SerialNumber = 1_313_624_659
The serial number, an unterminated ASCII string of printable non-whitespace
characters with length ZbiHeader.length.
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)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 ZbiType::KernelDriver 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.
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.
Implementations§
Source§impl ZbiType
impl ZbiType
Sourcepub fn is_kernel(&self) -> bool
pub fn is_kernel(&self) -> bool
Checks if ZbiType is a Kernel type. (E.g. ZbiType::KernelX64)
assert!(ZbiType::KernelX64.is_kernel());Sourcepub fn is_driver_metadata(&self) -> bool
pub fn is_driver_metadata(&self) -> bool
Checks if ZbiType is a Driver Metadata type. (E.g. ZbiType::DrvBoardInfo)
assert!(ZbiType::DrvBoardInfo.is_driver_metadata());