36static const char*
const s_tag =
"ra8_dual_core";
39typedef enum : uint16_t {
43typedef enum : uint32_t {
61} ra8_dual_core_fake_state_t;
69static ra8_dual_core_fake_state_t s_fake = {
126 uint16_t actcsr = s_fake.actcsr;
130 s_fake.actcsr = actcsr;
178 return s_fake.waitcr;
201 s_fake.initvtor = value;
205volatile const void* ra8_dual_core_test_actcsr_key(
void)
207 return (
volatile const void*)&s_fake.actcsr;
401#ifdef RA8_BUILD_FOR_CPU1
433#if defined(RA8_OFF_TARGET) && defined(UNIT_TEST)
434 volatile const void* act_key = ra8_dual_core_test_actcsr_key();
438#if defined(RA8_OFF_TARGET) && defined(UNIT_TEST)
439 if (ra8_fake_mmio_wait_eval(act_key, i, act_set)) {
496 if (entry ==
nullptr || sp ==
nullptr) {
static const char * s_tag
Logging / check tag.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
bool ra8_cpu1_is_running(void)
Return whether CPU1 is currently fetching instructions.
static uint16_t internal_actcsr_read(void)
Read the live CPU1ACTCSR register on the chip.
static volatile uint32_t * internal_initvtor_ptr(void)
Address of CPU1INITVTOR on the live chip.
static void internal_waitcr_write(uint8_t value)
Write the live CPU1WAITCR register on the chip.
static void internal_initvtor_write(uint32_t value)
Write the live CPU1INITVTOR register on the chip.
static bool internal_is_cpu0(void)
Compile-time check that the caller is CPU0.
static void internal_actcsr_write(uint16_t value)
Write the live CPU1ACTCSR register on the chip.
static volatile uint8_t * internal_waitcr_ptr(void)
Address of CPU1WAITCR on the live chip.
ra8_err_t ra8_cpu1_release(void *entry, void *sp)
Release CPU1 (Cortex-M33) from reset and start it executing.
dc_mask_t
Low-byte mask for ACTCSR field extraction.
@ k_dc_byte_mask
Dc byte mask.
ra8_err_t ra8_cpu1_halt(void)
Park CPU1 by asserting CPU1WAITCR.CPUWAIT.
@ k_ra8_dual_core_align_vtor
Armv8-M VTOR alignment requirement.
@ k_ra8_dual_core_align_sp
AAPCS main-stack alignment.
static ra8_err_t internal_wait_act_set(void)
Bounded poll for CPU1ACTCSR.ACT to assert after an ACTREQ.
static uint8_t internal_waitcr_read(void)
Read the live CPU1WAITCR register on the chip.
static volatile uint16_t * internal_actcsr_ptr(void)
Address of CPU1ACTCSR on the live chip.
Dual-core (CPU0 / CPU1) lifecycle helper – public API.
@ k_ra8_dual_core_release_poll_max
Bounded poll iterations.
@ k_ra8_dual_core_actcsr_act_mask
CPU1ACTCSR.ACT.
@ k_ra8_dual_core_actcsr_actreq_mask
CPU1ACTCSR.ACTREQ.
@ k_ra8_dual_core_actcsr_key_shift
Key byte position.
@ k_ra8_dual_core_waitcr_cpuwait_mask
CPU1WAITCR.CPUWAIT.
@ k_ra8_dual_core_actcsr_key_value
Required key code.
@ k_ra8_dual_core_off_cpu1_actcsr
CPU1ACTCSR (16-bit).
@ k_ra8_dual_core_off_cpu1_waitcr
CPU1WAITCR (8-bit).
@ k_ra8_dual_core_off_cpu1_initvtor
CPU1INITVTOR (32-bit).
@ k_ra8_dual_core_ctrl_base_addr
CPU_CTRL Secure base.
Error Code Definitions for ra8-firmware.
@ k_ra8_err_not_supported
Requested feature not compiled in, not wired, or not supported by this MCU variant.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
@ k_ra8_err_null_ptr
Pointer was NULL where a valid pointer was required.
@ k_ra8_err_timeout
Operation exceeded its time budget.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Bounded wait-flag primitives for RA8D2 HAL drivers.
Lightweight Logging Interface for ra8-firmware.
#define ra8_log_error(tag, message)
RA8 log error.