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

src/-local shared surface for the SRAM HAL driver split. More...

#include "ra8_sram.h"
#include "ra8_sram_regs.h"
Include dependency graph for ra8_sram_internal.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Variables

ra8_sram_error_fn_t g_sram_on_error
 Registered global ECC error callback (NULL until attach).
void * g_sram_on_error_ctx
 Caller context forwarded to g_sram_on_error.
ra8_sram_error_fn_t g_sram_on_error_bank [k_ra8_sram_bank_count]
 Per-bank ECC error callback table (NULL until attach).
void * g_sram_on_error_bank_ctx [k_ra8_sram_bank_count]
 Per-bank context forwarded to g_sram_on_error_bank.

Detailed Description

src/-local shared surface for the SRAM HAL driver split.

Tag
[Ring 3 / HAL] {World: S}

Declares the module-private state shared between the two SRAM driver translation units:

  • ra8_sram.c – lifecycle, ECC mode, status/clear, zero-init, self-test, introspection.
  • ra8_sram_security.c – TrustZone security attribution + the ECC error callback fan-out.

The per-(global, bank) ECC error callback table lives in ra8_sram_security.c (the callback owner) and is referenced from ra8_sram.c only so ra8_sram_deinit can clear it on teardown. These extern declarations give that one cross-TU reference a single, documented home instead of a stray forward declaration.

Definition in file ra8_sram_internal.h.

Variable Documentation

◆ g_sram_on_error

ra8_sram_error_fn_t g_sram_on_error
extern

Registered global ECC error callback (NULL until attach).

Defined in ra8_sram_security.c. Referenced by ra8_sram_deinit in ra8_sram.c to drop the registration on teardown.

Note
Not thread-safe; mutate under the same single-threaded context as the rest of the driver.
Warning
Do not assign directly outside the SRAM driver TUs.
Since
0.1.0

Definition at line 48 of file ra8_sram_security.c.

Referenced by ra8_sram_attach_handler(), ra8_sram_deinit(), and ra8_sram_dispatch().

◆ g_sram_on_error_bank

ra8_sram_error_fn_t g_sram_on_error_bank[k_ra8_sram_bank_count]
extern

Per-bank ECC error callback table (NULL until attach).

Defined in ra8_sram_security.c.

Note
Not thread-safe.
Warning
Do not assign directly outside the SRAM driver TUs.
Since
0.1.0

Per-bank ECC error callback table (NULL until attach).

Definition at line 54 of file ra8_sram_security.c.

Referenced by ra8_sram_attach_bank_handler(), ra8_sram_deinit(), and ra8_sram_dispatch().

◆ g_sram_on_error_bank_ctx

void* g_sram_on_error_bank_ctx[k_ra8_sram_bank_count]
extern

Per-bank context forwarded to g_sram_on_error_bank.

Defined in ra8_sram_security.c.

Note
Not thread-safe.
Warning
Do not assign directly outside the SRAM driver TUs.
Since
0.1.0

Definition at line 62 of file ra8_sram_security.c.

Referenced by ra8_sram_attach_bank_handler(), ra8_sram_deinit(), and ra8_sram_dispatch().

◆ g_sram_on_error_ctx

void* g_sram_on_error_ctx
extern

Caller context forwarded to g_sram_on_error.

Defined in ra8_sram_security.c.

Note
Not thread-safe.
Warning
Do not assign directly outside the SRAM driver TUs.
Since
0.1.0

Definition at line 51 of file ra8_sram_security.c.

Referenced by ra8_sram_attach_handler(), ra8_sram_deinit(), and ra8_sram_dispatch().