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

Dependency-injection vtable for the non-volatile version counter. More...

#include <ra8_dfu_antirollback.h>

Data Fields

ra8_rot_antirollback_read_fn_t read
 Read stored highest-accepted version.
ra8_rot_antirollback_commit_fn_t commit
 Persist the newly-accepted version.

Detailed Description

Dependency-injection vtable for the non-volatile version counter.

The single seam between the pure anti-rollback policy and the durable storage that backs the monotonic counter. Production wires the real OTP / data-flash accessors; host tests wire mocks. Both function pointers must be non-NULL for ra8_rot_antirollback_verify to proceed – a NULL member is a default-deny.

Invariant
read and commit are either both wired to a real backing or both report "not provisioned" (never one of each).
Example:
ra8_err_t err = ra8_rot_antirollback_verify(store, image_version);
const ra8_rot_antirollback_store_t * ra8_rot_antirollback_default_store(void)
Return the non-faking default store (reports "not provisioned").
ra8_err_t ra8_rot_antirollback_verify(const ra8_rot_antirollback_store_t *store, uint32_t image_version)
Read the stored minimum, apply the policy, and commit on accept.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Dependency-injection vtable for the non-volatile version counter.
See also
ra8_rot_antirollback_verify
ra8_rot_antirollback_default_store

Definition at line 148 of file ra8_dfu_antirollback.h.

Field Documentation

◆ commit

ra8_rot_antirollback_commit_fn_t ra8_rot_antirollback_store_t::commit

Persist the newly-accepted version.

Definition at line 150 of file ra8_dfu_antirollback.h.

◆ read

ra8_rot_antirollback_read_fn_t ra8_rot_antirollback_store_t::read

Read stored highest-accepted version.

Definition at line 149 of file ra8_dfu_antirollback.h.


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