fuchsia.hardware.skipblock

PROTOCOLS

SkipBlock

Defined in fuchsia.hardware.skipblock/skip-block.fidl

GetPartitionInfo

Returns information about the skip-block partition.

The block count can shrink in the event that a bad block is grown. It is recommended to call this again after a bad block is grown.

Request

NameType

Response

NameType
status zx/status
partition_info PartitionInfo

Read

Reads the specified blocks into the provided vmo.

Request

NameType
op ReadWriteOperation

Response

NameType
status zx/status

Write

Erases and writes the specified blocks from the provided vmo.

In the event that bad block is grown, the partition will shrink and bad_block_grown will be set to true. Since this causes the logical to physical block map to change, all previously written blocks at logical addresses after the section being written should be considered corrupted, and rewritten if applicable.

Request

NameType
op ReadWriteOperation

Response

NameType
status zx/status
bad_block_grown bool

WriteBytes

Erases and writes the specified bytes from the provided vmo. If offset and size in |op| are not aligned to |block_size_bytes| then the driver will first read the partitially written blocks and combine them with the provided vmo.

In the event that bad block is grown, the partition will shrink and bad_block_grown will be set to true. Since this causes the logical to physical block map to change, all previously written blocks at logical addresses after the section being written should be considered corrupted, and rewritten if applicable.

Request

NameType
op WriteBytesOperation

Response

NameType
status zx/status
bad_block_grown bool

STRUCTS

PartitionInfo

Defined in fuchsia.hardware.skipblock/skip-block.fidl

NameTypeDescriptionDefault
partition_guid uint8[16]

Partition type GUID.

No default
block_size_bytes uint64

Describes the read/write size.

No default
partition_block_count uint32

Describes size of partition in terms of blocks.

No default

ReadWriteOperation

Defined in fuchsia.hardware.skipblock/skip-block.fidl

NameTypeDescriptionDefault
vmo handle<vmo>

Memory object describing buffer to read into or write from.

No default
vmo_offset uint64

VMO offset in bytes.

No default
block uint32

Block # to begin operation from.

No default
block_count uint32

Number of blocks to read or write.

No default

WriteBytesOperation

Defined in fuchsia.hardware.skipblock/skip-block.fidl

NameTypeDescriptionDefault
vmo handle<vmo>

Memory object describing buffer to write from.

No default
vmo_offset uint64

VMO offset in bytes.

No default
offset uint64

Device offset in bytes to begin operation from. Must be flash page aligned.

No default
size uint64

Number of bytes to write. Must be flash page aligned.

No default

CONSTANTS

NameValueTypeDescription
GUID_LEN 16 uint32