|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
RSIP-E50D register field/value enums and the reg32 accessor. More...
Go to the source code of this file.
Functions | |
| static volatile uint32_t * | ra8_rsip_reg32 (ra8_rsip_off_t offset) |
| Volatile pointer to a 32-bit RSIP register at offset. | |
RSIP-E50D register field/value enums and the reg32 accessor.
Sub-header of ra8_rsip_regs.h. Carries every register field-position / bit-mask / command-value enum for the RSIP-E50D engine (CTRL / STATUS / ISR fields and masks, HASH algorithm selectors, OEM-key install opcodes, key-vault / key-wrap / DOTF / KDF command words, lifecycle + debug-level states, AES mode + direction, ECC curve + RSA size selectors, asymmetric opcodes, tamper sources, ChaCha20 opcodes, and the published buffer sizes), plus the ra8_rsip_reg32 register-pointer accessor.
The RSIP-E50D engine on the RA8D2 is an isolated security subsystem (HUM Ch 52 "Renesas Secure IP (RSIP-E50D)" p 3302). It is mailbox-driven; field semantics are inferred from the FSP primitives that touch REG_xxxxH in crypto_procedures_protected/.../ra8_rsip_e50d.
Definition in file ra8_rsip_regs_fields.h.
| enum ra8_rsip_aes_dir_t : uint8_t |
Direction selector for symmetric ciphers.
| Enumerator | |
|---|---|
| k_ra8_rsip_dir_encrypt | Plaintext -> Ciphertext. |
| k_ra8_rsip_dir_decrypt | Ciphertext -> Plaintext. |
Definition at line 318 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_aes_mode_t : uint8_t |
Block-cipher mode selector for the AES engine.
HUM Ch 52.1 Table 52.1 p 3302: AES supports ECB, CBC, CTR (NIST SP 800-38A), CCM (38C), GCM (38D), XTS (IEEE 1619-2007), CMAC (38B), GMAC (38D).
Definition at line 303 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_asym_op_t : uint32_t |
Opcode written to ASYM_CTRL to select the operation.
EdDSA (Ed25519 PureEdDSA, RFC 8032) is a distinct opcode from ECDSA: the Edwards-curve signature scheme hashes the message internally (SHA-512) and is not interchangeable with the Weierstrass-curve ECDSA modular-exponentiation path. Routing an Ed25519 key through ..._ecdsa_sign would NOT produce a valid RFC 8032 signature, so the EdDSA sign / verify operations carry their own opcodes here.
Definition at line 364 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_chacha_op_t : uint32_t |
ChaCha20 / Poly1305 operation selector.
Definition at line 423 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_ctrl_bits_t : uint8_t |
Field positions inside the CTRL mailbox word.
The CTRL word gates the engine clock, arms the BIST / TRNG health checks, and routes command FIFOs. Bit positions are derived from the FSP primitives that touch REG_0000H / REG_0004H.
Definition at line 48 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_curve_t : uint8_t |
ECC curve selector (HUM Ch 52.1 Table 52.1 "ECC" p 3302).
Definition at line 327 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_debug_level_t : uint8_t |
Debug authorisation levels AL0/AL1/AL2 (off-target-only model – no documented RA8D2 register; real state is in the DLM, see ra8_rsip_devsec.c).
| Enumerator | |
|---|---|
| k_ra8_rsip_debug_al0 | AL0 – no debug functions available. |
| k_ra8_rsip_debug_al1 | AL1 – non-secure debug only. |
| k_ra8_rsip_debug_al2 | AL2 – secure + non-secure debug. |
Definition at line 288 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_dotf_route_t : uint32_t |
DOTF key route command value written to DOTFn_CTRL.
| Enumerator | |
|---|---|
| k_ra8_rsip_dotf_off | Disable key feed. |
| k_ra8_rsip_dotf_on | Feed key from slot bits 31..16. |
Definition at line 251 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_handle_word_t : uint16_t |
Wrapped-key handle word counts (FSP rsip_wrapped_key_t).
A wrapped key blob is a 32-bit alg selector plus a number of 32-bit body words; the body word counts come from RSIP_WORD_SIZE_WRAPPED_KEY_* in the FSP private header.
Definition at line 221 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_hash_alg_t : uint32_t |
Algorithm selector value written to the HASH CTRL word.
Modelled algorithm-selector values for the RSIP HASH CTRL word. The shipping hash path is software SHA-256 (ra8_rsip_sha256), not this selector; HUM Ch 52 is a feature overview with no hash register map (issue #215).
Definition at line 130 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_isr_bits_t : uint8_t |
Field positions inside the IER / ISR words.
The RSIP routes a small handful of edge-triggered events into one peripheral IRQ line; HUM Ch 52.1 Table 52.1 p 3302 names the tamper line RSIP_TADI.
Definition at line 79 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_kdf_op_t : uint32_t |
KDF mode selector written to KDF_CTRL.
Definition at line 260 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_kv_op_t : uint32_t |
Key-vault command word values written to KV_CTRL.
Definition at line 187 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_kw_op_t : uint32_t |
Key-wrap command word values written to KW_CTRL.
| Enumerator | |
|---|---|
| k_ra8_rsip_kw_op_wrap | Wrap a plaintext handle -> blob. |
| k_ra8_rsip_kw_op_unwrap | Unwrap a blob -> handle. |
Definition at line 242 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_life_state_t : uint32_t |
Device-lifecycle state values (off-target-only model – no documented RA8D2 register; real state is in the DLM, see ra8_rsip_devsec.c).
Definition at line 273 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_mask_t : uint32_t |
Pre-computed bit masks for the CTRL / STATUS / ISR words.
Definition at line 94 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_oem_cmd_t : uint32_t |
OEM-key install opcode written to OEM_CTRL.
Mirrors the rsip_oem_cmd_t table in the FSP key-injection driver (r_rsip_key_injection.c). These opcodes select which algorithm + key length the OEM-flow installs into the wrapped key vault. HUM Ch 52 documents no key-vault register map (issue #215); the opcode values come from the FSP primitive above.
Definition at line 156 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_rsa_pad_t : uint32_t |
RSA encryption padding-scheme selector written to ASYM_ARG.
Selects the RSAES padding applied around the RSA primitive for the public-encrypt (ra8_rsip_rsa_encrypt) and private-decrypt (ra8_rsip_rsa_decrypt) entry points. RSAES-OAEP (PKCS #1 v2.2 Section 7.1, SHA-256 MGF1) is the recommended scheme for RSA-OAEP key transport; RSAES-PKCS1-v1_5 (Section 7.2) is provided for interop with legacy peers.
| Enumerator | |
|---|---|
| k_ra8_rsip_rsa_pad_pkcs1 | RSAES-PKCS1-v1_5 (legacy). |
| k_ra8_rsip_rsa_pad_oaep | RSAES-OAEP (SHA-256 MGF1). |
Definition at line 389 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_rsa_size_t : uint16_t |
RSA key-size selector (HUM Ch 52.1 Table 52.1 "RSA" p 3302).
| Enumerator | |
|---|---|
| k_ra8_rsip_rsa_1024 | 1024-bit RSA. |
| k_ra8_rsip_rsa_2048 | 2048-bit RSA. |
| k_ra8_rsip_rsa_3072 | 3072-bit RSA. |
| k_ra8_rsip_rsa_4096 | 4096-bit RSA. |
Definition at line 344 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_sizes_t : uint16_t |
Buffer sizes published to callers.
AES block size = 128 bits (HUM Ch 52.1 Table 52.1 "Symmetric cryptography" p 3302). Hash digest sizes follow FIPS PUB 180-4 / FIPS PUB 202.
Definition at line 440 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_status_bits_t : uint8_t |
Field positions inside the STATUS mailbox word.
Definition at line 60 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_sym_alg_t : uint8_t |
Symmetric-cipher algorithm selector low byte of SYM_CTRL.
The cipher engine multiplexes AES-128/192/256 and ChaCha20 across the same data path. The low byte selects the algorithm + key length; the next byte selects the mode (ra8_rsip_aes_mode_t); the next byte selects the direction (ra8_rsip_aes_dir_t).
Definition at line 205 of file ra8_rsip_regs_fields.h.
| enum ra8_rsip_tamper_src_t : uint32_t |
Tamper-source identifier bits inside TAMPER_CTRL / TAMPER_STATUS.
Invented off-target-only model: six external tamper lines plus three internal sources (RSIP self-fault, voltage glitch, clock glitch). The RA8D2 exposes no such RSIP tamper register – real tamper is an I/O-port feature whose response is handled by the RTC / MRAM / VBATT blocks. See ra8_rsip_devsec.c.
Definition at line 406 of file ra8_rsip_regs_fields.h.
|
inlinestatic |
Volatile pointer to a 32-bit RSIP register at offset.
Mirrors the ra8_glcdc_reg32 accessor pattern so the host test build can intercept reads and writes via ra8_fake_mmap. The accessor performs no validation; callers pass a value from ra8_rsip_off_t.
| [in] | offset | One of the k_ra8_rsip_off_* values. |
Definition at line 481 of file ra8_rsip_regs_fields.h.
References k_ra8_rsip_base_addr.
Referenced by internal_run_bist(), priv_complete(), priv_load_handle(), priv_push_bytes_to_port(), priv_push_handle_body(), priv_push_iv_lanes(), priv_wait_bit(), ra8_rsip_clear_status(), ra8_rsip_deinit(), ra8_rsip_dispatch(), ra8_rsip_enter_stop(), ra8_rsip_exit_stop(), ra8_rsip_get_status(), ra8_rsip_init(), ra8_rsip_sha256(), and ra8_rsip_trng_read().