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

Cross-core message block backed by a fixed shared-SRAM address. More...

#include <dualcore_mailbox.h>

Data Fields

volatile uint32_t request_seq
 M85 increments after writing request.
volatile uint32_t reply_seq
 M33 sets equal to request_seq when done.
volatile uint32_t request
 M85 -> M33: the operand to transform.
volatile uint32_t reply
 M33 -> M85: request * 3 + 1.
volatile uint32_t m33_signature
 M33 stamps k_dualcore_m33_signature.
volatile uint32_t m33_replies
 M33 increments per reply (liveness count).

Detailed Description

Cross-core message block backed by a fixed shared-SRAM address.

All fields are volatile so each core re-reads memory every iteration of its poll loop rather than caching a value in a register. The M85 owns the request* fields (writer) and the M33 owns the reply*, m33_signature, and m33_replies fields (writer); the opposite core only reads them. The sequence counters carry the wakeup edge, the data words carry the payload.

Invariant
reply_seq lags request_seq by 0 or 1.
Both sequence counters increase monotonically.
m33_signature is 0 until the M33 has booted, then k_dualcore_m33_signature forever.
Example:
mb->request = 7U;
__asm volatile("dsb" ::: "memory");
mb->request_seq = 1U; // wake the M33
static volatile dualcore_mailbox_t * dualcore_mailbox(void)
Typed pointer to the fixed-address shared mailbox.
Cross-core message block backed by a fixed shared-SRAM address.
volatile uint32_t request_seq
M85 increments after writing request.
volatile uint32_t request
M85 -> M33: the operand to transform.
See also
dualcore_mailbox()
Since
0.1.0

Definition at line 123 of file dualcore_mailbox.h.

Field Documentation

◆ m33_replies

volatile uint32_t dualcore_mailbox_t::m33_replies

M33 increments per reply (liveness count).

Definition at line 129 of file dualcore_mailbox.h.

Referenced by cpu1_main(), heartbeat_loop(), main(), and zero_mailbox().

◆ m33_signature

volatile uint32_t dualcore_mailbox_t::m33_signature

M33 stamps k_dualcore_m33_signature.

Definition at line 128 of file dualcore_mailbox.h.

Referenced by cpu1_main(), main(), wait_for_m33_boot(), and zero_mailbox().

◆ reply

volatile uint32_t dualcore_mailbox_t::reply

M33 -> M85: request * 3 + 1.

Definition at line 127 of file dualcore_mailbox.h.

Referenced by cpu1_main(), do_round(), ping_once(), and zero_mailbox().

◆ reply_seq

volatile uint32_t dualcore_mailbox_t::reply_seq

M33 sets equal to request_seq when done.

Definition at line 125 of file dualcore_mailbox.h.

Referenced by cpu1_main(), wait_for_reply(), and zero_mailbox().

◆ request

volatile uint32_t dualcore_mailbox_t::request

M85 -> M33: the operand to transform.

Definition at line 126 of file dualcore_mailbox.h.

Referenced by cpu1_main(), ping_once(), and zero_mailbox().

◆ request_seq

volatile uint32_t dualcore_mailbox_t::request_seq

M85 increments after writing request.

Definition at line 124 of file dualcore_mailbox.h.

Referenced by cpu1_main(), ping_once(), and zero_mailbox().


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