ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
rabook_import_compiler_m33_ctx_t Struct Reference

Cookie for rabook_import_compile_adapter_m33 (the M33-offload binding). More...

#include <rabook_import_compiler.h>

Collaboration diagram for rabook_import_compiler_m33_ctx_t:

Data Fields

uint8_t * epub_load_buf
 Buffer the source .epub is read into.
uint32_t epub_load_cap
 Capacity of epub_load_buf in bytes.
uint8_t * blob_buf
 Buffer the dispatched RABOOK1 blob lands in.
uint32_t blob_cap
 Capacity of blob_buf in bytes.
ra8_dual_core_compile_dispatch_fn dispatch
 Cross-core compile seam (non-NULL).
void * dispatch_ctx
 Cookie forwarded to dispatch.
rabook_import_compiler_ctx_tfallback
 In-core retry cookie used if the offload fails; NULL = offload-only.

Detailed Description

Cookie for rabook_import_compile_adapter_m33 (the M33-offload binding).

Carries no parser/builder arenas – those live on the secondary core. The adapter reads the source .epub into epub_load_buf, hands the bytes to dispatch (which compiles on the M33 and returns the blob in blob_buf), validates, and writes the blob out. dispatch is the DI seam: production binds the shared-mailbox shim, host tests bind a mock. The whole-file read is inherent to the cross-core transport (the M33 needs the source resident in shared memory); a source larger than epub_load_cap is reported as a transport overflow (k_ra8_err_no_mem) so the streamed in-core fallback – which has no size ceiling (#230) – can still import it.

fallback is the robustness seam: when the offload fails with a TIMEOUT/FAULT or a transport overflow (the .epub itself may be fine), the adapter retries the compile IN-CORE through this cookie so the import still yields a valid .rabook. It is OPTIONAL – leave it NULL to keep the adapter offload-only (the offload error then propagates).

Invariant
epub_load_buf, blob_buf and dispatch are non-NULL and each buffer holds its stated capacity.
fallback is either NULL or a fully-populated in-core cookie.
See also
ra8_dual_core_compile_dispatch_fn
rabook_import_compiler_ctx_t
Since
Version 0.1.0

Definition at line 146 of file rabook_import_compiler.h.

Field Documentation

◆ blob_buf

uint8_t* rabook_import_compiler_m33_ctx_t::blob_buf

Buffer the dispatched RABOOK1 blob lands in.

Definition at line 149 of file rabook_import_compiler.h.

Referenced by internal_dispatch_and_cache().

◆ blob_cap

uint32_t rabook_import_compiler_m33_ctx_t::blob_cap

Capacity of blob_buf in bytes.

Definition at line 150 of file rabook_import_compiler.h.

Referenced by internal_dispatch_and_cache().

◆ dispatch

ra8_dual_core_compile_dispatch_fn rabook_import_compiler_m33_ctx_t::dispatch

Cross-core compile seam (non-NULL).

Definition at line 152 of file rabook_import_compiler.h.

Referenced by internal_dispatch_and_cache(), and rabook_import_compile_adapter_m33().

◆ dispatch_ctx

void* rabook_import_compiler_m33_ctx_t::dispatch_ctx

Cookie forwarded to dispatch.

Definition at line 153 of file rabook_import_compiler.h.

Referenced by internal_dispatch_and_cache().

◆ epub_load_buf

uint8_t* rabook_import_compiler_m33_ctx_t::epub_load_buf

Buffer the source .epub is read into.

Definition at line 147 of file rabook_import_compiler.h.

Referenced by internal_dispatch_and_cache(), and rabook_import_compile_adapter_m33().

◆ epub_load_cap

uint32_t rabook_import_compiler_m33_ctx_t::epub_load_cap

Capacity of epub_load_buf in bytes.

Definition at line 148 of file rabook_import_compiler.h.

Referenced by rabook_import_compile_adapter_m33().

◆ fallback

rabook_import_compiler_ctx_t* rabook_import_compiler_m33_ctx_t::fallback

In-core retry cookie used if the offload fails; NULL = offload-only.

Definition at line 155 of file rabook_import_compiler.h.

Referenced by internal_fallback_or_propagate().


The documentation for this struct was generated from the following file: