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

The .noinit cross-reset post-mortem record. More...

#include <ra8_crashlog.h>

Collaboration diagram for ra8_crashlog_record_t:

Data Fields

uint32_t magic
 k_ra8_crashlog_magic_valid if valid (not CRC-covered).
uint32_t crc
 CRC-32 over boot_loops..end of record.
uint32_t boot_loops
 Monotonic recorded-fault counter; cleared by a claim.
ra8_exception_last_t fault
 Embedded copy of the decoded fault / NMI snapshot.

Detailed Description

The .noinit cross-reset post-mortem record.

Byte layout is deliberate: magic is the standalone integrity sentinel and is NOT covered by crc; crc is a CRC-32 over every byte from boot_loops to the end of the record, so the sentinel and the checksum are two independent integrity signals. A record is trustworthy only when magic == k_ra8_crashlog_magic_valid AND the recomputed CRC equals crc.

Invariant
magic == k_ra8_crashlog_magic_valid only while crc matches the payload and boot_loops/fault are fully written.
boot_loops >= 1 whenever magic is valid (a recorded fault always counts at least itself).
// Debugger / post-mortem usage:
// (gdb) print/x g_ra8_ls_noinit_start
// (gdb) print *(ra8_crashlog_record_t*)<that address>
// magic 0x5AFEB007 => trust boot_loops + fault.
See also
ra8_crashlog_peek()
ra8_exception_last_t
Since
0.1.0

Definition at line 143 of file ra8_crashlog.h.

Field Documentation

◆ boot_loops

uint32_t ra8_crashlog_record_t::boot_loops

Monotonic recorded-fault counter; cleared by a claim.

Definition at line 146 of file ra8_crashlog.h.

Referenced by fc_print_record(), main(), and ra8_crashlog_safe_mode_requested().

◆ crc

uint32_t ra8_crashlog_record_t::crc

CRC-32 over boot_loops..end of record.

Definition at line 145 of file ra8_crashlog.h.

◆ fault

ra8_exception_last_t ra8_crashlog_record_t::fault

Embedded copy of the decoded fault / NMI snapshot.

Definition at line 147 of file ra8_crashlog.h.

Referenced by fc_print_record(), and main().

◆ magic

uint32_t ra8_crashlog_record_t::magic

k_ra8_crashlog_magic_valid if valid (not CRC-covered).

Definition at line 144 of file ra8_crashlog.h.


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