68typedef enum : uint32_t {
81typedef enum : uint8_t {
87 "cacheable self-test buffer must be at least 4 KiB");
149 __asm
volatile(
"wfi");
190 const uint8_t expected =
252 if (line ==
nullptr) {
283 ra8_log_info(
"CACHE_HAL",
"==== cache_hal_enable_demo: L1 cache via ra8_cache HAL ====");
286 ra8_log_info(
"CACHE_HAL",
"setup FAILED (CGC / console) -- halting");
297 ra8_log_info(
"CACHE_HAL",
"L1-cache-via-HAL PASS (cacheable RW round-trip)");
void main(void)
Secure fallback main entry point.
cache_hal_pattern_t
Affine byte-pattern coefficients: buf[i] = i * MUL + ADD.
@ k_cache_hal_pat_mul
Pattern multiplier.
@ k_cache_hal_pat_add
Pattern addend.
static bool cache_hal_setup(void)
Bring up the clock tree and the VCOM console for the banner.
static bool cache_hal_test_cacheable_rw(void)
Prove cacheable RW works with the HAL-enabled D-cache (SRAM region 1).
static const uint8_t k_cache_hal_fail_setup[]
Failure banner: clock / console bring-up failed before the self-test.
cache_hal_config_t
Compile-time scalar parameters for the cache-via-HAL self-test.
@ k_cache_hal_buf_bytes
Cacheable self-test buffer size (>= 4 KiB).
@ k_cache_hal_baud
VCOM console line rate (8N1).
@ k_cache_hal_buf_min
Self-test buffer floor (4 KiB minimum).
static uint8_t s_cache_hal_buf[k_cache_hal_buf_bytes]
4 KiB cacheable scratch buffer in M85-private SRAM (MPU region 1).
static void cache_hal_emit(const uint8_t *line, size_t len)
Emit one banner line over the VCOM console and flush it.
static const uint8_t k_cache_hal_fail_rw[]
Failure banner: the cacheable-SRAM readback mismatched.
static void cache_hal_wfi_forever(void)
Park the Cortex-M85 forever in a WFI idle loop.
static const uint8_t k_cache_hal_pass_banner[]
Deterministic one-shot HIL success banner (uart_scrape gate).
Board-support layer for the Renesas EK-RA8D2 v1 evaluation kit.
ra8_err_t ra8_board_uart_console_write(const uint8_t *data, size_t len)
Polled blocking write to the J-Link OB VCOM console.
ra8_err_t ra8_board_uart_console_init(uint32_t baud)
Configure SCI8 + PD02/PD03 as the debug-console UART.
ra8_err_t ra8_board_uart_console_flush(void)
Block until every byte queued on the J-Link OB VCOM console has finished clocking out on the wire.
Boot entry points shared between a vector table and its startup code.
Cortex-M85 L1 cache maintenance, enable/disable, and I-cache invalidate.
ra8_err_t ra8_cache_dcache_clean_invalidate_by_addr(const void *addr, uint32_t size)
Clean and invalidate the D-cache lines covering a byte range.
High-level Clock Generation Circuit driver.
ra8_err_t ra8_cgc_init(void)
Configure the clock tree to a safe default.
Error Code Definitions for ra8-firmware.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
Lightweight Logging Interface for ra8-firmware.
void ra8_log_init(void)
Initialise the logging backend.
#define ra8_log_info(tag, message)
RA8 log info.