Data Structures | |
struct | SaSi_PalDmaBlockInfo_t |
Macros | |
#define | SET_WORD_LE |
Functions | |
uint32_t | SaSi_PalDmaBufferMap (uint8_t *pDataBuffer, uint32_t buffSize, SaSi_PalDmaBufferDirection_t copyDirection, uint32_t *pNumOfBlocks, SaSi_PalDmaBlockInfo_t *pDmaBlockList, SaSi_PalDmaBufferHandle *dmaBuffHandle) |
This function is called by the ARM TrustZone CryptoCell TEE runtime library before the HW is used. It maps a given data buffer (virtual address) for ARM TrustZone CryptoCell TEE HW DMA use (physical address), and returns the list of one or more DMA-able (physical) blocks. It may lock the buffer for ARM TrustZone CryptoCell TEE HW use. Once it is called, only ARM TrustZone CryptoCell TEE HW access to the buffer is allowed, until it is unmapped. If the data buffer was already mapped by the Secure OS prior to calling the ARM TrustZone CryptoCell TEE runtime library, this API does not have to perform any actual mapping operation, but only return the list of DMA-able blocks. More... | |
uint32_t | SaSi_PalDmaBufferUnmap (uint8_t *pDataBuffer, uint32_t buffSize, SaSi_PalDmaBufferDirection_t copyDirection, uint32_t numOfBlocks, SaSi_PalDmaBlockInfo_t *pDmaBlockList, SaSi_PalDmaBufferHandle dmaBuffHandle) |
This function is called by the ARM TrustZone CryptoCell TEE runtime library after the HW is used. It unmaps a given buffer, and frees its associated resources, if needed. It may unlock the buffer and flush it for CPU use. Once it is called, ARM TrustZone CryptoCell TEE HW does not require access to this buffer anymore. If the data buffer was already mapped by the Secure OS prior to calling the ARM TrustZone CryptoCell TEE runtime library, this API does not have to perform any un-mapping operation, and the actual un-mapping can be done by the Secure OS outside the context of the ARM TrustZone CryptoCell TEE runtime library. More... | |
uint32_t | SaSi_PalDmaContigBufferAllocate (uint32_t buffSize, uint8_t **ppVirtBuffAddr) |
Allocates a DMA-contiguous buffer for CPU use, and returns its virtual address. Before passing the buffer to the ARM TrustZone CryptoCell TEE HW, SaSi_PalDmaBufferMap should be called. More... | |
uint32_t | SaSi_PalDmaContigBufferFree (uint32_t buffSize, uint8_t *pVirtBuffAddr) |
Frees resources previously allocated by SaSi_PalDmaContigBufferAllocate. More... | |
uint32_t | SaSi_PalIsDmaBufferContiguous (uint8_t *pDataBuffer, uint32_t buffSize) |
Checks whether the buffer is guaranteed to be a single contiguous DMA block. More... | |
SaSiDmaAddr_t | SaSi_PalMapVirtualToPhysical (uint8_t *pVirtualAddr) |
Maps virtual address to physical address. More... | |
#define SET_WORD_LE |
Defintion for big to little endian.
uint32_t SaSi_PalDmaBufferMap | ( | uint8_t * | pDataBuffer, |
uint32_t | buffSize, | ||
SaSi_PalDmaBufferDirection_t | copyDirection, | ||
uint32_t * | pNumOfBlocks, | ||
SaSi_PalDmaBlockInfo_t * | pDmaBlockList, | ||
SaSi_PalDmaBufferHandle * | dmaBuffHandle | ||
) |
This function is called by the ARM TrustZone CryptoCell TEE runtime library before the HW is used. It maps a given data buffer (virtual address) for ARM TrustZone CryptoCell TEE HW DMA use (physical address), and returns the list of one or more DMA-able (physical) blocks. It may lock the buffer for ARM TrustZone CryptoCell TEE HW use. Once it is called, only ARM TrustZone CryptoCell TEE HW access to the buffer is allowed, until it is unmapped. If the data buffer was already mapped by the Secure OS prior to calling the ARM TrustZone CryptoCell TEE runtime library, this API does not have to perform any actual mapping operation, but only return the list of DMA-able blocks.
[in] | pDataBuffer | Address of the buffer to map. |
[in] | buffSize | Buffer size in bytes. |
[in] | copyDirection | Copy direction of the buffer, according to SaSi_PalDmaBufferDirection_t,
|
[in,out] | pNumOfBlocks | Maximum numOfBlocks to fill, as output the actual number. |
[out] | pDmaBlockList | List of DMA-able blocks that the buffer maps to. |
[out] | dmaBuffHandle | A handle to the mapped buffer private resources. |
uint32_t SaSi_PalDmaBufferUnmap | ( | uint8_t * | pDataBuffer, |
uint32_t | buffSize, | ||
SaSi_PalDmaBufferDirection_t | copyDirection, | ||
uint32_t | numOfBlocks, | ||
SaSi_PalDmaBlockInfo_t * | pDmaBlockList, | ||
SaSi_PalDmaBufferHandle | dmaBuffHandle | ||
) |
This function is called by the ARM TrustZone CryptoCell TEE runtime library after the HW is used. It unmaps a given buffer, and frees its associated resources, if needed. It may unlock the buffer and flush it for CPU use. Once it is called, ARM TrustZone CryptoCell TEE HW does not require access to this buffer anymore. If the data buffer was already mapped by the Secure OS prior to calling the ARM TrustZone CryptoCell TEE runtime library, this API does not have to perform any un-mapping operation, and the actual un-mapping can be done by the Secure OS outside the context of the ARM TrustZone CryptoCell TEE runtime library.
[in] | pDataBuffer | Address of the buffer to unmap. |
[in] | buffSize | Buffer size in bytes. |
[in] | copyDirection | Copy direction of the buffer, according to SaSi_PalDmaBufferDirection_t
|
[in] | numOfBlocks | Number of DMA-able blocks that the buffer maps to. |
[in] | pDmaBlockList | List of DMA-able blocks that the buffer maps to. |
[in] | dmaBuffHandle | A handle to the mapped buffer private resources. |
uint32_t SaSi_PalDmaContigBufferAllocate | ( | uint32_t | buffSize, |
uint8_t ** | ppVirtBuffAddr | ||
) |
Allocates a DMA-contiguous buffer for CPU use, and returns its virtual address. Before passing the buffer to the ARM TrustZone CryptoCell TEE HW, SaSi_PalDmaBufferMap should be called.
[in] | buffSize | Buffer size in bytes. |
[out] | ppVirtBuffAddr | Virtual address of the allocated buffer. |
uint32_t SaSi_PalDmaContigBufferFree | ( | uint32_t | buffSize, |
uint8_t * | pVirtBuffAddr | ||
) |
Frees resources previously allocated by SaSi_PalDmaContigBufferAllocate.
[in] | buffSize | Buffer size in Bytes. |
[in] | pVirtBuffAddr | Virtual address of the buffer to free. |
uint32_t SaSi_PalIsDmaBufferContiguous | ( | uint8_t * | pDataBuffer, |
uint32_t | buffSize | ||
) |
Checks whether the buffer is guaranteed to be a single contiguous DMA block.
[in] | pDataBuffer | User buffer address. |
[in] | buffSize | User buffer size. |
SaSiDmaAddr_t SaSi_PalMapVirtualToPhysical | ( | uint8_t * | pVirtualAddr | ) |
Maps virtual address to physical address.
[in] | pVirtualAddr | Pointer to virtual address. |