36static const char*
s_tag =
"DOTF";
246 .end_addr = start + len - 1U,
static const char * s_tag
Logging / check tag.
#define RA8_INTERNAL
Marker that a function is intended to be static (file-local).
Validation and Error-Checking Macros for ra8-firmware.
#define RA8_RETURN_ON_ERROR(err, tag, message)
Early return on error, propagating the code upward.
#define RA8_CHECK_NULL_PTR(ptr, tag, message)
Reject nullptr pointer, returning k_ra8_err_null_ptr.
static const ra8_mstp_t s_dotf_mstp_table[k_ra8_dotf_channel_count]
Channel-index -> MSTP id lookup.
Decryption On The Fly (DOTF) HAL driver public API.
ra8_err_t ra8_dotf_deinit(void)
Disable DOTF and gate the OSPI clock.
ra8_err_t ra8_dotf_set_sca_level(uint8_t channel, ra8_dotf_sca_level_t level)
Update the side-channel countermeasure level for a channel.
ra8_err_t ra8_dotf_enable(uint8_t channel)
Enable AES decryption for one channel.
ra8_err_t ra8_dotf_install_key(uint8_t channel, const ra8_dotf_key_handle_t *handle)
Bind a wrapped AES key handle to a DOTF channel.
ra8_err_t ra8_dotf_select_region(uint8_t channel, uint8_t region_id)
Promote a staged region into the live CONVAREAST / CONVAREAD pair.
ra8_err_t ra8_dotf_set_iv(uint8_t channel, const uint32_t *iv_words)
Stage the AES counter-mode IV for a channel via REG03.
ra8_err_t ra8_dotf_init(void)
Power on the DOTF block and reset both channels.
ra8_err_t ra8_dotf_set_region(uint8_t channel, const ra8_dotf_region_t *region)
Stage one DOTF region in the channel's region table.
static ra8_err_t internal_open_stage_key_iv_region(const ra8_dotf_open_cfg_t *cfg)
Stage the wrapped key, IV, and conversion region for ra8_dotf_open.
ra8_err_t ra8_dotf_exit_stop(void)
Bring the DOTF block back from low-power mode.
ra8_err_t ra8_dotf_close(void)
Tear down DOTF and release all hardware state.
ra8_err_t ra8_dotf_enter_stop(void)
Park the DOTF block prior to entering a low-power mode.
ra8_err_t ra8_dotf_open(const ra8_dotf_open_cfg_t *cfg)
One-shot DOTF bring-up: init + install_key + set_iv + set_region (+ enable).
ra8_err_t ra8_dotf_set_region_window(uint8_t channel, uint32_t start, uint32_t len)
Stage a region from a (start, length) pair instead of a struct.
static ra8_err_t internal_open_finalise(const ra8_dotf_open_cfg_t *cfg)
Apply SCA level and (optionally) arm the AES core.
static ra8_err_t internal_open_validate_init(const ra8_dotf_open_cfg_t *cfg)
Validate ra8_dotf_open inputs and power up the DOTF block.
Decryption On The Fly (DOTF) register layout for the Renesas RA8D2.
@ k_ra8_dotf_channel_count
DOTF0 + DOTF1.
@ k_ra8_dotf_addr_low_mask
Low 12 bits read as 0/1 (HUM).
Error Code Definitions for ra8-firmware.
@ k_ra8_err_invalid_arg
Invalid function argument.
@ k_ra8_ok
Success – operation completed with all postconditions satisfied.
ra8_err_codes_t ra8_err_t
Canonical error-return type used by every ra8-firmware API.
Cross-translation-unit private helpers shared inside ra8_hal.
static bool internal_ra8_dotf_internal_channel_in_range(uint8_t channel)
Bound-check a DOTF channel index.
Lightweight Logging Interface for ra8-firmware.
Ref-counted Module Stop Control wrapper for the RA8D2.
ra8_err_t ra8_mstp_enable(ra8_mstp_t id)
Reference-counted "ungate this peripheral" request.
ra8_err_t ra8_mstp_disable(ra8_mstp_t id)
Reference-counted "gate this peripheral" request.
ra8_mstp_t
Packed (reg << 8) | bit module-stop identifier.
@ k_ra8_mstp_ospi0
MSTPB16 OSPI0+DOTF0.
@ k_ra8_mstp_ospi1
MSTPB17 OSPI1+DOTF1.
One-shot DOTF bring-up descriptor consumed by ra8_dotf_open.
bool enable_after
true => arm AES after staging.
uint32_t iv_words[4]
128-bit IV in word order.
ra8_dotf_sca_level_t sca_level
Side-channel level.
uint8_t channel
0 = DOTF0, 1 = DOTF1.
ra8_dotf_key_handle_t key
RSIP-wrapped key handle.
ra8_dotf_region_t region
Initial conversion region.
Conversion-area descriptor for ra8_dotf_set_region.
uint8_t region_id
0..k_ra8_dotf_max_regions-1 staging slot.