![]() |
xilsecure
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XSecure_AesDmaCfg |
| This structure contains parameters to configure DMA for AES. More... | |
Macros | |
| #define | XSECURE_AES_BASEADDR (0x040F0000U) |
| AES Base Address. More... | |
| #define | XSECURE_SSS_ADDRESS (0x040A0090U) |
| SSS base address. More... | |
| #define | XSECURE_SSS_MAX_SRCS (5U) |
| SSS Maximum resources. More... | |
| #define | XSECURE_SSS_SHA_MASK (0xF00U) |
| SSS SHA3 instance 0 mask value. More... | |
| #define | XSECURE_SSS_SHA_DMA0_VAL (0x500U) |
| SSS SHA3 instance 0 DMA0 value. More... | |
| #define | XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
| Not to configure Dst DMA at this address in AES. More... | |
| #define | XSECURE_ENABLE_BYTE_SWAP (0x1U) |
| Enables data swap in AES. More... | |
| #define | XSECURE_DISABLE_BYTE_SWAP (0x0U) |
| Disables data swap in AES. More... | |
| #define | XSECURE_SSS_ADDRESS (0xF1110500U) |
| SSS base address. More... | |
| #define | XSECURE_SSS_MAX_SRCS (8U) |
| SSS Maximum resources. More... | |
| #define | XSECURE_SSS_SHA3_0_MASK (0xF0000U) |
| SSS SHA3 instance 0 mask value. More... | |
| #define | XSECURE_SSS_SHA3_0_DMA0_VAL (0xC0000U) |
| SSS SHA3 instance 0 DMA0 value. More... | |
| #define | XSECURE_SSS_SHA3_0_DMA1_VAL (0x70000U) |
| SSS SHA3 instance 0 DMA1 value. More... | |
| #define | XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
| Not to configure Dst DMA at this address in AES. More... | |
| #define | XSECURE_ENABLE_BYTE_SWAP (0x1U) |
| Enables data swap in AES. More... | |
| #define | XSECURE_DISABLE_BYTE_SWAP (0x0U) |
| Disables data swap in AES. More... | |
| #define | XSECURE_AES_ADDRESS (0xF11E0000U) |
| AES BaseAddress. More... | |
| #define | XSECURE_SHA_ADDRESS (0xF1210000U) |
| SHA BaseAddress. More... | |
| #define | XSECURE_RSA_ECDSA_RSA_ADDRESS (0xF1200000U) |
| RSA ECDSA BaseAddress. More... | |
| #define | XSECURE_TRNG_COMPUTE_NO_OF_GENERATES_SHIFT (5U) |
| Shift to calculate no of TRNG generates. More... | |
| #define | XSECURE_SSS_ADDRESS (0xF1110500U) |
| SSS base address. More... | |
| #define | XSECURE_SSS_MAX_SRCS (8U) |
| Maximum resources. More... | |
| #define | XSECURE_SSS_SHA3_MASK (0xF0000U) |
| SSS SHA3 instance mask value. More... | |
| #define | XSECURE_SSS_SHA2_MASK (0xF000000U) |
| SSS SHA3 instance mask value. More... | |
| #define | XSECURE_SSS_SHA3_DMA0_VAL (0xC0000U) |
| SSS SHA3 instance DMA0 value. More... | |
| #define | XSECURE_SSS_SHA3_DMA1_VAL (0x70000U) |
| SSS SHA3 instance DMA1 value. More... | |
| #define | XSECURE_SSS_SHA2_DMA0_VAL (0xA000000U) |
| SSS SHA2 instance DMA0 value. More... | |
| #define | XSECURE_SSS_SHA2_DMA1_VAL (0xF000000U) |
| SSS SHA2 instance DMA1 value. More... | |
| #define | XSECURE_ENABLE_BYTE_SWAP (0x1U) |
| Enables data swap in AES. More... | |
| #define | XSECURE_DISABLE_BYTE_SWAP (0x0U) |
| Disables data swap in AES. More... | |
| #define | XSECURE_TRNG_USER_CFG_SEED_LIFE XTRNGPSX_USER_CFG_SEED_LIFE |
| User configuration seed life. More... | |
| #define | XSECURE_TRNG_USER_CFG_DF_LENGTH XTRNGPSX_USER_CFG_DF_LENGTH |
| User configuration DF length. More... | |
| #define | XSECURE_TRNG_USER_CFG_ADAPT_TEST_CUTOFF XTRNGPSX_USER_CFG_ADAPT_TEST_CUTOFF |
| Adapt test cutoff. More... | |
| #define | XSECURE_TRNG_USER_CFG_REP_TEST_CUTOFF XTRNGPSX_USER_CFG_REP_TEST_CUTOFF |
| Rep test cutoff. More... | |
| #define | XSECURE_AES_KTE_GO_ADDRESS (0xF11E0234U) |
| AES KTE GO address. More... | |
| #define | XSECURE_AES_KTE_RESTART_ADDRESS (0xF11E0238U) |
| AES Key Transfer Engine Restart register. More... | |
| #define | XSECURE_AES_KTE_DONE_ADDRESS (0xF11E023CU) |
| AES Key Transfer Engine Done. More... | |
| #define | XSECURE_AES_KTE_CNT_ADDRESS (0xF11E0240U) |
| AES Key Transfer Engine Count address. More... | |
| #define | XSECURE_AES_KTE_GO_ENABLE (0x1U) |
| AES KTE GO enable. More... | |
| #define | XSECURE_AES_KTE_GO_DISABLE (0x0U) |
| AES KTE GO disable. More... | |
| #define | XSECURE_AES_KTE_DONE_MASK (0x1U) |
| AES Key Transfer Engine Done mask. More... | |
| #define | XSECURE_AES_KTE_CNT_MASK (0x6U) |
| AES Key Transfer Engine Count value. More... | |
| #define | XSECURE_AES_KTE_DONE_POLL_TIMEOUT (4000U) |
| AES Key Transfer complete poll timeout. More... | |
| #define | XCSUDMA_WORD_SIZE (4U) |
| WORD size. More... | |
| #define | XSECURE_SHA_512_HASH_LEN (64U) |
| SHA_512 block length. More... | |
| #define | XSECURE_SHA3_256_HASH_LEN (32U) |
| SHA3_256 block length. More... | |
| #define | XSECURE_SHA2_256_BLOCK_LEN (64U) |
| SHA2_256 block length. More... | |
| #define | XSECURE_SHA3_BLOCK_LEN (104U) |
| SHA3 block length. More... | |
| #define | XSECURE_SHA2_384_BLOCK_LEN (128U) |
| SHA2_384 block length. More... | |
| #define | XSECURE_SHAKE_256_BLOCK_LEN (136U) |
| SHAKE_256 block length. More... | |
| #define | XSECURE_SHA3_384_HASH_LEN (48U) |
| SHA3_384 hash length. More... | |
| #define | XSECURE_SHA2_384_HASH_LEN (48U) |
| SHA2_384 hash length. More... | |
| #define | XSECURE_SHAKE_256_HASH_LEN (32U) |
| SHAKE_256 hash length. More... | |
| #define | XSECURE_SHA2_256_HASH_LEN (32U) |
| SHA2_256 hash length. More... | |
| #define | XSECURE_SHA3_384_HASH_WORD_LEN (XSECURE_SHA3_384_HASH_LEN / XCSUDMA_WORD_SIZE) |
| SHA3_384 hash word length. More... | |
| #define | XSECURE_SHA2_384_HASH_WORD_LEN (XSECURE_SHA2_384_HASH_LEN / XCSUDMA_WORD_SIZE) |
| SHA2_384 hash word length. More... | |
| #define | XSECURE_SHAKE_256_HASH_WORD_LEN (XSECURE_SHAKE_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
| SHAKE_256 hash word length. More... | |
| #define | XSECURE_SHA2_256_HASH_WORD_LEN (XSECURE_SHA2_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
| SHA2_256 hash word length. More... | |
| #define | XSECURE_RSA_KEY_ADDRESS (0xF2008000U) |
| Address to copy RSA input parameters. More... | |
| #define | XSECURE_AES_ADDRESS (0xF11E0000U) |
| AES BaseAddress. More... | |
| #define | XSECURE_SHA_ADDRESS (0xF1210000U) |
| SHA BaseAddress. More... | |
| #define | XSECURE_RSA_ECDSA_RSA_ADDRESS (0xF1200000U) |
| RSA ECDSA BaseAddress. More... | |
| #define | XSECURE_SSS_ADDRESS (0xF1110500U) |
| SSS base address. More... | |
| #define | XSECURE_SSS_MAX_SRCS (8U) |
| Maximum resources. More... | |
| #define | XSECURE_SSS_SHA3_0_MASK (0xF0000U) |
| SSS SHA3 instance 0 mask value. More... | |
| #define | XSECURE_SSS_SHA3_1_MASK (0xF000000U) |
| SSS SHA3 instance 1 mask value. More... | |
| #define | XSECURE_SSS_SHA3_0_DMA0_VAL (0xC0000U) |
| SSS SHA3 instance 0 DMA0 value. More... | |
| #define | XSECURE_SSS_SHA3_0_DMA1_VAL (0x70000U) |
| SSS SHA3 instance 0 DMA1 value. More... | |
| #define | XSECURE_SSS_SHA3_1_DMA0_VAL (0xA000000U) |
| SSS SHA3 instance 1 DMA0 value. More... | |
| #define | XSECURE_SSS_SHA3_1_DMA1_VAL (0xF000000U) |
| SSS SHA3 instance 1 DMA1 value. More... | |
| #define | XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
| Not to configure Dst DMA at this address in AES. More... | |
| #define | XSECURE_ENABLE_BYTE_SWAP (0x1U) |
| Enables data swap in AES. More... | |
| #define | XSECURE_DISABLE_BYTE_SWAP (0x0U) |
| Disables data swap in AES. More... | |
| #define | XSECURE_AES_ECB_OFFSET (0x20U) |
| AES ECB offset. More... | |
| #define | XSECURE_TRNG_USER_CFG_SEED_LIFE XTRNGPSX_USER_CFG_SEED_LIFE |
| User configuration seed life. More... | |
| #define | XSECURE_TRNG_USER_CFG_DF_LENGTH XTRNGPSX_USER_CFG_DF_LENGTH |
| User configuration DF length. More... | |
| #define | XSECURE_TRNG_USER_CFG_ADAPT_TEST_CUTOFF XTRNGPSX_USER_CFG_ADAPT_TEST_CUTOFF |
| Adapt test cutoff. More... | |
| #define | XSECURE_TRNG_USER_CFG_REP_TEST_CUTOFF XTRNGPSX_USER_CFG_REP_TEST_CUTOFF |
| Rep test cutoff. More... | |
| #define | XSECURE_RSA_KEY_ADDRESS (0xF2008000U) |
| Address to copy RSA input parameters when the provided SyndromeAddr is 64-bit. More... | |
Functions | |
| u32 | XSecure_SssMask (XSecure_SssSrc InputSrc, XSecure_SssSrc OutputSrc, u32 Value) |
| This function masks the secure stream switch value. More... | |
| int | XSecure_AesValidateSize (u32 Size, u8 IsLastChunk) |
| This function validates whether size of the data is word aligned and if it is the last chunk size should be qword aligned. More... | |
| int | XSecure_AesPlatPmcDmaCfgAndXfer (XPmcDma *PmcDmaPtr, const XSecure_AesDmaCfg *AesDmaCfg, u32 Size, UINTPTR BaseAddress) |
| This function sets the SRC and DEST channel endianness configurations of PMC DMA and transfers data. More... | |
| void | XSecure_AesPmcDmaCfgEndianness (XPmcDma *InstancePtr, XPmcDma_Channel Channel, u8 EndianType) |
| This is a helper function to enable/disable byte swapping feature of PMC DMA. More... | |
| int | XSecure_PlatIpiHandler (XPlmi_Cmd *Cmd) |
| This function calls respective IPI handler based on the API_ID. More... | |
| void | XSecure_UpdateTrngCryptoStatus (u32 Op) |
| This function updates TRNG crypto indicator. More... | |
| void | XSecure_ConfigureDmaByteSwap (u32 Op) |
| This function configures DMA Byte Swap based on the user input. More... | |
| int | XSecure_AesPlatPmcDmaCfgAndXfer (XPmcDma *PmcDmaPtr, XSecure_AesDmaCfg *AesDmaCfg, u32 Size, UINTPTR BaseAddress) |
| This function sets the SRC and DEST channel endianness configurations of PMC DMA and transfers data. More... | |
| int | XSecure_GetRandomNum (u8 *Output, u32 Size) |
| This function generates random number of given size. More... | |
| int | XSecure_ECCRandInit (void) |
| This function initializes the trng in HRNG mode if it is not initialized and it is applicable only for Versal_2Ve_2Vm. More... | |
| XTrngpsx_Instance * | XSecure_GetTrngInstance (void) |
| This function provides the pointer to the common trng instance. More... | |
| int | XSecure_InitiateASUKeyTransfer (void) |
| This function initiates the key transfer to ASU. More... | |
| int | XSecure_ShaValidateModeAndCfgInstance (XSecure_Sha *const InstancePtr, XSecure_ShaMode ShaMode) |
| This function validates the SHA Mode and initialize SHA instance. More... | |
| int | XSecure_ShaDmaXfer (XPmcDma *DmaPtr, u64 DataAddr, u32 Size, u8 IsLastUpdate) |
| This function transfer data to SHA engine from DMA. More... | |
| int | XSecure_MemCpyAndChangeEndianness (u64 DestAddress, u64 SrcAddress, u32 Length) |
| This function can copy the content of memory from 64-bit address to 32-bit address and change endianness of destination data. More... | |
Variables | |
| u64 | XSecure_AesDmaCfg::SrcDataAddr |
| Address of source buffer. More... | |
| u64 | XSecure_AesDmaCfg::DestDataAddr |
| Address of destination buffer. More... | |
| u8 | XSecure_AesDmaCfg::SrcChannelCfg |
| DMA Source channel configuration. More... | |
| u8 | XSecure_AesDmaCfg::DestChannelCfg |
| DMA destination channel configuration. More... | |
| u8 | XSecure_AesDmaCfg::IsLastChunkSrc |
| Flag for last update in source. More... | |
| u8 | XSecure_AesDmaCfg::IsLastChunkDest |
| Flag for last update in destination. More... | |
| u32 | XSecure_AesKeyLookup::RegOffset |
| Register offset for key source. More... | |
| u32 | XSecure_AesKeyLookup::KeySrcSelVal |
| Selection value for key source. More... | |
| u8 | XSecure_AesKeyLookup::UsrWrAllowed |
| User write allowed or not for key source. More... | |
| u8 | XSecure_AesKeyLookup::DecAllowed |
| Decryption allowed or not for key source. More... | |
| u8 | XSecure_AesKeyLookup::EncAllowed |
| Encryption allowed or not for key source. More... | |
| u8 | XSecure_AesKeyLookup::KeyDecSrcAllowed |
| Key decryption source allowed. More... | |
| u32 | XSecure_AesKeyLookup::KeyDecSrcSelVal |
| Selection value for key decryption source. More... | |
| u32 | XSecure_AesKeyLookup::KeyClearVal |
| Key source clear value. More... | |
AES_KEY_CLEAR register | |
| enum | XSecure_AesKeySrc { XSECURE_AES_BBRAM_KEY = 0, XSECURE_AES_BBRAM_RED_KEY, XSECURE_AES_BH_KEY, XSECURE_AES_BH_RED_KEY, XSECURE_AES_EFUSE_KEY, XSECURE_AES_EFUSE_RED_KEY, XSECURE_AES_EFUSE_USER_KEY_0, XSECURE_AES_EFUSE_USER_KEY_1, XSECURE_AES_EFUSE_USER_RED_KEY_0, XSECURE_AES_EFUSE_USER_RED_KEY_1, XSECURE_AES_KUP_KEY, XSECURE_AES_PUF_KEY, XSECURE_AES_USER_KEY_0, XSECURE_AES_USER_KEY_1, XSECURE_AES_USER_KEY_2, XSECURE_AES_USER_KEY_3, XSECURE_AES_USER_KEY_4, XSECURE_AES_USER_KEY_5, XSECURE_AES_USER_KEY_6, XSECURE_AES_USER_KEY_7, XSECURE_AES_EXPANDED_KEYS, XSECURE_AES_PUF_RED_EXPANDED_KEYS, XSECURE_AES_ALL_KEYS, XSECURE_AES_INVALID_KEY, XSECURE_AES_BH_KEY = 0, XSECURE_AES_BH_RED_KEY, XSECURE_AES_EFUSE_KEY, XSECURE_AES_EFUSE_RED_KEY, XSECURE_AES_KUP_KEY, XSECURE_AES_FAMILY_KEY, XSECURE_AES_PUF_KEY, XSECURE_AES_USER_KEY_0, XSECURE_AES_USER_KEY_1, XSECURE_AES_USER_KEY_2, XSECURE_AES_USER_KEY_3, XSECURE_AES_USER_KEY_4, XSECURE_AES_USER_KEY_5, XSECURE_AES_USER_KEY_6, XSECURE_AES_USER_KEY_7, XSECURE_AES_EXPANDED_KEYS, XSECURE_AES_PUF_RED_EXPANDED_KEYS, XSECURE_AES_ALL_KEYS, XSECURE_AES_INVALID_KEY } |
| Used for selecting the Key source of AES Core. More... | |
| enum | XSecure_SssSrc { XSECURE_SSS_DMA0 = 0, XSECURE_SSS_AES, XSECURE_SSS_SHA, XSECURE_SSS_SBI, XSECURE_SSS_INVALID, XSECURE_SSS_DMA0 = 0, XSECURE_SSS_DMA1, XSECURE_SSS_PTPI, XSECURE_SSS_AES, XSECURE_SSS_SHA3_0, XSECURE_SSS_SBI, XSECURE_SSS_PZI, XSECURE_SSS_INVALID, XSECURE_SSS_IGNORE = -1, XSECURE_SSS_DMA0 = 0, XSECURE_SSS_DMA1, XSECURE_SSS_PTPI, XSECURE_SSS_AES, XSECURE_SSS_SHA3, XSECURE_SSS_SBI, XSECURE_SSS_SHA2, XSECURE_SSS_INVALID, XSECURE_SSS_DMA0 = 0, XSECURE_SSS_DMA1, XSECURE_SSS_PTPI, XSECURE_SSS_AES, XSECURE_SSS_SHA3_0, XSECURE_SSS_SBI, XSECURE_SSS_SHA3_1, XSECURE_SSS_INVALID } |
| Sources to be selected to configure secure stream switch. More... | |
| enum | XSecure_AesOp { XSECURE_ENCRYPT, XSECURE_DECRYPT, XSECURE_ENCRYPT, XSECURE_DECRYPT } |
| Used to select the AES Encrypt/ Decrypt operation. More... | |
| #define | XSECURE_AES_KEY_CLEAR_OFFSET (0x00000014U) |
| < AES_KEY_CLEAR register offset and definitions More... | |
| #define | XSECURE_AES_KEY_CLEAR_PUF_KEY_MASK (0x00200000U) |
| #define | XSECURE_AES_KEY_CLEAR_BH_RED_KEY_MASK (0x00080000U) |
| #define | XSECURE_AES_KEY_CLEAR_BH_KEY_MASK (0x00040000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_RED_KEY_MASK (0x00008000U) |
| #define | XSECURE_AES_KEY_CLEAR_EFUSE_KEY_MASK (0x00001000U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_7_MASK (0x00000800U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_6_MASK (0x00000400U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_5_MASK (0x00000200U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_4_MASK (0x00000100U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_3_MASK (0x00000080U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_2_MASK (0x00000040U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_1_MASK (0x00000020U) |
| #define | XSECURE_AES_KEY_CLEAR_USER_KEY_0_MASK (0x00000010U) |
| #define | XSECURE_AES_KEY_CLEAR_KUP_KEY_MASK (0x00000002U) |
| #define | XSECURE_AES_KEY_CLEAR_AES_KEY_ZEROIZE_MASK (0x00000001U) |
| #define | XSECURE_AES_KEY_CLR_REG_CLR_MASK (0x00000000U) |
| #define | XSECURE_AES_KEY_CLEAR_ALL_KEYS_MASK (0x003FFFF3U) |
| #define | XSECURE_AES_KEY_CLEAR_PUF_RED_EXPANDED_KEYS_MASK (0x00288003U) |
| #define | XSECURE_AES_KEY_DEC_SEL_BH_RED (0x1U) |
| #define | XSECURE_AES_KEY_DEC_SEL_EFUSE_RED (0x2U) |
| #define | XSECURE_AES_INVALID_CFG (0xFFFFFFFFU) |
| #define | XSECURE_MAX_KEY_SOURCES XSECURE_AES_EXPANDED_KEYS |
| Max key source value. More... | |
| #define | XCSUDMA_WORD_SIZE (4U) |
| WORD size. More... | |
| #define | XSECURE_SHA3_256_HASH_LEN (32U) |
| SHA3_256 block length. More... | |
| #define | XSECURE_SHA2_256_BLOCK_LEN (64U) |
| SHA2_256 block length. More... | |
| #define | XSECURE_SHAKE_256_BLOCK_LEN (136U) |
| SHAKE_256 block length. More... | |
| #define | XSECURE_SHAKE_256_HASH_LEN (32U) |
| SHAKE_256 hash length. More... | |
| #define | XSECURE_SHAKE_256_HASH_WORD_LEN (XSECURE_SHAKE_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
| SHAKE_256 hash word length. More... | |
| #define | SHA256 (0U) /** SHA256 mode */ |
| #define | SHAKE256 (1U) /** SHAKE256 mode */ |
| #define XCSUDMA_WORD_SIZE (4U) |
WORD size.
| #define XCSUDMA_WORD_SIZE (4U) |
WORD size.
| #define XSECURE_AES_ADDRESS (0xF11E0000U) |
AES BaseAddress.
| #define XSECURE_AES_ADDRESS (0xF11E0000U) |
AES BaseAddress.
| #define XSECURE_AES_BASEADDR (0x040F0000U) |
AES Base Address.
| #define XSECURE_AES_ECB_OFFSET (0x20U) |
AES ECB offset.
Referenced by XSecure_AesEcbCfg(), XSecure_AesEcbDecrypt(), and XSecure_AesKeyUnwrap().
| #define XSECURE_AES_KEY_CLEAR_OFFSET (0x00000014U) |
< AES_KEY_CLEAR register offset and definitions
| #define XSECURE_AES_KTE_CNT_ADDRESS (0xF11E0240U) |
AES Key Transfer Engine Count address.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_CNT_MASK (0x6U) |
AES Key Transfer Engine Count value.
| #define XSECURE_AES_KTE_DONE_ADDRESS (0xF11E023CU) |
AES Key Transfer Engine Done.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_DONE_MASK (0x1U) |
AES Key Transfer Engine Done mask.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_DONE_POLL_TIMEOUT (4000U) |
AES Key Transfer complete poll timeout.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_GO_ADDRESS (0xF11E0234U) |
AES KTE GO address.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_GO_DISABLE (0x0U) |
AES KTE GO disable.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_GO_ENABLE (0x1U) |
AES KTE GO enable.
Referenced by XSecure_InitiateASUKeyTransfer().
| #define XSECURE_AES_KTE_RESTART_ADDRESS (0xF11E0238U) |
AES Key Transfer Engine Restart register.
| #define XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
Not to configure Dst DMA at this address in AES.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| #define XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
Not to configure Dst DMA at this address in AES.
| #define XSECURE_AES_NO_CFG_DST_DMA (0xFFFFFFFFU) |
Not to configure Dst DMA at this address in AES.
| #define XSECURE_DISABLE_BYTE_SWAP (0x0U) |
Disables data swap in AES.
Referenced by XSecure_AesEcbDecrypt(), XSecure_AesKeyUnwrap(), and XSecure_AesPlatPmcDmaCfgAndXfer().
| #define XSECURE_DISABLE_BYTE_SWAP (0x0U) |
Disables data swap in AES.
| #define XSECURE_DISABLE_BYTE_SWAP (0x0U) |
Disables data swap in AES.
| #define XSECURE_DISABLE_BYTE_SWAP (0x0U) |
Disables data swap in AES.
| #define XSECURE_ENABLE_BYTE_SWAP (0x1U) |
Enables data swap in AES.
Referenced by XSecure_AesDecryptKat(), XSecure_AesEncryptKat(), and XSecure_AesPlatPmcDmaCfgAndXfer().
| #define XSECURE_ENABLE_BYTE_SWAP (0x1U) |
Enables data swap in AES.
| #define XSECURE_ENABLE_BYTE_SWAP (0x1U) |
Enables data swap in AES.
| #define XSECURE_ENABLE_BYTE_SWAP (0x1U) |
Enables data swap in AES.
| #define XSECURE_MAX_KEY_SOURCES XSECURE_AES_EXPANDED_KEYS |
Max key source value.
| #define XSECURE_RSA_ECDSA_RSA_ADDRESS (0xF1200000U) |
RSA ECDSA BaseAddress.
| #define XSECURE_RSA_ECDSA_RSA_ADDRESS (0xF1200000U) |
RSA ECDSA BaseAddress.
| #define XSECURE_RSA_KEY_ADDRESS (0xF2008000U) |
Address to copy RSA input parameters.
| #define XSECURE_RSA_KEY_ADDRESS (0xF2008000U) |
Address to copy RSA input parameters when the provided SyndromeAddr is 64-bit.
| #define XSECURE_SHA2_256_BLOCK_LEN (64U) |
SHA2_256 block length.
| #define XSECURE_SHA2_256_BLOCK_LEN (64U) |
SHA2_256 block length.
| #define XSECURE_SHA2_256_HASH_LEN (32U) |
SHA2_256 hash length.
Referenced by XSecure_LmsLookupParamSet(), XSecure_LmsOtsLookupParamSet(), XSecure_Sha2256Kat(), and XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHA2_256_HASH_WORD_LEN (XSECURE_SHA2_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
SHA2_256 hash word length.
| #define XSECURE_SHA2_384_BLOCK_LEN (128U) |
SHA2_384 block length.
| #define XSECURE_SHA2_384_HASH_LEN (48U) |
SHA2_384 hash length.
Referenced by XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHA2_384_HASH_WORD_LEN (XSECURE_SHA2_384_HASH_LEN / XCSUDMA_WORD_SIZE) |
SHA2_384 hash word length.
| #define XSECURE_SHA3_256_HASH_LEN (32U) |
SHA3_256 block length.
| #define XSECURE_SHA3_256_HASH_LEN (32U) |
SHA3_256 block length.
Referenced by XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHA3_384_HASH_LEN (48U) |
SHA3_384 hash length.
Referenced by XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHA3_384_HASH_WORD_LEN (XSECURE_SHA3_384_HASH_LEN / XCSUDMA_WORD_SIZE) |
SHA3_384 hash word length.
| #define XSECURE_SHA3_BLOCK_LEN (104U) |
SHA3 block length.
Referenced by XSecure_HmacFinal(), XSecure_HmacInit(), and XSecure_HmacUpdate().
| #define XSECURE_SHA_512_HASH_LEN (64U) |
SHA_512 block length.
Referenced by XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHA_ADDRESS (0xF1210000U) |
SHA BaseAddress.
| #define XSECURE_SHA_ADDRESS (0xF1210000U) |
SHA BaseAddress.
| #define XSECURE_SHAKE_256_BLOCK_LEN (136U) |
SHAKE_256 block length.
| #define XSECURE_SHAKE_256_BLOCK_LEN (136U) |
SHAKE_256 block length.
| #define XSECURE_SHAKE_256_HASH_LEN (32U) |
SHAKE_256 hash length.
| #define XSECURE_SHAKE_256_HASH_LEN (32U) |
SHAKE_256 hash length.
Referenced by XSecure_LmsLookupParamSet(), XSecure_LmsOtsLookupParamSet(), XSecure_ShakeKat(), and XSecure_ShaValidateModeAndCfgInstance().
| #define XSECURE_SHAKE_256_HASH_WORD_LEN (XSECURE_SHAKE_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
SHAKE_256 hash word length.
| #define XSECURE_SHAKE_256_HASH_WORD_LEN (XSECURE_SHAKE_256_HASH_LEN / XCSUDMA_WORD_SIZE) |
SHAKE_256 hash word length.
| #define XSECURE_SSS_ADDRESS (0x040A0090U) |
SSS base address.
| #define XSECURE_SSS_ADDRESS (0xF1110500U) |
SSS base address.
| #define XSECURE_SSS_ADDRESS (0xF1110500U) |
SSS base address.
| #define XSECURE_SSS_ADDRESS (0xF1110500U) |
SSS base address.
| #define XSECURE_SSS_MAX_SRCS (5U) |
SSS Maximum resources.
| #define XSECURE_SSS_MAX_SRCS (8U) |
Maximum resources.
| #define XSECURE_SSS_MAX_SRCS (8U) |
SSS Maximum resources.
| #define XSECURE_SSS_MAX_SRCS (8U) |
Maximum resources.
| #define XSECURE_SSS_SHA2_DMA0_VAL (0xA000000U) |
SSS SHA2 instance DMA0 value.
| #define XSECURE_SSS_SHA2_DMA1_VAL (0xF000000U) |
SSS SHA2 instance DMA1 value.
| #define XSECURE_SSS_SHA2_MASK (0xF000000U) |
SSS SHA3 instance mask value.
| #define XSECURE_SSS_SHA3_0_DMA0_VAL (0xC0000U) |
SSS SHA3 instance 0 DMA0 value.
Referenced by XSecure_SssMask().
| #define XSECURE_SSS_SHA3_0_DMA0_VAL (0xC0000U) |
SSS SHA3 instance 0 DMA0 value.
| #define XSECURE_SSS_SHA3_0_DMA1_VAL (0x70000U) |
SSS SHA3 instance 0 DMA1 value.
Referenced by XSecure_SssMask().
| #define XSECURE_SSS_SHA3_0_DMA1_VAL (0x70000U) |
SSS SHA3 instance 0 DMA1 value.
| #define XSECURE_SSS_SHA3_0_MASK (0xF0000U) |
SSS SHA3 instance 0 mask value.
Referenced by XSecure_SssMask().
| #define XSECURE_SSS_SHA3_0_MASK (0xF0000U) |
SSS SHA3 instance 0 mask value.
| #define XSECURE_SSS_SHA3_1_DMA0_VAL (0xA000000U) |
SSS SHA3 instance 1 DMA0 value.
| #define XSECURE_SSS_SHA3_1_DMA1_VAL (0xF000000U) |
SSS SHA3 instance 1 DMA1 value.
| #define XSECURE_SSS_SHA3_1_MASK (0xF000000U) |
SSS SHA3 instance 1 mask value.
| #define XSECURE_SSS_SHA3_DMA0_VAL (0xC0000U) |
SSS SHA3 instance DMA0 value.
| #define XSECURE_SSS_SHA3_DMA1_VAL (0x70000U) |
SSS SHA3 instance DMA1 value.
| #define XSECURE_SSS_SHA3_MASK (0xF0000U) |
SSS SHA3 instance mask value.
| #define XSECURE_SSS_SHA_DMA0_VAL (0x500U) |
SSS SHA3 instance 0 DMA0 value.
| #define XSECURE_SSS_SHA_MASK (0xF00U) |
SSS SHA3 instance 0 mask value.
| #define XSECURE_TRNG_COMPUTE_NO_OF_GENERATES_SHIFT (5U) |
Shift to calculate no of TRNG generates.
Referenced by XSecure_GetRandomNum().
| #define XSECURE_TRNG_USER_CFG_ADAPT_TEST_CUTOFF XTRNGPSX_USER_CFG_ADAPT_TEST_CUTOFF |
Adapt test cutoff.
| #define XSECURE_TRNG_USER_CFG_ADAPT_TEST_CUTOFF XTRNGPSX_USER_CFG_ADAPT_TEST_CUTOFF |
Adapt test cutoff.
| #define XSECURE_TRNG_USER_CFG_DF_LENGTH XTRNGPSX_USER_CFG_DF_LENGTH |
User configuration DF length.
| #define XSECURE_TRNG_USER_CFG_DF_LENGTH XTRNGPSX_USER_CFG_DF_LENGTH |
User configuration DF length.
| #define XSECURE_TRNG_USER_CFG_REP_TEST_CUTOFF XTRNGPSX_USER_CFG_REP_TEST_CUTOFF |
Rep test cutoff.
| #define XSECURE_TRNG_USER_CFG_REP_TEST_CUTOFF XTRNGPSX_USER_CFG_REP_TEST_CUTOFF |
Rep test cutoff.
| #define XSECURE_TRNG_USER_CFG_SEED_LIFE XTRNGPSX_USER_CFG_SEED_LIFE |
User configuration seed life.
Referenced by XSecure_EllipticPrvtKeyGenerate().
| #define XSECURE_TRNG_USER_CFG_SEED_LIFE XTRNGPSX_USER_CFG_SEED_LIFE |
User configuration seed life.
| enum XSecure_AesKeySrc |
Used for selecting the Key source of AES Core.
| enum XSecure_AesOp |
| enum XSecure_SssSrc |
Sources to be selected to configure secure stream switch.
| enum XSecure_SssSrc |
Sources to be selected to configure secure stream switch.
| enum XSecure_SssSrc |
| enum XSecure_SssSrc |
Sources to be selected to configure secure stream switch.
| int XSecure_AesPlatPmcDmaCfgAndXfer | ( | XPmcDma * | PmcDmaPtr, |
| const XSecure_AesDmaCfg * | AesDmaCfg, | ||
| u32 | Size, | ||
| UINTPTR | BaseAddress | ||
| ) |
This function sets the SRC and DEST channel endianness configurations of PMC DMA and transfers data.
| PmcDmaPtr | Pointer to the XPmcDma instance. |
| AesDmaCfg | DMA SRC and DEST channel configuration |
| Size | Size of data in bytes. |
| BaseAddress | Not applicable for versal |
Enable PMC DMA Src and Dst channels for byte swapping.
Sets the start address and size for both src and dest channels as per the configuration
References XSecure_AesDmaCfg::DestChannelCfg, XSecure_AesDmaCfg::DestDataAddr, XSecure_AesDmaCfg::IsLastChunkDest, XSecure_AesDmaCfg::IsLastChunkSrc, XSecure_AesDmaCfg::SrcChannelCfg, XSecure_AesDmaCfg::SrcDataAddr, XSECURE_ADDR_HIGH_SHIFT, XSECURE_AES_INVALID_PARAM, XSECURE_AES_NO_CFG_DST_DMA, XSecure_AesPmcDmaCfgEndianness(), XSECURE_ENABLE_BYTE_SWAP, and XSECURE_WORD_SIZE.
| int XSecure_AesPlatPmcDmaCfgAndXfer | ( | XPmcDma * | PmcDmaPtr, |
| XSecure_AesDmaCfg * | AesDmaCfg, | ||
| u32 | Size, | ||
| UINTPTR | BaseAddress | ||
| ) |
This function sets the SRC and DEST channel endianness configurations of PMC DMA and transfers data.
| PmcDmaPtr | Pointer to the XPmcDma instance. |
| AesDmaCfg | DMA SRC and DEST channel configuration |
| Size | Size of data in bytes. |
| BaseAddress | AES BaseAddress |
References XSecure_AesDmaCfg::DestChannelCfg, XSecure_AesDmaCfg::DestDataAddr, XSecure_AesDmaCfg::IsLastChunkDest, XSecure_AesDmaCfg::IsLastChunkSrc, XSecure_AesDmaCfg::SrcChannelCfg, XSecure_AesDmaCfg::SrcDataAddr, XSECURE_AES_INVALID_PARAM, XSECURE_AES_NO_CFG_DST_DMA, XSecure_AesPmcDmaCfgEndianness(), XSECURE_DISABLE_BYTE_SWAP, XSECURE_ENABLE_BYTE_SWAP, and XSecure_GetAesInstance().
| void XSecure_AesPmcDmaCfgEndianness | ( | XPmcDma * | InstancePtr, |
| XPmcDma_Channel | Channel, | ||
| u8 | EndianType | ||
| ) |
This is a helper function to enable/disable byte swapping feature of PMC DMA.
| InstancePtr | Pointer to the XPmcDma instance |
| Channel | Channel Type
|
| EndianType |
|
| InstancePtr | Pointer to the XPmcDma instance |
| Channel | Channel Type
|
| EndianType | 1 : Enable Byte Swapping 0 : Disable Byte Swapping |
| InstancePtr | Pointer to the XPmcDma instance |
| Channel | Channel type
|
| EndianType | Endianness type
|
References XSecure_AssertVoid.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| int XSecure_AesValidateSize | ( | u32 | Size, |
| u8 | IsLastChunk | ||
| ) |
This function validates whether size of the data is word aligned and if it is the last chunk size should be qword aligned.
This function validates whether all the intermediate updates to AES engine are Q-WORD aligned or not.
This function is not applicable for Versal_2Ve_2Vm.
| Size | Size of data in bytes. |
| IsLastChunk | Last chunk indication |
| Size | Size of data in bytes. |
| IsLastChunk | Last chunk indication |
| Size | Size of data in bytes. |
| IsLastChunk | Last chunk indication |
Validate the size is 4-byte aligned or not
Validate the size is 16-byte aligned when it is last chunk
AES engine expect all intermediate updates shall be 16-byte aligned when it is not last chunk of data. Throw an error if it is not 16 byte aligned.
AES engine expect all intermediate updates shall be 16-byte aligned when it is not last chunk of data. Throw an error if it is not 16 byte aligned.
References XSECURE_AES_UNALIGNED_SIZE_ERROR, XSECURE_QWORD_SIZE, and XSECURE_WORD_SIZE.
| void XSecure_ConfigureDmaByteSwap | ( | u32 | Op | ) |
This function configures DMA Byte Swap based on the user input.
References XSecure_GetAesInstance().
Referenced by XSecure_AesDecryptKat(), and XSecure_AesEncryptKat().
| int XSecure_ECCRandInit | ( | void | ) |
This function initializes the trng in HRNG mode if it is not initialized and it is applicable only for Versal_2Ve_2Vm.
This function initializes the trng in HRNG mode if it is not initialized and it is applicable only for VersalNet.
References XSECURE_ERR_IN_TRNG_SELF_TESTS, XSECURE_ERR_TRNG_INIT_N_CONFIG, and XSecure_GetTrngInstance().
Referenced by XSecure_EcdhGetSecret(), XSecure_EllipticGenerateKey_64Bit(), XSecure_EllipticGenerateSignature_64Bit(), and XSecure_GetRandomNum().
| int XSecure_GetRandomNum | ( | u8 * | Output, |
| u32 | Size | ||
| ) |
This function generates random number of given size.
This function generates Random number of given size.
| Output | Pointer to the output buffer |
| Size | Number of random bytes to be read |
| Output | is pointer to the output buffer |
| Size | is the number of random bytes to be read |
References XSECURE_CLEAR_BIT, XSecure_ECCRandInit(), XSECURE_ERR_GLITCH_DETECTED, XSecure_GetTrngInstance(), XSECURE_TRNG_COMPUTE_NO_OF_GENERATES_SHIFT, and XSecure_UpdateTrngCryptoStatus().
Referenced by XSecure_EllipticGenerateEphemeralKey().
| XTrngpsx_Instance * XSecure_GetTrngInstance | ( | void | ) |
This function provides the pointer to the common trng instance.
Referenced by XSecure_ECCRandInit(), XSecure_EllipticPrvtKeyGenerate(), and XSecure_GetRandomNum().
| int XSecure_InitiateASUKeyTransfer | ( | void | ) |
This function initiates the key transfer to ASU.
Initiate the key transfer
Wait for 4msec for AES KTE DONE bit to set
Disable the key transfer
References XSECURE_AES_KTE_CNT_ADDRESS, XSECURE_AES_KTE_DONE_ADDRESS, XSECURE_AES_KTE_DONE_MASK, XSECURE_AES_KTE_DONE_POLL_TIMEOUT, XSECURE_AES_KTE_GO_ADDRESS, XSECURE_AES_KTE_GO_DISABLE, XSECURE_AES_KTE_GO_ENABLE, XSECURE_ERR_ASU_KTE_DONE_NOT_SET, XSecure_In32, XSecure_Out32, and XSecure_Printf.
| int XSecure_MemCpyAndChangeEndianness | ( | u64 | DestAddress, |
| u64 | SrcAddress, | ||
| u32 | Length | ||
| ) |
This function can copy the content of memory from 64-bit address to 32-bit address and change endianness of destination data.
| DestAddress | The address of the destination where content of SrcAddr memory should be copied. |
| SrcAddress | The address of the source where copy should start from. |
| Length | Size of memory to be copied in bytes. |
| DestAddress | is the address of the destination where content of SrcAddr memory should be copied. |
| SrcAddress | is the address of the source where copy should start from. |
| Length | is size of memory to be copied in bytes. |
Referenced by XSecure_KeyUnwrap().
| int XSecure_PlatIpiHandler | ( | XPlmi_Cmd * | Cmd | ) |
This function calls respective IPI handler based on the API_ID.
| Cmd | is pointer to the command structure |
| Cmd | Pointer to the command structure |
Call the respective API handler according to API ID
References XSECURE_API, XSECURE_API_ID_MASK, XSECURE_API_RSA_PRIVATE_DECRYPT, and XSecure_Printf.
| int XSecure_ShaDmaXfer | ( | XPmcDma * | DmaPtr, |
| u64 | DataAddr, | ||
| u32 | Size, | ||
| u8 | IsLastUpdate | ||
| ) |
This function transfer data to SHA engine from DMA.
| DmaPtr | Pointer to XPmcDma |
| DataAddr | Input data address |
| Size | Input data size in words. |
| IsLastUpdate | Last update flag |
References XSECURE_SHA_INVALID_PARAM.
| int XSecure_ShaValidateModeAndCfgInstance | ( | XSecure_Sha *const | InstancePtr, |
| XSecure_ShaMode | ShaMode | ||
| ) |
This function validates the SHA Mode and initialize SHA instance.
| InstancePtr | Pointer to the SHA instance. |
| ShaMode | SHA Mode |
Initializes the SHA instance based on SHA Mode
SHA2-256 Mode
SHA2-384 Mode
SHA2-512 Mode
SHA3-256 Mode
SHA3-384 Mode
SHAKE-512 Mode
SHAKE-256 Mode
SHA invalid mode
References XSECURE_SHA2_256_HASH_LEN, XSECURE_SHA2_384_HASH_LEN, XSECURE_SHA3_256, XSECURE_SHA3_256_HASH_LEN, XSECURE_SHA3_384_HASH_LEN, XSECURE_SHA_512_HASH_LEN, XSECURE_SHA_INVALID_PARAM, XSECURE_SHAKE_256, and XSECURE_SHAKE_256_HASH_LEN.
| u32 XSecure_SssMask | ( | XSecure_SssSrc | InputSrc, |
| XSecure_SssSrc | OutputSrc, | ||
| u32 | Value | ||
| ) |
This function masks the secure stream switch value.
| InputSrc | Input source to be selected for the resource |
| OutputSrc | Output source to be selected for the resource |
| Value | Register Value of SSS cfg register |
| InputSrc | Input source to be selected for the resource |
| OutputSrc | Output source to be selected for the resource |
| Value | Register Value of SSS cfg register |
Update SSS mask value
References XSECURE_SSS_DMA0, XSECURE_SSS_DMA1, XSECURE_SSS_SHA3_0_DMA0_VAL, XSECURE_SSS_SHA3_0_DMA1_VAL, and XSECURE_SSS_SHA3_0_MASK.
| void XSecure_UpdateTrngCryptoStatus | ( | u32 | Op | ) |
This function updates TRNG crypto indicator.
| Op | To set or clear the bit |
Referenced by XSecure_EllipticPrvtKeyGenerate(), and XSecure_GetRandomNum().
| u8 XSecure_AesKeyLookup::DecAllowed |
Decryption allowed or not for key source.
| u8 XSecure_AesDmaCfg::DestChannelCfg |
DMA destination channel configuration.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u64 XSecure_AesDmaCfg::DestDataAddr |
Address of destination buffer.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u8 XSecure_AesKeyLookup::EncAllowed |
Encryption allowed or not for key source.
| u8 XSecure_AesDmaCfg::IsLastChunkDest |
Flag for last update in destination.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u8 XSecure_AesDmaCfg::IsLastChunkSrc |
Flag for last update in source.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u32 XSecure_AesKeyLookup::KeyClearVal |
Key source clear value.
| u8 XSecure_AesKeyLookup::KeyDecSrcAllowed |
Key decryption source allowed.
| u32 XSecure_AesKeyLookup::KeyDecSrcSelVal |
Selection value for key decryption source.
| u32 XSecure_AesKeyLookup::KeySrcSelVal |
Selection value for key source.
| u32 XSecure_AesKeyLookup::RegOffset |
Register offset for key source.
| u8 XSecure_AesDmaCfg::SrcChannelCfg |
DMA Source channel configuration.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u64 XSecure_AesDmaCfg::SrcDataAddr |
Address of source buffer.
Referenced by XSecure_AesPlatPmcDmaCfgAndXfer().
| u8 XSecure_AesKeyLookup::UsrWrAllowed |
User write allowed or not for key source.