44typedef enum : uint64_t {
50typedef enum : uint64_t {
59typedef enum : uint32_t {
67typedef enum : uint32_t {
90typedef enum : uint32_t {
107 if ((out_watchdog ==
nullptr) || (out_iwdt ==
nullptr)) {
268 (void)
priv_emu_io_errf(
" RESET-CAUSE : RSTSR0=0x%02X RSTSR1=0x%08X (%s%s%s%s)\n",
287 .name =
"RESET-RSTSR1",
300 .name =
"RESET-RSTSR0",
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 RA8_INTERNAL void internal_reset_report(void)
End-of-run reset section: the latched cause flags.
static uint8_t s_rstsr0
RSTSR0 sticky flags.
static RA8_INTERNAL void internal_reset_reset(void)
Reset hook: the cause flags are sticky, so this preserves them.
static RA8_INTERNAL uint64_t internal_reset0_read(uc_engine *uc, uint64_t addr, unsigned size)
MMIO read inside the RSTSR0 / RSTSR2 / RSTSR3 window.
static uint8_t s_rstsr3
RSTSR3.
reset_order_t
Per-tick order slot for the reset block (relative order only).
@ k_reset_block_order
After the VBATT-backup block; report order.
static uint32_t s_reboot_req_cause
reset1_geom_t
RSTSR1 window geometry (ra8_reset_regs.h).
@ k_rstsr1_span
Single 32-bit register.
@ k_rstsr1_base
RSTSR1 (32-bit).
void board_periph_reset_set_cause(bool power_on, bool software, bool watchdog, bool iwdt)
Record the cause of a warm reboot in the sticky RSTSRn flags.
static const board_periph_block_t s_k_reset0_block
RSTSR0 / RSTSR2 / RSTSR3 block descriptor.
reset0_geom_t
RSTSR0 / RSTSR2 / RSTSR3 window geometry (ra8_reset_regs.h).
@ k_rstsr0_span
Covers RSTSR0 / RSTSR2 / RSTSR3.
@ k_rstsr0_off_r2
RSTSR2 (CWSF).
@ k_rstsr0_base
RSTSR0 (8-bit) window base.
@ k_rstsr0_off_r0
RSTSR0 at the window base.
reboot_cause_t
Reboot-cause codes a peripheral can request via _request_reboot.
@ k_reboot_cause_wdt
Watchdog-0 reset (RSTSR1.WDTRF).
@ k_reboot_cause_none
No pending request.
@ k_reboot_cause_iwdt
Independent-watchdog reset.
static uint8_t s_rstsr2
RSTSR2 (CWSF).
static const board_periph_block_t s_k_reset1_block
RSTSR1 block descriptor (owns the report).
static RA8_INTERNAL uint64_t internal_reset1_read(uc_engine *uc, uint64_t addr, unsigned size)
MMIO read inside the RSTSR1 window.
static RA8_INTERNAL void internal_reset_block_register(void)
Register the reset-status windows + seed PORF (cold boot).
static RA8_INTERNAL void internal_reset1_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
MMIO write inside the RSTSR1 window (write-0-to-clear flags).
reset_flag_t
RSTSR flag bit masks (ra8_reset_regs.h).
@ k_rstsr1_swrf
RSTSR1.SWRF software reset (bit 2).
@ k_rstsr1_iwdtrf
RSTSR1.IWDTRF independent WDT (bit 0).
@ k_rstsr1_wdtrf
RSTSR1.WDTRF watchdog reset (bit 1).
@ k_rstsr0_porf
RSTSR0.PORF power-on reset (bit 0).
static uint32_t s_rstsr1
Sticky reset-cause flags (survive a warm reboot).
bool board_periph_reset_take_request(bool *out_watchdog, bool *out_iwdt)
Consume a pending peripheral reboot request, if any (run-loop side).
static RA8_INTERNAL void internal_reset0_write(uc_engine *uc, uint64_t addr, unsigned size, uint64_t value)
MMIO write inside the RSTSR0 / RSTSR2 / RSTSR3 window.
void board_periph_reset_request_reboot(bool watchdog, bool iwdt)
Request a warm reboot from a peripheral model (e.g.
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.
#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.