|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
CPU1 (Cortex-M33 secondary core) responder image. More...
Go to the source code of this file.
Functions | |
| void | cpu1_reset_handler (void) |
| CPU1 reset handler: minimal C-runtime init, then enter cpu1_main. | |
| static void | cpu1_main (void) |
| CPU1 application loop: answer the M85's mailbox requests. | |
| static void | cpu1_fault_handler (void) |
| CPU1 default fault handler: park the core. | |
Variables | |
| uint32_t | g_ra8_ls_cpu1_stack_top |
| CPU1 stack top (slot 0 of the M33 vector table). | |
| uint32_t | g_ra8_ls_cpu1_data_start |
| CPU1 .data run-region start (in SRAM_CPU1). | |
| uint32_t | g_ra8_ls_cpu1_data_end |
| CPU1 .data run-region end. | |
| uint32_t | g_ra8_ls_cpu1_data_load |
| CPU1 .data load image (in MRAM_CPU1). | |
| uint32_t | g_ra8_ls_cpu1_bss_start |
| CPU1 .bss start (in SRAM_CPU1). | |
| uint32_t | g_ra8_ls_cpu1_bss_end |
| CPU1 .bss end. | |
| const uintptr_t | g_cpu1_vector_table [] |
CPU1 (Cortex-M33 secondary core) responder image.
This is the firmware that runs on the RA8D2's second core, the Cortex-M33. It is compiled as a wholly separate ELF (-mcpu=cortex-m33) and embedded into the M85 ELF as a .cpu1_image blob; the M85 releases this core at runtime via ra8_cpu1_release (HUM Ch 2.9.1 "CPU control registers").
Its job is intentionally tiny so the dual-core plumbing is what stands out:
Definition in file cpu1_main.c.
|
static |
CPU1 default fault handler: park the core.
Every M33 exception slot routes here. The core stops making forward progress; on hardware a watchdog (if enabled) eventually resets.
Definition at line 162 of file cpu1_main.c.
|
static |
CPU1 application loop: answer the M85's mailbox requests.
Stamps the boot signature, then services request/reply rounds forever. Each request is transformed by * k_dualcore_m33_mul + k_dualcore_m33_add so a correct reply proves the M33 executed code rather than the M85 reading back its own write. See the file header.
Definition at line 72 of file cpu1_main.c.
References dualcore_mailbox(), k_dualcore_m33_add, k_dualcore_m33_mul, k_dualcore_m33_signature, dualcore_mailbox_t::m33_replies, dualcore_mailbox_t::m33_signature, dualcore_mailbox_t::reply, dualcore_mailbox_t::reply_seq, dualcore_mailbox_t::request, and dualcore_mailbox_t::request_seq.
| void cpu1_reset_handler | ( | void | ) |
CPU1 reset handler: minimal C-runtime init, then enter cpu1_main.
The M33 boots with uninitialised RAM, so before any C code runs this copies .data from its MRAM_CPU1 load image into SRAM_CPU1 and zeroes .bss. Skipping this leaves file-scope globals holding whatever pattern SRAM held at power-on. The linker exports the region bounds as g_ra8_ls_cpu1_* symbols.
Definition at line 126 of file cpu1_main.c.
References cpu1_main(), g_ra8_ls_cpu1_bss_end, g_ra8_ls_cpu1_bss_start, g_ra8_ls_cpu1_data_end, g_ra8_ls_cpu1_data_load, and g_ra8_ls_cpu1_data_start.
| const uintptr_t g_cpu1_vector_table[] |
Definition at line 183 of file cpu1_main.c.
|
extern |
CPU1 .bss end.
|
extern |
CPU1 .bss start (in SRAM_CPU1).
|
extern |
CPU1 .data run-region end.
|
extern |
CPU1 .data load image (in MRAM_CPU1).
|
extern |
CPU1 .data run-region start (in SRAM_CPU1).
|
extern |
CPU1 stack top (slot 0 of the M33 vector table).