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

A book data source: resident (zero-copy) or paged (demand-fetched). More...

#include <book_paged.h>

Collaboration diagram for book_src_t:

Data Fields

const uint8_t * base
 Resident blob base, or NULL in paged mode.
ra8_vmem_tvm
 Paged page cache, or NULL in resident mode.
uint32_t object_id
 Paged: the book's ::ra8_vsource object id.
uint32_t frame_bytes
 Paged: ::ra8_vmem frame size, for slice math.
uint32_t size
 Total blob length in bytes.
book_header_t hdr
 Resident copy of the blob header.

Detailed Description

A book data source: resident (zero-copy) or paged (demand-fetched).

Exactly one mode is active. Resident mode sets base (the validated blob) with vm NULL: reads are base + off, identical to the book.h accessors. Paged mode sets vm (an initialised ::ra8_vmem fronting the book's ::ra8_vsource object) with base NULL: reads fault frames in through the cache and copy the requested slice out. The 100-byte header is copied into hdr at bind time in both modes so header fields are always available without a fault. Populate via book_src_resident / book_src_paged; treat the fields as read-only afterwards.

Invariant
Exactly one of (base != NULL) and (vm != NULL) holds.
hdr is a copy of the blob's book_header_t.
See also
book_src_resident()
book_src_paged()
Since
Version 0.1.0

Definition at line 69 of file book_paged.h.

Field Documentation

◆ base

const uint8_t* book_src_t::base

Resident blob base, or NULL in paged mode.

Definition at line 70 of file book_paged.h.

Referenced by book_chapter_text_src(), book_src_paged(), book_src_read(), and book_src_resident().

◆ frame_bytes

uint32_t book_src_t::frame_bytes

Paged: ::ra8_vmem frame size, for slice math.

Definition at line 73 of file book_paged.h.

Referenced by book_src_paged(), book_src_resident(), and internal_book_src_read_paged().

◆ hdr

◆ object_id

uint32_t book_src_t::object_id

Paged: the book's ::ra8_vsource object id.

Definition at line 72 of file book_paged.h.

Referenced by book_src_paged(), book_src_prefetch_chapter(), book_src_resident(), and internal_book_src_read_paged().

◆ size

uint32_t book_src_t::size

◆ vm

ra8_vmem_t* book_src_t::vm

Paged page cache, or NULL in resident mode.

Definition at line 71 of file book_paged.h.

Referenced by book_src_paged(), book_src_prefetch_chapter(), book_src_read(), book_src_resident(), internal_book_src_read_paged(), and sh_rabook_label().


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