47typedef enum : uint64_t {
53typedef enum : uint16_t {
60typedef enum : uint32_t {
92 return (uint16_t)(
s_prcr.groups & group_mask) == group_mask;
142 const uint16_t word = (uint16_t)value;
148 if (
s_prcr.groups != 0U) {
163 if (
s_prcr.bad_key != 0U) {
166 " SYSC-PRCR : unlocks=%u REJECTED=%u (missing 0xA5 key in PRKEY[7:0])\n",
171 if (
s_prcr.unlocks == 0U) {
Decentralized peripheral-block registry for the board emulator core.
void board_periph_register_block(const board_periph_block_t *block)
Register a peripheral block's descriptor with the core registry.
static uint64_t internal_prcr_read(uc_engine *uc, uint64_t addr, unsigned size)
MMIO read stub – never called for an observe-only block.
prcr_order_t
Per-tick order slot for the PRCR block (relative order).
@ k_prcr_block_order
Just before the VBATT-backup block.
static void internal_prcr_reset(void)
Return PRCR to its power-on state: every group locked.
prcr_mask_t
PRCR field masks (HUM Ch 13.2.1 p 522).
@ k_prcr_group_mask
PRC0/1/3/4/5; bit 2 + 7:6 reserved.
@ k_prcr_key_mask
PRKEY[7:0] lives in bits 15:8.
@ k_prcr_key_value
Mandatory 0xA5 write key.
static void internal_prcr_block_register(void)
Register the PRCR block before main (host constructor).
static prcr_state_t s_prcr
static void internal_prcr_report(void)
End-of-run PRCR section: unlock traffic and any key mistakes.
static const board_periph_block_t s_k_prcr_block
PRCR block descriptor (observe-only: snoops, does not own).
bool priv_board_prcr_group_unlocked(uint16_t group_mask)
Report whether every bit in group_mask is currently unlocked.
prcr_geom_t
PRCR window geometry (HUM Ch 13.2.1 p 522).
@ k_prcr_span
One 16-bit register.
@ k_prcr_base
PRCR_S: SYSC base 0x4001_E000 + 0x3FA.
static void internal_prcr_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
Snoop a PRCR write and update the retained group mask.
Module-private PRCR unlock state shared with the protected blocks.
Bounded raw-descriptor I/O seam for the RA8 emulator.
emu_io_result_t priv_emu_io_errf(const char *format,...)
Format bounded text and write it to the injected error descriptor.
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
A modelled peripheral block's self-description for the core registry.
Live PRCR group-unlock mask, and the counters behind the report.
uint32_t bad_key
Writes discarded for carrying a wrong key.
uint32_t unlocks
Keyed writes that enabled >= 1 group.
uint16_t groups
Currently write-enabled group bits.