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

Fixed 100-byte prologue describing every table and pool in the blob. More...

#include <book.h>

Data Fields

char magic [8]
 Always "RABOOK1" (7 chars + NUL).
uint32_t format_version
 book_version_t of this blob.
uint32_t total_size
 Total blob length in bytes.
uint32_t flags
 book_flag_t bits; unknown bits are rejected.
uint32_t title_off
 String-pool offset of the book title.
uint32_t author_off
 String-pool offset of the author.
uint32_t language_off
 String-pool offset of the BCP-47 language.
uint32_t identifier_off
 String-pool offset of the unique book id.
uint32_t cover_image_index
 Image-table index of the cover, or nil.
uint32_t chapter_count
 Number of spine chapters.
uint32_t chapter_off
 Offset to the chapter table.
uint32_t node_count
 Number of DOM nodes.
uint32_t node_off
 Offset to the node table.
uint32_t attr_count
 Number of attribute records.
uint32_t attr_off
 Offset to the attribute table.
uint32_t stylesheet_count
 Number of preserved stylesheets.
uint32_t stylesheet_off
 Offset to the stylesheet table.
uint32_t image_count
 Number of image descriptors.
uint32_t image_off
 Offset to the image table.
uint32_t string_off
 Offset to the string pool.
uint32_t string_size
 String-pool length in bytes.
uint32_t image_pool_off
 Offset to the image pool.
uint32_t image_pool_size
 Image-pool length in bytes.
uint32_t crc32_val
 CRC-32/ISO-HDLC of the body (all bytes after this header).

Detailed Description

Fixed 100-byte prologue describing every table and pool in the blob.

All _off fields are byte offsets from the blob base; all _count / _size fields are element counts / byte lengths. Metadata string offsets index the string pool.

Invariant
total_size equals the exact byte length of the blob.
Every _off plus its table extent lies within [0, total_size].
Since
Version 0.1.0

Definition at line 246 of file book.h.

Field Documentation

◆ attr_count

◆ attr_off

uint32_t book_header_t::attr_off

◆ author_off

uint32_t book_header_t::author_off

String-pool offset of the author.

Definition at line 252 of file book.h.

Referenced by internal_decode_header(), internal_make_header(), priv_book_stream_validate_metadata(), and priv_mdl_verify_rabook().

◆ chapter_count

◆ chapter_off

◆ cover_image_index

uint32_t book_header_t::cover_image_index

Image-table index of the cover, or nil.

Definition at line 255 of file book.h.

Referenced by internal_decode_header(), internal_make_header(), priv_book_stream_validate_metadata(), and sh_decode_cover().

◆ crc32_val

uint32_t book_header_t::crc32_val

CRC-32/ISO-HDLC of the body (all bytes after this header).

Definition at line 270 of file book.h.

Referenced by book_validate(), internal_decode_header(), internal_make_header(), internal_validate_crc(), publish_result(), and verify_blob().

◆ flags

uint32_t book_header_t::flags

book_flag_t bits; unknown bits are rejected.

Definition at line 250 of file book.h.

Referenced by book_validate(), internal_decode_header(), internal_make_header(), and internal_validate_header_fields().

◆ format_version

uint32_t book_header_t::format_version

◆ identifier_off

uint32_t book_header_t::identifier_off

String-pool offset of the unique book id.

Definition at line 254 of file book.h.

Referenced by internal_decode_header(), internal_make_header(), priv_book_stream_validate_metadata(), and priv_mdl_verify_rabook().

◆ image_count

◆ image_off

uint32_t book_header_t::image_off

◆ image_pool_off

uint32_t book_header_t::image_pool_off

◆ image_pool_size

uint32_t book_header_t::image_pool_size

◆ language_off

uint32_t book_header_t::language_off

String-pool offset of the BCP-47 language.

Definition at line 253 of file book.h.

Referenced by internal_decode_header(), internal_make_header(), and priv_book_stream_validate_metadata().

◆ magic

char book_header_t::magic[8]

Always "RABOOK1" (7 chars + NUL).

Definition at line 247 of file book.h.

Referenced by book_is_valid(), internal_decode_header(), internal_magic_ok(), internal_make_header(), internal_validate_header_fields(), and sh_paged_hdr_ok().

◆ node_count

◆ node_off

◆ string_off

◆ string_size

◆ stylesheet_count

uint32_t book_header_t::stylesheet_count

◆ stylesheet_off

uint32_t book_header_t::stylesheet_off

◆ title_off

uint32_t book_header_t::title_off

String-pool offset of the book title.

Definition at line 251 of file book.h.

Referenced by imp_walk_book(), internal_decode_header(), internal_make_header(), priv_book_stream_validate_metadata(), and priv_mdl_verify_rabook().

◆ total_size


The documentation for this struct was generated from the following file:
  • apps/shared_libs/book/inc/book.h