|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
NSC veneer: external XSPI flash read + status. More...
#include <stdint.h>#include "ra8_check.h"#include "ra8_err.h"#include "ra8_nsc.h"#include "ra8_nsc_veneer.h"#include "ra8_xspi.h"Go to the source code of this file.
Enumerations | |
| enum | ra8_nsc_xspi_instance_t : uint8_t { k_ra8_nsc_xspi_instance = 0U } |
Functions | |
| ra8_err_t | ra8_nsc_xspi_read (uint32_t flash_off, uint8_t *ns_dst, uint32_t len) |
| NSC veneer: read len bytes from external XSPI flash. | |
| ra8_err_t | ra8_nsc_xspi_status (uint8_t instance, uint32_t *out_mask) |
| NSC veneer: query secure-side XSPI status. | |
Variables | |
| static const char * | s_tag = "NSCXSPI" |
NSC veneer: external XSPI flash read + status.
veneer over the secure-side ra8_xspi driver. Runs as ordinary code in the single-world build; the RA8_NSC_VENEER attribute expands to __attribute__((cmse_nonsecure_entry)) when the TrustZone build is turned on, and the RA8_NSC_CHECK_NS_RANGE_RW macro becomes a real cmse_check_address_range at that point too.
Definition in file ra8_nsc_xspi.c.
| enum ra8_nsc_xspi_instance_t : uint8_t |
| Enumerator | |
|---|---|
| k_ra8_nsc_xspi_instance | Only one xspi instance today. |
Definition at line 31 of file ra8_nsc_xspi.c.
|
nodiscard |
NSC veneer: read len bytes from external XSPI flash.
Validates len is in (0, k_ra8_nsc_xspi_max_read] and that the NS destination buffer is in writable NS memory, then forwards to ra8_xspi_flash_read for the single configured instance.
| [in] | flash_off | Byte offset into XSPI flash. |
| [out] | ns_dst | Non-Secure destination buffer. |
| [in] | len | Bytes to read; 1..k_ra8_nsc_xspi_max_read. |
| k_ra8_ok | Bytes copied to ns_dst. |
| k_ra8_err_null_ptr | ns_dst was NULL. |
| k_ra8_err_invalid_arg | len zero / too large or range outside NS. |
Definition at line 64 of file ra8_nsc_xspi.c.
References k_ra8_err_invalid_arg, k_ra8_nsc_xspi_instance, k_ra8_nsc_xspi_max_read, RA8_CHECK_NULL_PTR, RA8_NSC_CHECK_NS_RANGE_RW, RA8_NSC_VENEER, ra8_xspi_flash_read(), and s_tag.
|
nodiscard |
NSC veneer: query secure-side XSPI status.
Range-checks out_mask in NS memory and forwards to ra8_xspi_get_status.
| [in] | instance | XSPI instance index. |
| [out] | out_mask | NS destination for the status mask. |
| k_ra8_ok | Status copied to *out_mask. |
| k_ra8_err_null_ptr | out_mask was NULL. |
| k_ra8_err_invalid_arg | Range outside NS region or bad instance. |
Definition at line 100 of file ra8_nsc_xspi.c.
References RA8_CHECK_NULL_PTR, RA8_NSC_CHECK_NS_RANGE_RW, RA8_NSC_VENEER, ra8_xspi_get_status(), and s_tag.
|
static |
Definition at line 29 of file ra8_nsc_xspi.c.