ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
compile_on_m33.h
Go to the documentation of this file.
1
61
62#pragma once
63
64#include <stdint.h>
65
67
68#ifdef __cplusplus
69extern "C" {
70#endif
71
103
129
141typedef enum : uint32_t {
145
174typedef struct {
175 volatile uint32_t magic;
176 volatile uint32_t req_magic;
178 volatile uint32_t epub_base;
179 volatile uint32_t epub_len;
180 volatile uint32_t out_base;
181 volatile uint32_t out_cap;
182 volatile uint32_t m33_sig;
183 volatile uint32_t status;
184 volatile uint32_t blob_base;
185 volatile uint32_t blob_len;
186 volatile uint32_t blob_crc;
187 volatile uint32_t chapter_count;
188 volatile uint32_t done;
190
209static inline volatile com33_mailbox_t* com33_mailbox(void)
210{
211 return (volatile com33_mailbox_t*)(uintptr_t)k_com33_mailbox_addr;
212}
213
233static inline uint8_t* com33_blob(void)
234{
235 return (uint8_t*)(uintptr_t)k_com33_blob_addr;
236}
237
257static inline uint8_t* com33_epub(void)
258{
259 return (uint8_t*)(uintptr_t)k_com33_epub_addr;
260}
261
262#ifdef __cplusplus
263}
264#endif
static volatile com33_mailbox_t * com33_mailbox(void)
Typed pointer to the fixed-address shared mailbox.
com33_addr_t
Fixed shared-SRAM addresses for the mailbox and the output blob.
@ k_com33_blob_offset
Output blob offset: past the 32 KiB staged input.
@ k_com33_blob_addr
Output blob base, carved from the shared window.
@ k_com33_epub_addr
Staged input base, carved from the shared window.
@ k_com33_mailbox_addr
Mailbox base – the start of the board's shared window.
@ k_com33_epub_offset
Staged input offset: past the mailbox's own cache line.
static uint8_t * com33_blob(void)
Typed pointer to the fixed-address shared output-blob buffer.
com33_const_t
Magics, the boot signature, and the build-status codes shared by both core images.
@ k_com33_status_running
status: M33 is still building the blob.
@ k_com33_magic
"COM3" – M85 stamps it when ready.
@ k_com33_status_no_request
status: req_magic absent (no staged job).
@ k_com33_status_fault
status: M33 took a hardware fault mid-run.
@ k_com33_req_magic
"REQ0" – M85 stamps it once the job (the
@ k_com33_status_open_fail
status: epub_open rejected the input.
@ k_com33_status_ok
status: compile finalized a valid blob.
@ k_com33_m33_sig
"M33 CODE" boot sentinel written by M33.
@ k_com33_status_build_fail
status: a compile stage overflowed/failed.
com33_blob_cap_t
Capacities, in bytes, of the shared staged-input and output buffers.
@ k_com33_epub_cap
Shared staged-input .epub buffer capacity (32 KiB).
@ k_com33_blob_cap
Shared output-blob buffer capacity in bytes.
static uint8_t * com33_epub(void)
Typed pointer to the fixed-address shared staged-input .epub buffer.
Where the EK-RA8D2's Cortex-M85 and Cortex-M33 meet, stated once.
@ k_ra8_board_shared_ram_base
Start of SRAM2: the CPU0 <-> CPU1 meeting window.
Cross-core handoff block backed by a fixed shared-SRAM address.
volatile uint32_t blob_base
Address of the finalized blob (= out_base).
volatile uint32_t chapter_count
Chapters the M33 emitted into the blob.
volatile uint32_t blob_len
Finalized RABOOK1 blob length, bytes.
volatile uint32_t m33_sig
M33 stamps k_com33_m33_sig on boot.
volatile uint32_t req_magic
M85 stamps k_com33_req_magic when the job is.
volatile uint32_t blob_crc
Blob header body CRC-32, echoed for cross-check.
volatile uint32_t out_cap
M85: capacity of the output buffer, bytes.
volatile uint32_t epub_len
M85: length of the staged .epub, bytes.
volatile uint32_t magic
M85 stamps k_com33_magic when ready.
volatile uint32_t out_base
M85: address the M33 writes the finalized blob.
volatile uint32_t done
Set to 1 by the M33 once the blob is published.
volatile uint32_t epub_base
M85: address of the staged source .epub bytes.
volatile uint32_t status
Compile outcome (com33_const_t status codes).