ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_dfu_antirollback.h
Go to the documentation of this file.
1
69
70#pragma once
71
72#ifdef __cplusplus
73extern "C" {
74#endif
75
76#include <stdint.h>
77
78#include "ra8_err.h"
79
101typedef ra8_err_t (*ra8_rot_antirollback_read_fn_t)(uint32_t* out_min_version);
102
123typedef ra8_err_t (*ra8_rot_antirollback_commit_fn_t)(uint32_t new_version);
124
152
182[[nodiscard]] ra8_err_t ra8_rot_antirollback_check(uint32_t image_version,
183 uint32_t stored_min_version);
184
218 uint32_t image_version);
219
244
276bool ra8_rot_antirollback_on_probe_fault(uint32_t* exc_frame);
277
278#ifdef __cplusplus
279}
280#endif
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.
bool ra8_rot_antirollback_on_probe_fault(uint32_t *exc_frame)
Recover a fault-tolerant counter probe from the app fault handler.
ra8_err_t(* ra8_rot_antirollback_read_fn_t)(uint32_t *out_min_version)
Read the stored highest-accepted image version (DI seam).
ra8_err_t(* ra8_rot_antirollback_commit_fn_t)(uint32_t new_version)
Durably advance the stored highest-accepted image version (DI seam).
ra8_err_t ra8_rot_antirollback_check(uint32_t image_version, uint32_t stored_min_version)
Pure downgrade policy: accept iff the image is not older than stored.
Error Code Definitions for ra8-firmware.
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.
ra8_rot_antirollback_read_fn_t read
Read stored highest-accepted version.
ra8_rot_antirollback_commit_fn_t commit
Persist the newly-accepted version.