blob: 6941047725920fe8044239a5e3ef3a4e06ad1fe7 [file] [log] [blame]
// Copyright 2021 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.
library fuchsia.hardware.nandinfo;
// Matches the value of ZBI_PARTITION_GUID_LEN.
const NAND_GUID_LEN uint32 = 16;
type NandClass = strict enum : uint32 {
UNKNOWN = 0; // Unknown device.
PARTMAP = 1; // NAND device contains multiple partitions.
FTL = 2; // NAND device is a FTL partition.
BBS = 3; // NAND device is a bad block skip partition.
TEST = 4; // Test device.
/// NAND device contains an Intel flash descriptor.
INTEL_FLASH_DESCRIPTOR = 5;
};
type NandInfo = struct {
page_size uint32; // Read/write unit size, in bytes.
pages_per_block uint32; // Erase block size, in pages.
num_blocks uint32; // Device size, in erase blocks.
ecc_bits uint32; // Number of ECC bits (correctable bit flips),
// per correction chunk.
oob_size uint32; // Available out of band bytes per page.
nand_class NandClass; // The device purpose.
partition_guid array<uint8, NAND_GUID_LEN>; // Partition type GUID from partition map.
};