blob: 22c2b2690c0db48186963000c868abdb8c9b43f7 [file] [log] [blame]
// Copyright 2025 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@available(added=HEAD)
library fuchsia.boot.metadata;
using fuchsia.net;
/// Metadata containing the device's MAC address for Ethernet, Wifi, Bluetooth, etc.
@serializable
type MacAddressMetadata = table {
/// The MAC address as described in the Zircon Boot Image.
1: mac_address fuchsia.net.MacAddress;
};
const PARTITION_GUID_LEN uint64 = 16;
alias PartitionGuid = array<uint8, PARTITION_GUID_LEN>;
type Partition = struct {
/// GUID specifying the format and use of data stored in the partition.
type_guid PartitionGuid;
/// GUID unique to this partition.
unique_guid PartitionGuid;
/// First block occupied by this partition.
first_block uint64;
/// Last block occupied by this partition.
last_block uint64;
/// Reserved for future use. Set to 0.
flags uint64;
name string:<32>;
};
/// The partition map as described in the Zircon Boot Image.
@serializable
type PartitionMap = table {
/// Total blocks used on the device.
1: block_count uint64;
/// Size of each block in bytes.
2: block_size uint64;
/// Reserved for future use.
4: reserved uint32;
/// Device GUID.
5: guid PartitionGuid;
6: partitions vector<Partition>:MAX;
};
const SERIAL_NUMBER_LEN uint8 = 32;
/// Metadata containing the device's serial number.
@serializable
type SerialNumberMetadata = table {
/// The serial number as described in the Zircon Boot Image.
1: serial_number string:SERIAL_NUMBER_LEN;
};