ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_ftl_t Struct Reference

Caller-allocated FTL handle binding the wrapper to the raw device. More...

#include <ra8_ftl.h>

Collaboration diagram for ra8_ftl_t:

Data Fields

const ra8_io_blockdev_traw
 Underlying erase-before-write dev.
uint16_t * map
 logical->physical map (private).
ra8_ftl_pblock_tpblocks
 Per-physical metadata (private).
uint8_t * scratch
 512-byte copy scratch (private).
uint32_t logical_blocks
 Blocks presented to FAT (private).
uint32_t physical_blocks
 Blocks in the raw dev (private).
uint8_t erase_value
 Raw medium erase byte (private).

Detailed Description

Caller-allocated FTL handle binding the wrapper to the raw device.

Zero-initialise (= {}) and pass to ra8_ftl_init, which validates the underlying device, records the caller-provided storage, and prepares the cold-start mapping. Treat the fields as private; drive the FTL through the ra8_ftl_* functions and the block device produced by ra8_ftl_as_blockdev. The handle, the underlying device, and all caller storage must out-live every call made through them.

Invariant
logical_blocks < physical_blocks (at least one spare block).
map has logical_blocks entries; pblocks has physical_blocks entries.
Since
0.1.0

Definition at line 190 of file ra8_ftl.h.

Field Documentation

◆ erase_value

uint8_t ra8_ftl_t::erase_value

Raw medium erase byte (private).

Definition at line 197 of file ra8_ftl.h.

Referenced by internal_dev_get_caps(), internal_read_one(), and ra8_ftl_init().

◆ logical_blocks

◆ map

◆ pblocks

◆ physical_blocks

◆ raw

const ra8_io_blockdev_t* ra8_ftl_t::raw

◆ scratch

uint8_t* ra8_ftl_t::scratch

512-byte copy scratch (private).

Definition at line 194 of file ra8_ftl.h.

Referenced by internal_disjoint(), internal_native_window(), internal_ready(), internal_window_mark(), internal_wire_window(), and ra8_ftl_init().


The documentation for this struct was generated from the following file: