|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
NSC veneers: OTA bank-commit + flash-bank-config write. More...
#include <stdint.h>#include "ota_commit.h"#include "ra8_err.h"#include "ra8_nsc.h"#include "ra8_nsc_veneer.h"Go to the source code of this file.
Functions | |
| ra8_err_t | ra8_nsc_ota_commit (uint8_t target_bank) |
| NSC veneer: persist an OTA bank-swap commit. | |
| ra8_err_t | ra8_nsc_flash_bank_config (uint32_t raw_value) |
| NSC veneer: write the flash bank-config word. | |
NSC veneers: OTA bank-commit + flash-bank-config write.
The two veneers in this TU bridge the NS-side OTA agent into the secure-only privileged operations:
No pointers cross the boundary, so no NS-region range check is needed in these veneers.
Definition in file ra8_nsc_ota.c.
|
nodiscard |
NSC veneer: write the flash bank-config word.
Forwards the 32-bit raw value through ra8_ota_commit_set_bank_config which masks it down to the allowed bits inside the secure world. The veneer's value is in labelling the operation as crossing the security boundary, so static analysis can flag NS-side callers.
| [in] | raw_value | Caller-supplied bank-config word. |
| k_ra8_ok | Bank-config word latched (after secure mask). |
| k_ra8_err_invalid_arg | Secure side rejected the value. |
Definition at line 89 of file ra8_nsc_ota.c.
References RA8_NSC_VENEER, and ra8_ota_commit_set_bank_config().
|
nodiscard |
NSC veneer: persist an OTA bank-swap commit.
NSC veneer: commit OTA target bank as the boot bank.
Validates target_bank and forwards to ra8_ota_commit_swap_bank in the secure world.
| [in] | target_bank | Bank to boot from (k_ra8_ota_bank_a/b). |
| k_ra8_ok | Bank-swap latched. |
| k_ra8_err_invalid_arg | Unknown bank index. |
Definition at line 52 of file ra8_nsc_ota.c.
References k_ra8_err_invalid_arg, k_ra8_ota_bank_a, k_ra8_ota_bank_b, RA8_NSC_VENEER, and ra8_ota_commit_swap_bank().