ROM APIs. More...
Data Structures | |
| union | api_boot_arg_t |
| Enter Bootloader API argument. More... | |
| struct | exip_region_param_t |
| struct | exip_region_context_t |
| struct | otp_driver_interface_t |
| OTP driver interface. More... | |
| struct | exip_driver_interface_t |
| EXIP driver interface. More... | |
| struct | bootloader_api_table_t |
| Bootloader API table. More... | |
| struct | sdp_driver_interface_t |
| SDP API interface. More... | |
| struct | xpi_ram_driver_interface_t |
| XPI RAM driver interface. More... | |
| struct | sm3_context_t |
| struct | sm4_context_t |
| struct | sm3_api_interface_t |
| struct | sm4_api_interface_t |
Functions | |
| static hpm_stat_t | rom_enter_bootloader (void *ctx) |
| Eneter specified Boot mode. More... | |
| static hpm_stat_t | rom_xpi_nor_get_config (XPI_Type *base, xpi_nor_config_t *nor_cfg, xpi_nor_config_option_t *cfg_option) |
| Get XPI NOR configuration via cfg_option. More... | |
| static hpm_stat_t | rom_xpi_nor_init (XPI_Type *base, xpi_nor_config_t *nor_config) |
| Initialize XPI NOR based on nor_config. More... | |
| static hpm_stat_t | rom_xpi_nor_erase (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start, uint32_t length) |
| Erase specified FLASH region. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_sector (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start) |
| Erase specified FLASH sector in blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_sector_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start) |
| Erase specified FLASH sector in non-blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_block (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start) |
| Erase specified FLASH blcok in blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_block_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t start) |
| Erase specified FLASH blcok in non-blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_chip (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config) |
| Erase the whole FLASH in blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_erase_chip_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config) |
| Erase the whole FLASH in non-blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_program (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, const uint32_t *src, uint32_t dst_addr, uint32_t length) |
| Program data to specified FLASH address in blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_page_program_nonblocking (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, const uint32_t *src, uint32_t dst_addr, uint32_t length) |
| Page-Program data to specified FLASH address in non-blocking way. More... | |
| static hpm_stat_t | rom_xpi_nor_read (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t *dst, uint32_t start, uint32_t length) |
| Read data from specified FLASH address. More... | |
| static hpm_stat_t | rom_xpi_nor_auto_config (XPI_Type *base, xpi_nor_config_t *config, xpi_nor_config_option_t *cfg_option) |
| Automatically configure XPI NOR based on cfg_option. More... | |
| static hpm_stat_t | rom_xpi_nor_get_property (XPI_Type *base, xpi_nor_config_t *nor_cfg, uint32_t property_id, uint32_t *value) |
| Get XPI NOR properties. More... | |
| static hpm_stat_t | rom_xpi_nor_get_status (XPI_Type *base, xpi_xfer_channel_t channel, const xpi_nor_config_t *nor_config, uint32_t addr, uint16_t *out_status) |
| Return the status register value on XPI NOR FLASH. More... | |
| static ATTR_RAMFUNC bool | rom_xpi_nor_remap_config (XPI_Type *base, uint32_t start, uint32_t len, uint32_t offset) |
| Configure the XPI Address Remapping Logic. More... | |
| static ATTR_RAMFUNC void | rom_xpi_nor_remap_disable (XPI_Type *base) |
| Disable XPI Remapping logic. More... | |
| static ATTR_RAMFUNC bool | rom_xpi_nor_is_remap_enabled (XPI_Type *base) |
| Check whether XPI Remapping is enabled. More... | |
| static ATTR_RAMFUNC bool | rom_xpi_nor_exip_region_config (XPI_Type *base, uint32_t index, exip_region_param_t *param) |
| Configure Specified EXiP Region. More... | |
| static ATTR_RAMFUNC void | rom_xpi_nor_exip_region_disable (XPI_Type *base, uint32_t index) |
| Disable EXiP Feature on specified EXiP Region. More... | |
| static ATTR_RAMFUNC void | rom_xpi_nor_exip_enable (XPI_Type *base) |
| Enable global EXiP logic. More... | |
| static ATTR_RAMFUNC void | rom_xpi_nor_exip_disable (XPI_Type *base) |
| Disable global EXiP logic. More... | |
| static void | rom_sdp_init (void) |
| Initialize SDP IP. More... | |
| static void | rom_sdp_deinit (void) |
| De-initialize SDP IP. More... | |
| static hpm_stat_t | rom_sdp_aes_set_key (sdp_aes_ctx_t *aes_ctx, const uint8_t *key, sdp_aes_key_bits_t key_bits, uint32_t key_idx) |
| Set AES key to SDP. More... | |
| static hpm_stat_t | rom_sdp_aes_crypt_ecb (sdp_aes_ctx_t *aes_ctx, sdp_aes_op_t op, uint32_t len, const uint8_t *in, uint8_t *out) |
| SDP AES ECB crypto operation(Encrypt or Decrypt) More... | |
| static hpm_stat_t | rom_sdp_aes_crypt_cbc (sdp_aes_ctx_t *aes_ctx, sdp_aes_op_t op, uint32_t length, uint8_t iv[16], const uint8_t *in, uint8_t *out) |
| SDP AES CBC crypto operation(Encrypt or Decrypt) More... | |
| static hpm_stat_t | rom_sdp_sm4_set_key (sdp_sm4_ctx_t *sm4_ctx, const uint8_t *key, sdp_sm4_key_bits_t key_bits, uint32_t key_idx) |
| Set SM4 key to SDP. More... | |
| static hpm_stat_t | rom_sdp_sm4_crypt_ecb (sdp_sm4_ctx_t *sm4_ctx, sdp_sm4_op_t op, uint32_t len, const uint8_t *in, uint8_t *out) |
| SDP SM4 ECB crypto operation(Encrypt or Decrypt) More... | |
| static hpm_stat_t | rom_sdp_sm4_crypt_cbc (sdp_sm4_ctx_t *sm4_ctx, sdp_sm4_op_t op, uint32_t length, uint8_t iv[16], const uint8_t *in, uint8_t *out) |
| SDP SM4 CBC crypto operation(Encrypt or Decrypt) More... | |
| static hpm_stat_t | rom_sdp_hash_init (sdp_hash_ctx_t *hash_ctx, sdp_hash_alg_t alg) |
| HASH initialization. More... | |
| static hpm_stat_t | rom_sdp_hash_update (sdp_hash_ctx_t *hash_ctx, const uint8_t *data, uint32_t length) |
| HASH Update. More... | |
| static hpm_stat_t | rom_sdp_hash_finish (sdp_hash_ctx_t *hash_ctx, uint8_t *digest) |
| HASH finialize. More... | |
| static hpm_stat_t | rom_sdp_memcpy (sdp_dma_ctx_t *dma_ctx, void *dst, const void *src, uint32_t length) |
| SDP memcpy operation. More... | |
| static hpm_stat_t | rom_sdp_memset (sdp_dma_ctx_t *dma_ctx, void *dst, uint8_t pattern, uint32_t length) |
| SDP memset operation. More... | |
| static void | rom_xpi_nor_api_setup (void) |
| Setup API Runtime environment on demand. More... | |
| static hpm_stat_t | rom_xpi_ram_get_config (XPI_Type *base, xpi_ram_config_t *ram_cfg, xpi_ram_config_option_t *cfg_option) |
| Get XPI RAM configuration based on cfg_option. More... | |
| static hpm_stat_t | rom_xpi_ram_init (XPI_Type *base, xpi_ram_config_t *ram_cfg) |
| Initialize XPI RAM. More... | |
| static hpm_stat_t | rom_sm3_init (sm3_context_t *ctx) |
| SM4 initialization. More... | |
| static hpm_stat_t | rom_sm3_update (sm3_context_t *ctx, const void *input, uint32_t len) |
| SM3 update operation. More... | |
| static hpm_stat_t | rom_sm3_finalize (sm3_context_t *ctx, uint8_t output[32]) |
| SM3 finalize Return the computing SM3 digest. More... | |
| static void | rom_sm4_setkey_enc (sm4_context_t *ctx, const uint8_t key[16]) |
| Set SM4 encryption key. More... | |
| static void | rom_sm4_setkey_dec (sm4_context_t *ctx, const uint8_t key[16]) |
| Set SM4 decryption key. More... | |
| static hpm_stat_t | rom_sm4_crypt_ecb (sm4_context_t *ctx, uint32_t mode, uint32_t length, const uint8_t *input, uint8_t *output) |
| SM4 ECB crypto operation(Encrypt or Decrypt) More... | |
| static hpm_stat_t | rom_sm4_crypt_cbc (sm4_context_t *ctx, uint32_t mode, uint32_t length, const uint8_t iv[16], const uint8_t *input, uint8_t *output) |
| SM4 CBC crypto operation(Encrypt or Decrypt) More... | |
ROM APIs.
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_AUTO (0U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot peripheral: Auto detected
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_UART (1U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot peripheral: UART
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_PERIPH_USBHID (2U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot Peripheral: USB-HID
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_ISP (3U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot source: ISP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_OTP (0U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot source: OTP
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_PRIMARY (1U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot source: Primary
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_SRC_SERIAL_BOOT (2U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
Boot source: Serial Boot
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
ROM API parameter tag
| #define API_BOOT_TAG (0xEBU) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
ROM API parameter tag
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0 ((XPI_Type *) HPM_XPI0_BASE) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
XPI0 Base pointer
| #define HPM_XPI0_BASE (0xF3000000UL) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3000000UL) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3040000UL) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3040000UL) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3040000UL) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3000000UL) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3000000UL) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI0_BASE (0xF3000000UL) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
XPI0 Base address
| #define HPM_XPI1 ((XPI_Type *) HPM_XPI1_BASE) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
XPI1 Base pointer
| #define HPM_XPI1 ((XPI_Type *) HPM_XPI1_BASE) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
XPI1 Base pointer
| #define HPM_XPI1_BASE (0xF3044000UL) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
XPI1 Base address
| #define HPM_XPI1_BASE (0xF3044000UL) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
XPI1 Base address
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t*)0x2001FF00U) |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM6800/HPM6880/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM6E00/HPM6E80/hpm_romapi.h>
| #define ROM_API_TABLE_ROOT ((const bootloader_api_table_t *)0x2001FF00U) |
#include <soc/HPM6P00/HPM6P81/hpm_romapi.h>
| #define SM4_DECRYPT 0 |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
| #define SM4_DECRYPT 0 |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
| #define SM4_ENCRYPT 1 |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
| #define SM4_ENCRYPT 1 |
#include <soc/HPM6700/HPM6750/hpm_romapi.h>
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Eneter specified Boot mode.
| [in] | ctx | Enter bootloader context |
| status_invalid | Invalid parameters were deteced |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP AES CBC crypto operation(Encrypt or Decrypt)
| [in] | aes_ctx | AES context |
| [in] | op | AES operation: encrypt or decrypt |
| [in] | length | Data length for AES encryption/decryption |
| [in] | iv | Initial vector/nonce |
| [in] | in | Input data |
| [out] | out | Output data |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP AES ECB crypto operation(Encrypt or Decrypt)
| [in] | aes_ctx | AES context |
| [in] | op | AES operation: encrypt or decrypt |
| [in] | len | Data length for AES encryption/decryption |
| [in] | in | Input data |
| [out] | out | Output data |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Set AES key to SDP.
| [in] | aes_ctx | AES context |
| [in] | key | AES key buffer |
| [in] | key_bits | AES key-bit option |
| [in] | key_idx | AES key index |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
De-initialize SDP IP.
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
HASH finialize.
| [in] | hash_ctx | HASH context |
| [out] | digest | the output digest |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
HASH initialization.
| [in] | hash_ctx | HASH context |
| [in] | alg | HASH algorithm |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
HASH Update.
| [in] | hash_ctx | HASH context |
| [in] | data | Data for HASH operation |
| [in] | length | of the data for HASH operation |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Initialize SDP IP.
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP memcpy operation.
| [in] | dma_ctx | DMA context |
| [out] | dst | Destination address for memcpy |
| [in] | src | Source address for memcpy |
| [in] | length | Size of data for memcpy operation |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP memset operation.
| [in] | dma_ctx | DMA context |
| [out] | dst | Destination address for memset |
| [in] | pattern | pattern for memset |
| [in] | length | Size of data for memset operation |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP SM4 CBC crypto operation(Encrypt or Decrypt)
| [in] | sm4_ctx | SM4 context |
| [in] | op | SM4 operation: encrypt or decrypt |
| [in] | length | Data length for SM4 encryption/decryption |
| [in] | iv | Initial vector/nonce |
| [in] | in | Input data |
| [out] | out | Output data |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
SDP SM4 ECB crypto operation(Encrypt or Decrypt)
| [in] | sm4_ctx | SM4 context |
| [in] | op | SM4 operation: encrypt or decrypt |
| [in] | len | Data length for SM4 encryption/decryption |
| [in] | in | Input data |
| [out] | out | Output data |
|
inlinestatic |
#include <soc/HPM5300/HPM5361/hpm_romapi.h>
Set SM4 key to SDP.
| [in] | sm4_ctx | SM4 context |
| [in] | key | SM4 key buffer |
| [in] | key_bits | SM4 key-bit option |
| [in] | key_idx | SM4 key index |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
SM3 finalize Return the computing SM3 digest.
| [in] | ctx | SM3 context |
| [out] | output | SM3 digest calculated by the above API |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
SM4 initialization.
| [in] | ctx | SM3 context |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
SM3 update operation.
| [in,out] | ctx | SM3 context |
| [in] | input | Data for SM3 calculation |
| [in] | len | length of the data for SM3 calculation |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
SM4 CBC crypto operation(Encrypt or Decrypt)
| [in] | ctx | SM4 context |
| [in] | mode | SM4 operation: 1 - ENCRYPT, 0 - DECRYPT |
| [in] | length | Data length for SM4 encryption/decryption |
| [in] | iv | The initial vector for SM4 CBC crypto operation |
| [in] | input | Input data |
| [out] | output | Output data |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
SM4 ECB crypto operation(Encrypt or Decrypt)
| [in] | ctx | SM4 context |
| [in] | mode | SM4 operation: 1 - ENCRYPT, 0 - DECRYPT |
| [in] | length | Data length for SM4 encryption/decryption |
| [in] | input | Input data |
| [out] | output | Output data |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Set SM4 decryption key.
| [in] | ctx | SM4 context |
| [in] | key | SM4 decryption key |
|
inlinestatic |
#include <soc/HPM6300/HPM6360/hpm_romapi.h>
Set SM4 encryption key.
| [in] | ctx | SM4 context |
| [in] | key | SM4 encryption key |
|
inlinestatic |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Setup API Runtime environment on demand.
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Automatically configure XPI NOR based on cfg_option.
| [in] | base | XPI base address |
| [out] | config | XPI NOR configuration structure |
| [in] | cfg_option | XPI NOR configuration option |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase specified FLASH region.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI nOR configuration |
| [in] | start | Erase address start address |
| [in] | length | Region size to be erased |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase specified FLASH blcok in blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | start | Block address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase specified FLASH blcok in non-blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | start | Block address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase the whole FLASH in blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase the whole FLASH in non-blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase specified FLASH sector in blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | start | Sector address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Erase specified FLASH sector in non-blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | start | Sector address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Disable global EXiP logic.
| [in] | base | XPI base address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Enable global EXiP logic.
| [in] | base | XPI base address |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Configure Specified EXiP Region.
| [in] | base | XPI base address |
| [in] | index | EXiP Region index |
| [in] | param | ExiP Region Parameter |
| true | All parameters are valid |
| false | Any parameter is invalid |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Disable EXiP Feature on specified EXiP Region.
| [in] | base | XPI base address |
| [in] | index | EXiP Region index |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Get XPI NOR configuration via cfg_option.
| [in] | base | XPI base address |
| [out] | nor_cfg | XPI NOR configuration structure |
| [in] | cfg_option | XPI NOR configuration option |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Get XPI NOR properties.
| [in] | base | XPI base address |
| [in] | nor_cfg | XPI NOR configuration structure |
| [in] | property_id | |
| [out] | value | property value retrieved by this API |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Return the status register value on XPI NOR FLASH.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | addr | FLASH address offset |
| [out] | out_status | FLASH status register value |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Initialize XPI NOR based on nor_config.
| [in] | base | XPI base address |
| [in] | nor_config | XPI NOR configuration |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Check whether XPI Remapping is enabled.
| [in] | base | XPI base address |
| true | Remapping logic is enabled |
| false | Remapping logic is disabled |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Page-Program data to specified FLASH address in non-blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | src | data source address |
| [in] | dst_addr | Destination FLASH address |
| [in] | length | length of data to be programmed |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Program data to specified FLASH address in blocking way.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | src | data source address |
| [in] | dst_addr | Destination FLASH address |
| [in] | length | length of data to be programmed |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Read data from specified FLASH address.
| [in] | base | XPI base address |
| [in] | channel | XPI transfer channel |
| [in] | nor_config | XPI NOR configuration |
| [in] | dst | Memory start address to store the data read out from FLASH |
| [in] | start | FLASH address for data read |
| [in] | length | length of data to be read out |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Configure the XPI Address Remapping Logic.
| [in] | base | XPI base address |
| [in] | start | Start Address (memory mapped address) |
| [in] | len | Size for the remapping region |
| [in] | offset | Relative address based on parameter "start" |
| true | is all parameters are valid |
| false | if any parameter is invalid |
|
inlinestatic |
#include <soc/HPM5300/HPM5301/hpm_romapi.h>
Disable XPI Remapping logic.
| [in] | base | XPI base address |
|
inlinestatic |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Get XPI RAM configuration based on cfg_option.
| [in] | base | XPI base address |
| [out] | ram_cfg | XPI RAM configuration structure |
| [in] | cfg_option | XPI RAM configuration option |
|
inlinestatic |
#include <soc/HPM6200/HPM6280/hpm_romapi.h>
Initialize XPI RAM.
| [in] | base | XPI base address |
| [in] | ram_cfg | XPI ram configuration |