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

Caller-owned store handle. More...

#include <ra8_cache_store.h>

Collaboration diagram for ra8_cache_store_t:

Data Fields

struct LX_NOR_FLASH_STRUCT * flash
 LevelX control block (borrowed).
ra8_cache_store_entry_tindex
 Caller-owned index slot array.
uint8_t * staging
 Caller-owned >=1-sector scratch.
uint16_t index_cap
 Number of index slots.
uint16_t checkpoint_dirs
 Directory sectors for the checkpoint.
uint32_t logical_sectors
 Usable LevelX logical-sector span.
uint32_t log_start
 First append-log sector.
uint32_t data_capacity
 Overprovisioned live-sector budget.
uint32_t live_sectors
 Sectors currently held by live entries.
uint32_t next_seq
 Monotonic append sequence number.
uint8_t flash_state
 RAM shadow of sector 0 (dirty/clean).
bool inited
 True between init and close.

Detailed Description

Caller-owned store handle.

Treat every field as private.

Zero-initialise (= {}) and pass to ra8_cache_store_init. The handle out-lives every call and every ra8_cache_store_reader_t derived from it.

Invariant
log_start < logical_sectors after a successful init.
Since
0.1.0

Definition at line 156 of file ra8_cache_store.h.

Field Documentation

◆ checkpoint_dirs

uint16_t ra8_cache_store_t::checkpoint_dirs

Directory sectors for the checkpoint.

Definition at line 161 of file ra8_cache_store.h.

Referenced by internal_dir_load(), internal_geometry(), and priv_cache_store_dir_save().

◆ data_capacity

uint32_t ra8_cache_store_t::data_capacity

Overprovisioned live-sector budget.

Definition at line 164 of file ra8_cache_store.h.

Referenced by internal_geometry(), internal_put_check(), and priv_cache_store_super_write().

◆ flash

struct LX_NOR_FLASH_STRUCT* ra8_cache_store_t::flash

◆ flash_state

uint8_t ra8_cache_store_t::flash_state

RAM shadow of sector 0 (dirty/clean).

Definition at line 167 of file ra8_cache_store.h.

Referenced by internal_checkpoint(), internal_mark_dirty(), and internal_recover().

◆ index

◆ index_cap

◆ inited

◆ live_sectors

◆ log_start

uint32_t ra8_cache_store_t::log_start

First append-log sector.

Definition at line 163 of file ra8_cache_store.h.

Referenced by internal_alloc_run(), internal_geometry(), internal_scan_log(), and priv_cache_store_super_write().

◆ logical_sectors

uint32_t ra8_cache_store_t::logical_sectors

Usable LevelX logical-sector span.

Definition at line 162 of file ra8_cache_store.h.

Referenced by internal_alloc_run(), internal_geometry(), internal_hdr_read(), internal_scan_log(), and priv_cache_store_super_write().

◆ next_seq

uint32_t ra8_cache_store_t::next_seq

Monotonic append sequence number.

Definition at line 166 of file ra8_cache_store.h.

Referenced by internal_init_fields(), internal_recover(), internal_scan_log(), priv_cache_store_super_write(), and ra8_cache_store_put().

◆ staging


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