ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_rsip_internal.h
Go to the documentation of this file.
1
43
44#pragma once
45
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50#include <stdint.h>
51
52#include "ra8_attributes.h"
53#include "ra8_err.h"
54#include "ra8_rsip.h"
55
69
81
110RA8_PRIV ra8_err_t priv_wait_bit(ra8_rsip_off_t offset, uint32_t mask);
111
136
155RA8_PRIV uint32_t priv_pack_le(const uint8_t* p);
156
175RA8_PRIV void priv_unpack_le(uint32_t word, uint8_t* p);
176
202RA8_PRIV void priv_push_bytes_to_port(ra8_rsip_off_t off, const uint8_t* in, uint32_t len);
203
229RA8_PRIV ra8_err_t priv_complete(uint32_t done_mask);
230
253
275RA8_PRIV uint8_t priv_aes_alg_byte(uint32_t alg);
276
301RA8_PRIV void priv_push_iv_lanes(ra8_rsip_off_t base, const uint8_t* iv, uint32_t iv_len);
302
325
347
348#ifdef __cplusplus
349}
350#endif
Annotation-attribute framework macros for ra8-firmware.
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Error Code Definitions for ra8-firmware.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Definition ra8_err.h:546
Renesas Secure IP (RSIP-E50D) HAL driver – public API.
uint8_t priv_aes_alg_byte(uint32_t alg)
Pick the AES algorithm byte that matches the wrapped key.
ra8_err_t priv_wait_bit(ra8_rsip_off_t offset, uint32_t mask)
Spin until mask is set in the register at offset.
Definition ra8_rsip.c:120
ra8_rsip_intern2_t
Round-3 file-private constants.
@ k_ra8_rsip_iv_words
IV / nonce register lanes.
@ k_ra8_rsip_kv_slot_max
Number of vault slots.
@ k_ra8_rsip_kv_slot_w
64-byte slot = 16 * uint32_t.
@ k_ra8_rsip_aes_block_w
16-byte block = 4 * uint32_t.
@ k_ra8_rsip_aead_iv_bytes
Fixed GCM / CCM nonce length.
void priv_unpack_le(uint32_t word, uint8_t *p)
Unpack a uint32_t into 4 little-endian bytes.
void priv_push_bytes_to_port(ra8_rsip_off_t off, const uint8_t *in, uint32_t len)
Stream a variable-length byte buffer into a single fixed MMIO port.
ra8_rsip_intern_t
File-private constants used by the polling helpers and byte packing / unpacking math.
@ k_ra8_rsip_byte_bits
Shift one byte.
@ k_ra8_rsip_word_shift
log2(sizeof(uint32_t)).
@ k_ra8_rsip_byte_shift_3
Shift to top byte of word.
@ k_ra8_rsip_byte_mask
Mask one byte out of a word.
@ k_ra8_rsip_poll_budget
Max iterations for any spin loop.
@ k_ra8_rsip_byte_shift_2
Shift to high half of low word.
uint32_t priv_handle_words_for(ra8_rsip_oem_cmd_t cmd)
Map an OEM opcode to the wrapped-key body word count.
ra8_err_t priv_hash_wait_done(void)
Wait for the HASH engine to raise DONE after the trailing block.
Definition ra8_rsip.c:204
void priv_load_handle(const ra8_rsip_key_handle_t *handle)
Stream a wrapped-key body into the engine input FIFO.
void priv_push_handle_body(const ra8_rsip_key_handle_t *handle)
Stream a wrapped key body into the staging port.
uint32_t priv_pack_le(const uint8_t *p)
Pack 4 little-endian bytes into a uint32_t.
void priv_push_iv_lanes(ra8_rsip_off_t base, const uint8_t *iv, uint32_t iv_len)
Push a bounded IV / nonce into 4 consecutive 32-bit lanes.
ra8_err_t priv_complete(uint32_t done_mask)
Drive a single mailbox completion (DONE poll + ack).
ra8_rsip_oem_cmd_t
OEM-key install opcode written to OEM_CTRL.
ra8_rsip_off_t
Byte offsets of every register the HAL touches.
Opaque wrapped-key handle.