Xil_SecureMemCpy - Xil_SecureMemCpy - 2026.1 English - UG643

Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2026-06-23
Version
2026.1 English

This function copies Len bytes from source memory to destination memory. If Len is greater than DestPtrLen, then DestPtr is also filled with 0s till DestPtrLen bytes and is considered as a failure. This function is a secure implementation of memcpy.

Zeroizes the memory of given length

Prototype

s32 Xil_SecureMemCpy(void *DestPtr, u32 DestPtrLen, const void *SrcPtr, u32 Len);

Parameters

The following table lists the Xil_SecureMemCpy function arguments.

Table 1. Xil_SecureMemCpy Arguments
Type Member Description
void * DestPtr is pointer to destination address
u32 DestPtrLen is the memory allotted to the destination buffer
const void * SrcPtr is pointer to source address
u32 Len is number of bytes to be copied

Returns

XST_SUCCESS on success and error code on failure