xilloader
Vitis Drivers API Documentation
XilLoader Client APIs

Macros

#define XLOADER_ADDR_HIGH_SHIFT   (32U)
 Shift value to get higher 32 bit address. More...
 
#define XLOADER_MSB_MASK   (0x80000000)
 Mask for MSB bit. More...
 
#define XLOADER_SELREADBACK_ROW_START_POS   (23U)
 Row field start bit position. More...
 
#define XLOADER_SELREADBACK_BLKTYPE_START_POS   (20U)
 Block type field start bit position. More...
 
#define XLOADER_SELREADBACK_ROW_MASK   (0x7800000U)
 Mask for row. More...
 
#define XLOADER_SLEREADBACK_BLKTYPE_MASK   (0X700000U)
 Mask for block type. More...
 
#define XLOADER_SLEREADBACK_FRAMEADDR_MASK   (0xFFFFFU)
 Mask for frame address. More...
 
#define XLOADER_SMAP_WD_PATTERN_SIZE   (0x00000010U)
 Size of SMAP width pattern. More...
 
#define XLOADER_BH_SIZE_WO_PADDING   (0x00000F24U)
 Size of bootheader without padding. More...
 
#define XLOADER_BH_SIZE   (0x00000F70U)
 Size of bootheader. More...
 
#define XLOADER_IHT_SIZE   (128U)
 Size of Image Header Table. More...
 
#define XLOADER_BH_IMG_ATTRB_SIGNED_IMG_MASK   (0xC0000U)
 Mask for signed image in bootheader. More...
 
#define XLOADER_RSA_4096_KEY_SIZE   (4096U/8U)
 RSA 4096 key size. More...
 
#define XLOADER_SPK_SIZE
 Size of Secondary Public Key(in bytes) in Authentication Certificate. More...
 
#define XLOADER_PPK_SIZE
 Size of Primary Public Key(in bytes) in Authentication Certificate. More...
 
#define XLOADER_SPK_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE
 Size of SPK signature(in bytes) in Authentication Certificate. More...
 
#define XLOADER_BHDR_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE
 Size of Bootheader signature(in bytes) in Authentication Certificate. More...
 
#define XLOADER_PARTITION_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE
 Size of Partition signature(in bytes) in Authentication Certificate. More...
 
#define XLOADER_AUTH_HEADER_SIZE   (8U)
 Size of Authentication header(in bytes) in Authentication Certificate. More...
 
#define XLOADER_AUTH_CERT_USER_DATA   ((u32)64U - XLOADER_AUTH_HEADER_SIZE)
 Size of User Data(in bytes) in Authentication Certificate. More...
 
#define XLOADER_AUTH_CERT_MIN_SIZE
 Minimum Size of Authentication Certificate(in bytes) More...
 
#define XIH_MAX_PRTNS   (32U)
 Max number of partitions. More...
 
#define XLOADER_SECURE_CHUNK_SIZE   (0x8000U)
 32K More...
 
#define XLOADER_SHA3_HASH_LEN_IN_BYTES   (48U)
 Length of SHA3 Hash in bytes. More...
 
#define XLOADER_WORD_LEN   (4U)
 Length of word in bytes. More...
 
#define XLOADER_WORD_LEN_SHIFT   (2U)
 Shift to convert word in bytes. More...
 
#define XLOADER_PARTITION_SIZE   (128U)
 Size of partition in bytes. More...
 
#define XIH_OPT_DATA_HDR_ID_MASK   (0xFFFFU)
 Optional data id mask. More...
 
#define XIH_OPT_DATA_HDR_LEN_MASK   (0xFFFF0000U)
 Optional data length mask. More...
 
#define XIH_OPT_DATA_HDR_LEN_SHIFT   (16U)
 shift value to extract optional data length More...
 
#define XIH_OPT_DATA_LEN_OFFSET   (4U)
 Optional data length offset. More...
 
#define XIH_OPT_DATA_DEF_LEN   (2U)
 Default optional data length. More...
 
#define XIH_OPT_HASH_TBL_DATA_ID   (3U)
 Optional data id for hash table. More...
 

Functions

int XLoader_LoadPartialPdi (XLoader_ClientInstance *InstancePtr, XLoader_PdiSrc PdiSrc, u64 PdiAddr, u32 *PlmErrStatus)
 This function sends IPI request to provides PDI execution. More...
 
int XLoader_LoadImage (XLoader_ClientInstance *InstancePtr, u32 NodeId, u32 FunctionId)
 This function sends IPI request to Load image. More...
 
int XLoader_GetImageInfo (XLoader_ClientInstance *InstancePtr, u32 NodeId, XLoader_ImageInfo *ImageInfo)
 This function sends IPI request to get image information. More...
 
int XLoader_GetImageInfoList (XLoader_ClientInstance *InstancePtr, u64 Buff_Addr, u32 Maxsize, u32 *NumEntries)
 This function sends IPI request to gets ImageInfo Table. More...
 
int XLoader_ExtractMetaheader (XLoader_ClientInstance *InstancePtr, u64 PdiSrcAddr, u64 DestBuffAddr, u32 DestBuffSize)
 This function sends IPI request to Extract meta header. More...
 
int XLoader_UpdateMultiboot (XLoader_ClientInstance *InstancePtr, XLoader_PdiSrc BootMode, XLoader_FlashType Type, u32 ImageLocation)
 This function sends IPI request to update multiboot. More...
 
int XLoader_AddImageStorePdi (XLoader_ClientInstance *InstancePtr, u32 PdiId, const u64 PdiAddr, u32 PdiSize)
 This function sends IPI request to add Image store pdi. More...
 
int XLoader_RemoveImageStorePdi (XLoader_ClientInstance *InstancePtr, u32 PdiId)
 This function sends IPI request to remove Image store pdi. More...
 
int XLoader_GetATFHandOffParams (XLoader_ClientInstance *InstancePtr, u64 BuffAddr, u32 Size, u32 *BufferSize)
 This function sends IPI request to get ATF Handoff parameters. More...
 
int XLoader_CfiSelectiveReadback (XLoader_ClientInstance *InstancePtr, XLoader_CfiSelReadbackParams *SelectiveReadbackPtr)
 This function sends IPI request to read selective frames from configuration memory. More...
 
int XLoader_InputSlrIndex (XLoader_ClientInstance *InstancePtr, u32 SlrIndex)
 Adds the SLR Index. More...
 
int XLoader_GetOptionalData (XLoader_ClientInstance *InstancePtr, const XLoader_OptionalDataInfo *OptionalDataInfo, u64 DestAddr, u32 *DestSize)
 This function sends IPI request to get optional data from the PDI available in DDR or Image Store. More...
 
u64 XLoader_SearchOptionalData (u64 StartAddress, u64 EndAddress, u32 DataId)
 This function search offset of optional data address. More...
 
int XLoader_ConfigureJtagState (XLoader_ClientInstance *InstancePtr, u32 Flag)
 This function sends IPI request to configure jtag status. More...
 
int XLoader_ReadDdrCryptoPerfCounters (XLoader_ClientInstance *InstancePtr, u32 NodeId, XLoader_DDRCounters *CryptoCounters)
 This function sends IPI request to read DDR crypto performance counters. More...
 
int XLoader_ValidatePdiAuth (XLoader_ClientInstance *InstancePtr, const u64 PdiAddr, const u32 PdiType)
 This function sends IPI request to validate authenticated PDI based on PDI type. More...
 

Variables

u32 XilLoader_BootHdrFwRsvd::MetaHdrOfst
 Offset to the start of meta header. More...
 
u32 XilLoader_BootHdrFwRsvd::FwRsvd [24U]
 FW Reserved fields. More...
 
u32 XilLoader_BootHdr::WidthDetection
 Width Detection 0xAA995566. More...
 
u32 XilLoader_BootHdr::ImgIden
 Image Identification. More...
 
u32 XilLoader_BootHdr::EncStatus
 Encryption Status. More...
 
u32 XilLoader_BootHdr::DpiSrcOfst
 Source Offset of PMC FW in DPI. More...
 
u32 XilLoader_BootHdr::DpiStartOfst
 PMC FW start offset in RAM. More...
 
u32 XilLoader_BootHdr::DataPrtnLen
 Data Partition Length. More...
 
u32 XilLoader_BootHdr::TotalDataPrtnLen
 Total Data Partition length. More...
 
u32 XilLoader_BootHdr::PlmLen
 PLM Length. More...
 
u32 XilLoader_BootHdr::TotalPlmLen
 Total PLM length. More...
 
u32 XilLoader_BootHdr::ImgAttrb
 Image Attributes. More...
 
u32 XilLoader_BootHdr::Kek [8U]
 Encrypted Key. More...
 
u32 XilLoader_BootHdr::KekIv [3U]
 Key Iv. More...
 
u32 XilLoader_BootHdr::SecureHdrIv [3U]
 Secure Header IV. More...
 
u32 XilLoader_BootHdr::PufShutterVal
 PUF Shutter Value. More...
 
u32 XilLoader_BootHdr::RomRsvd [20U]
 ROM Reserved. More...
 
XilLoader_BootHdrFwRsvd XilLoader_BootHdr::BootHdrFwRsvd
 FW reserved fields. More...
 
u32 XilLoader_ImgHdrTbl::Version
 PDI version used. More...
 
u32 XilLoader_ImgHdrTbl::NoOfImgs
 No of images present. More...
 
u32 XilLoader_ImgHdrTbl::ImgHdrAddr
 Address to start of 1st Image header. More...
 
u32 XilLoader_ImgHdrTbl::NoOfPrtns
 No of partitions present. More...
 
u32 XilLoader_ImgHdrTbl::PrtnHdrAddr
 Address to start of 1st partition header. More...
 
u32 XilLoader_ImgHdrTbl::SBDAddr
 Secondary Boot device address. More...
 
u32 XilLoader_ImgHdrTbl::Idcode
 Device ID Code. More...
 
u32 XilLoader_ImgHdrTbl::Attr
 Attributes. More...
 
u32 XilLoader_ImgHdrTbl::PdiId
 PDI ID. More...
 
u32 XilLoader_ImgHdrTbl::Rsrvd [3U]
 Reserved for future use. More...
 
u32 XilLoader_ImgHdrTbl::TotalHdrLen
 Total size of Meta header AC + encryption overload. More...
 
u32 XilLoader_ImgHdrTbl::IvMetaHdr [3U]
 Iv for decrypting SH of meta header. More...
 
u32 XilLoader_ImgHdrTbl::EncKeySrc
 Encryption key source for decrypting SH of headers. More...
 
u32 XilLoader_ImgHdrTbl::ExtIdCode
 Extended ID Code. More...
 
u32 XilLoader_ImgHdrTbl::AcOffset
 AC offset of Meta header. More...
 
u32 XilLoader_ImgHdrTbl::KekIv [3U]
 Kek IV for meta header decryption. More...
 
u32 XilLoader_ImgHdrTbl::OptionalDataLen
 Len in words of OptionalData. More...
 
u32 XilLoader_ImgHdrTbl::Rsvd [8U]
 Reserved. More...
 
u32 XilLoader_ImgHdrTbl::Checksum
 Checksum of the image header table. More...
 
u32 XilLoader_PrtnHdr::EncDataWordLen
 Enc word length of partition. More...
 
u32 XilLoader_PrtnHdr::UnEncDataWordLen
 Unencrypted word length. More...
 
u32 XilLoader_PrtnHdr::TotalDataWordLen
 Total word length including the authentication certificate if any. More...
 
u32 XilLoader_PrtnHdr::NextPrtnOfst
 Addr of the next partition header. More...
 
u64 XilLoader_PrtnHdr::DstnExecutionAddr
 Execution address. More...
 
u64 XilLoader_PrtnHdr::DstnLoadAddr
 Load address in DDR/TCM. More...
 
u32 XilLoader_PrtnHdr::DataWordOfst
 Data word offset. More...
 
u32 XilLoader_PrtnHdr::PrtnAttrb
 Partition attributes. More...
 
u32 XilLoader_PrtnHdr::SectionCount
 Section count. More...
 
u32 XilLoader_PrtnHdr::ChecksumWordOfst
 Address to checksum when enabled. More...
 
u32 XilLoader_PrtnHdr::PrtnId
 Partition ID. More...
 
u32 XilLoader_PrtnHdr::AuthCertificateOfst
 Address to the authentication certificate when enabled. More...
 
u32 XilLoader_PrtnHdr::PrtnIv [3U]
 IV of the partition's SH. More...
 
u32 XilLoader_PrtnHdr::EncStatus
 Encryption Status/Key Selection. More...
 
u32 XilLoader_PrtnHdr::KekIv [3U]
 KEK IV for partition decryption. More...
 
u32 XilLoader_PrtnHdr::EncRevokeID
 Revocation ID of partition for encrypted partition. More...
 
u32 XilLoader_PrtnHdr::Reserved [9U]
 Reserved. More...
 
u32 XilLoader_PrtnHdr::Checksum
 checksum of the partition header More...
 
u32 XilPdi_PrtnHashInfo::PrtnNum
 Partition Number. More...
 
u8 XilPdi_PrtnHashInfo::PrtnHash [XLOADER_SHA3_HASH_LEN_IN_BYTES]
 Partition hash. More...
 
u32 XilPdi_HashTblInfo::IsAuthOptimized
 Flag to indicate authentication optimization. More...
 
u32 XilPdi_HashTblInfo::HashTblSize
 Hash table size. More...
 
XilPdi_PrtnHashInfo * XilPdi_HashTblInfo::StartOffset
 Start offset of digest table. More...
 

Macro Definition Documentation

#define XIH_MAX_PRTNS   (32U)

Max number of partitions.

#define XIH_OPT_DATA_DEF_LEN   (2U)

Default optional data length.

#define XIH_OPT_DATA_HDR_ID_MASK   (0xFFFFU)

Optional data id mask.

Referenced by XLoader_SearchOptionalData().

#define XIH_OPT_DATA_HDR_LEN_MASK   (0xFFFF0000U)

Optional data length mask.

Referenced by XLoader_SearchOptionalData().

#define XIH_OPT_DATA_HDR_LEN_SHIFT   (16U)

shift value to extract optional data length

Referenced by XLoader_SearchOptionalData().

#define XIH_OPT_DATA_LEN_OFFSET   (4U)

Optional data length offset.

#define XIH_OPT_HASH_TBL_DATA_ID   (3U)

Optional data id for hash table.

#define XLOADER_AUTH_CERT_MIN_SIZE
Value:
+ 8U \
#define XLOADER_PARTITION_SIG_SIZE
Size of Partition signature(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:67
#define XLOADER_SPK_SIG_SIZE
Size of SPK signature(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:63
#define XLOADER_AUTH_CERT_USER_DATA
Size of User Data(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:73
#define XLOADER_BHDR_SIG_SIZE
Size of Bootheader signature(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:65
#define XLOADER_PPK_SIZE
Size of Primary Public Key(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:59
#define XLOADER_SPK_SIZE
Size of Secondary Public Key(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:55
#define XLOADER_AUTH_HEADER_SIZE
Size of Authentication header(in bytes) in Authentication Certificate.
Definition: xloader_plat_client.c:70

Minimum Size of Authentication Certificate(in bytes)

#define XLOADER_AUTH_CERT_USER_DATA   ((u32)64U - XLOADER_AUTH_HEADER_SIZE)

Size of User Data(in bytes) in Authentication Certificate.

#define XLOADER_AUTH_HEADER_SIZE   (8U)

Size of Authentication header(in bytes) in Authentication Certificate.

#define XLOADER_BH_IMG_ATTRB_SIGNED_IMG_MASK   (0xC0000U)

Mask for signed image in bootheader.

#define XLOADER_BH_SIZE   (0x00000F70U)

Size of bootheader.

#define XLOADER_BH_SIZE_WO_PADDING   (0x00000F24U)

Size of bootheader without padding.

#define XLOADER_BHDR_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE

Size of Bootheader signature(in bytes) in Authentication Certificate.

#define XLOADER_IHT_SIZE   (128U)

Size of Image Header Table.

#define XLOADER_MSB_MASK   (0x80000000)

Mask for MSB bit.

Referenced by XLoader_GetImageInfoList().

#define XLOADER_PARTITION_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE

Size of Partition signature(in bytes) in Authentication Certificate.

#define XLOADER_PARTITION_SIZE   (128U)

Size of partition in bytes.

#define XLOADER_PPK_SIZE
Value:
+ 4U +12U)
#define XLOADER_RSA_4096_KEY_SIZE
RSA 4096 key size.
Definition: xloader_plat_client.c:53

Size of Primary Public Key(in bytes) in Authentication Certificate.

#define XLOADER_RSA_4096_KEY_SIZE   (4096U/8U)

RSA 4096 key size.

#define XLOADER_SECURE_CHUNK_SIZE   (0x8000U)

32K

#define XLOADER_SELREADBACK_BLKTYPE_START_POS   (20U)

Block type field start bit position.

Referenced by XLoader_CfiSelectiveReadback().

#define XLOADER_SELREADBACK_ROW_MASK   (0x7800000U)
#define XLOADER_SELREADBACK_ROW_START_POS   (23U)

Row field start bit position.

Referenced by XLoader_CfiSelectiveReadback().

#define XLOADER_SHA3_HASH_LEN_IN_BYTES   (48U)

Length of SHA3 Hash in bytes.

#define XLOADER_SLEREADBACK_BLKTYPE_MASK   (0X700000U)

Mask for block type.

Referenced by XLoader_CfiSelectiveReadback().

#define XLOADER_SLEREADBACK_FRAMEADDR_MASK   (0xFFFFFU)

Mask for frame address.

Referenced by XLoader_CfiSelectiveReadback().

#define XLOADER_SMAP_WD_PATTERN_SIZE   (0x00000010U)

Size of SMAP width pattern.

Referenced by XLoader_ValidatePdiAuth().

#define XLOADER_SPK_SIG_SIZE   XLOADER_RSA_4096_KEY_SIZE

Size of SPK signature(in bytes) in Authentication Certificate.

#define XLOADER_SPK_SIZE
Value:
+ 4U +4U)
#define XLOADER_RSA_4096_KEY_SIZE
RSA 4096 key size.
Definition: xloader_plat_client.c:53

Size of Secondary Public Key(in bytes) in Authentication Certificate.

#define XLOADER_WORD_LEN   (4U)

Length of word in bytes.

#define XLOADER_WORD_LEN_SHIFT   (2U)

Shift to convert word in bytes.

Referenced by XLoader_SearchOptionalData().

Function Documentation

int XLoader_AddImageStorePdi ( XLoader_ClientInstance *  InstancePtr,
u32  PdiId,
const u64  PdiAddr,
u32  PdiSize 
)

This function sends IPI request to add Image store pdi.

Parameters
InstancePtrPointer to the client instance.
PdiIdId of the pdi.
PdiAddrAddress to store Image store pdi's maintained by PLM.
PdiSizeSize of pdi in words.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_AddImageStorePdi CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_ADD_IMAGESTORE_PDI, XLOADER_HEADER_LEN_4, and XLoader_ProcessMailbox().

int XLoader_CfiSelectiveReadback ( XLoader_ClientInstance *  InstancePtr,
XLoader_CfiSelReadbackParams *  SelectiveReadbackPtr 
)

This function sends IPI request to read selective frames from configuration memory.

Parameters
InstancePtrPointer to the client instance
SelectiveReadbackPtrPointer to structure which contains parameters of CFI selective readback command
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_CfiSelectiveReadback CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CFI_SEL_READBACK_ID, XLOADER_HEADER_LEN_4, XLoader_ProcessMailbox(), XLOADER_SELREADBACK_BLKTYPE_START_POS, XLOADER_SELREADBACK_ROW_MASK, XLOADER_SELREADBACK_ROW_START_POS, XLOADER_SLEREADBACK_BLKTYPE_MASK, XLOADER_SLEREADBACK_FRAMEADDR_MASK, and XLOADER_SLR_INDEX_SHIFT.

Referenced by main().

int XLoader_ConfigureJtagState ( XLoader_ClientInstance *  InstancePtr,
u32  Flag 
)

This function sends IPI request to configure jtag status.

Parameters
InstancePtrPointer to the client instance.
FlagTo enable / disable jtag.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Perform input parameters validation. Return XST_FAILURE if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_ConfigureJtagState CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_CONFIG_JTAG_STATE, XLOADER_HEADER_LEN_1, and XLoader_ProcessMailbox().

int XLoader_ExtractMetaheader ( XLoader_ClientInstance *  InstancePtr,
u64  PdiSrcAddr,
u64  DestBuffAddr,
u32  DestBuffSize 
)

This function sends IPI request to Extract meta header.

Parameters
InstancePtrPointer to the client instance.
PdiSrcAddrAddress of the pdi.
DestBuffAddrAddress to export the pdi.
DestBuffSizesize of the destination buffer in bytes.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_ExtractMetaheader CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_EXTRACT_METAHEADER, XLOADER_HEADER_LEN_6, and XLoader_ProcessMailbox().

int XLoader_GetATFHandOffParams ( XLoader_ClientInstance *  InstancePtr,
u64  BuffAddr,
u32  Size,
u32 *  BufferSize 
)

This function sends IPI request to get ATF Handoff parameters.

Parameters
InstancePtrPointer to the client instance.
BuffAddrAddress to store the handoff parameter information.
SizeMaximum number of bytes that can be stored in the buffer.
BufferSizeTo get the size of the buffer in bytes.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_GetATFHandOffParams CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_GET_ATF_HANDOFF_PARAMS, XLOADER_HEADER_LEN_3, and XLoader_ProcessMailbox().

int XLoader_GetImageInfo ( XLoader_ClientInstance *  InstancePtr,
u32  NodeId,
XLoader_ImageInfo *  ImageInfo 
)

This function sends IPI request to get image information.

Parameters
InstancePtrPointer to the client instance.
NodeIdNode id of ddr copied image.
ImageInfoPointer to the structure XLoader_ImageInfo which is used to store the image information.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_GetImageInfo CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_GET_IMAGE_INFO, XLOADER_HEADER_LEN_1, and XLoader_ProcessMailbox().

int XLoader_GetImageInfoList ( XLoader_ClientInstance *  InstancePtr,
u64  Buff_Addr,
u32  Maxsize,
u32 *  NumEntries 
)

This function sends IPI request to gets ImageInfo Table.

Parameters
InstancePtrPointer to the client instance.
Buff_AddrBuffer address to copy the ImageInfo.
MaxsizeMaximum size requires in bytes.
NumEntriesTo get the number of enteries returned.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Typically be Continue[31 bit] set to 0, In case the first call indicated that more entries are available then this can be set to 1 present we are not supporting more entries , So returning XST_FAILURE if continue parameter is 1.
  • Send an IPI request to the PLM by using the XLoader_GetImageInfoList CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_GET_IMAGE_INFO_LIST, XLOADER_HEADER_LEN_3, XLOADER_MSB_MASK, and XLoader_ProcessMailbox().

int XLoader_GetOptionalData ( XLoader_ClientInstance *  InstancePtr,
const XLoader_OptionalDataInfo *  OptionalDataInfo,
u64  DestAddr,
u32 *  DestSize 
)

This function sends IPI request to get optional data from the PDI available in DDR or Image Store.

Parameters
InstancePtrPointer to the client instance.
OptionalDataInfoPointer to XLoader_OptionalDataInfo structure
DestAddrAddress of the output buffer wheren optional data shall be copied
DestSizeSize of destination buffer in bytes
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_GetOptionalData command
  • Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_EXTRACT_METAHEADER, XLOADER_DATA_ID_SHIFT, XLOADER_GET_OPT_DATA_FLAG, XLOADER_PDI_SRC_DDR, XLOADER_PDI_SRC_IS, and XLoader_ProcessMailbox().

int XLoader_InputSlrIndex ( XLoader_ClientInstance *  InstancePtr,
u32  SlrIndex 
)

Adds the SLR Index.

Parameters
InstancePtris a pointer to instance XLoader_ClientInstance
SlrIndex- SLR index number
Returns
- XST_SUCCESS - On valid input SlrIndex.
  • XST_FAILURE - On non valid input SlrIndex

References XLOADER_SLR_INDEX_3.

Referenced by main().

int XLoader_LoadImage ( XLoader_ClientInstance *  InstancePtr,
u32  NodeId,
u32  FunctionId 
)

This function sends IPI request to Load image.

Parameters
InstancePtrPointer to the client instance.
NodeIdNode id of ddr copied image.
FunctionIdTo verify with the FuncID of the image copied to DDR.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_LoadImage CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_LOAD_DDRCPY_IMG, XLOADER_HEADER_LEN_2, and XLoader_ProcessMailbox().

Referenced by XLoader_LoadLpdAndPsmElf().

int XLoader_LoadPartialPdi ( XLoader_ClientInstance *  InstancePtr,
XLoader_PdiSrc  PdiSrc,
u64  PdiAddr,
u32 *  PlmErrStatus 
)

This function sends IPI request to provides PDI execution.

Parameters
InstancePtrPointer to the client instance.
PdiSrcBoot Mode values, DDR, PCIe.
PdiAddr64bit PDI address located in the Source.
PlmErrStatusUsed to store the plm error status.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_LOAD_SUBSYSTEM_PDI CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_ADDR_HIGH_SHIFT, XLOADER_CMD_ID_LOAD_SUBSYSTEM_PDI, XLOADER_HEADER_LEN_3, and XLoader_ProcessMailbox().

int XLoader_ReadDdrCryptoPerfCounters ( XLoader_ClientInstance *  InstancePtr,
u32  NodeId,
XLoader_DDRCounters *  CryptoCounters 
)

This function sends IPI request to read DDR crypto performance counters.

Parameters
InstancePtrPointer to the client instance.
NodeIdDDR device id.
CryptoCountersTo read DDR crypto counters.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Perform input parameters validation. Return XST_FAILURE if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_ReadDdrCryptoPerfCounters CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_READ_DDR_CRYPTO_COUNTERS, XLOADER_HEADER_LEN_1, and XLoader_ProcessMailbox().

int XLoader_RemoveImageStorePdi ( XLoader_ClientInstance *  InstancePtr,
u32  PdiId 
)

This function sends IPI request to remove Image store pdi.

Parameters
InstancePtrPointer to the client instance.
PdiIdId of the PDI to be removed from Image Store.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_RemoveImageStorePdi CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_REMOVE_IMAGESTORE_PDI, XLOADER_HEADER_LEN_1, and XLoader_ProcessMailbox().

u64 XLoader_SearchOptionalData ( u64  StartAddress,
u64  EndAddress,
u32  DataId 
)

This function search offset of optional data address.

Parameters
StartAddressis start address of IHT optional data
EndAddressis end address of IHT optional data
DataIdis to identify type of data in data structure
Returns
  • Offset on getting successful optional data offset address for given data Id.

References XIH_OPT_DATA_HDR_ID_MASK, XIH_OPT_DATA_HDR_LEN_MASK, XIH_OPT_DATA_HDR_LEN_SHIFT, and XLOADER_WORD_LEN_SHIFT.

int XLoader_UpdateMultiboot ( XLoader_ClientInstance *  InstancePtr,
XLoader_PdiSrc  BootMode,
XLoader_FlashType  Type,
u32  ImageLocation 
)

This function sends IPI request to update multiboot.

Parameters
InstancePtrPointer to the client instance.
BootModePdi boot source
TypeFlash type
ImageLocationLocation of Image in the boot device.
Returns
  • XST_SUCCESS on success.
  • XST_FAILURE on failure.
  • Performs input parameters validation. Return error code if input parameters are invalid
  • Send an IPI request to the PLM by using the XLoader_UpdateMultiboot CDO command Wait for IPI response from PLM with a timeout.
  • If the timeout exceeds then error is returned otherwise it returns the status of the IPI response.

References XLOADER_CMD_ID_UPDATE_MULTIBOOT, XLOADER_HEADER_LEN_2, and XLoader_ProcessMailbox().

Referenced by main().

int XLoader_ValidatePdiAuth ( XLoader_ClientInstance *  InstancePtr,
const u64  PdiAddr,
const u32  PdiType 
)

This function sends IPI request to validate authenticated PDI based on PDI type.

Parameters
InstancePtr- Pointer to XLoader_ClientInstance
PdiAddr- Address where authenticated PDI is present
PdiType- Value to indicate Full or Partial PDI
Returns
  • XST_SUCCESS on success and error code on failure

Fpr full PDI Partition 0 is PLM. Hence Idx starts from 1 for PLM loadable partitions

References XLOADER_PDI_TYPE_FULL, XLOADER_PDI_TYPE_PARTIAL, and XLOADER_SMAP_WD_PATTERN_SIZE.

Variable Documentation

u32 XilLoader_ImgHdrTbl::AcOffset

AC offset of Meta header.

u32 XilLoader_ImgHdrTbl::Attr

Attributes.

u32 XilLoader_PrtnHdr::AuthCertificateOfst

Address to the authentication certificate when enabled.

XilLoader_BootHdrFwRsvd XilLoader_BootHdr::BootHdrFwRsvd

FW reserved fields.

u32 XilLoader_ImgHdrTbl::Checksum

Checksum of the image header table.

u32 XilLoader_PrtnHdr::Checksum

checksum of the partition header

u32 XilLoader_PrtnHdr::ChecksumWordOfst

Address to checksum when enabled.

u32 XilLoader_BootHdr::DataPrtnLen

Data Partition Length.

u32 XilLoader_PrtnHdr::DataWordOfst

Data word offset.

u32 XilLoader_BootHdr::DpiSrcOfst

Source Offset of PMC FW in DPI.

u32 XilLoader_BootHdr::DpiStartOfst

PMC FW start offset in RAM.

u64 XilLoader_PrtnHdr::DstnExecutionAddr

Execution address.

u64 XilLoader_PrtnHdr::DstnLoadAddr

Load address in DDR/TCM.

u32 XilLoader_PrtnHdr::EncDataWordLen

Enc word length of partition.

u32 XilLoader_ImgHdrTbl::EncKeySrc

Encryption key source for decrypting SH of headers.

u32 XilLoader_PrtnHdr::EncRevokeID

Revocation ID of partition for encrypted partition.

u32 XilLoader_BootHdr::EncStatus

Encryption Status.

u32 XilLoader_PrtnHdr::EncStatus

Encryption Status/Key Selection.

u32 XilLoader_ImgHdrTbl::ExtIdCode

Extended ID Code.

u32 XilLoader_BootHdrFwRsvd::FwRsvd[24U]

FW Reserved fields.

u32 XilPdi_HashTblInfo::HashTblSize

Hash table size.

u32 XilLoader_ImgHdrTbl::Idcode

Device ID Code.

u32 XilLoader_BootHdr::ImgAttrb

Image Attributes.

u32 XilLoader_ImgHdrTbl::ImgHdrAddr

Address to start of 1st Image header.

u32 XilLoader_BootHdr::ImgIden

Image Identification.

u32 XilPdi_HashTblInfo::IsAuthOptimized

Flag to indicate authentication optimization.

u32 XilLoader_ImgHdrTbl::IvMetaHdr[3U]

Iv for decrypting SH of meta header.

u32 XilLoader_BootHdr::Kek[8U]

Encrypted Key.

u32 XilLoader_BootHdr::KekIv[3U]

Key Iv.

u32 XilLoader_ImgHdrTbl::KekIv[3U]

Kek IV for meta header decryption.

u32 XilLoader_PrtnHdr::KekIv[3U]

KEK IV for partition decryption.

u32 XilLoader_BootHdrFwRsvd::MetaHdrOfst

Offset to the start of meta header.

u32 XilLoader_PrtnHdr::NextPrtnOfst

Addr of the next partition header.

u32 XilLoader_ImgHdrTbl::NoOfImgs

No of images present.

u32 XilLoader_ImgHdrTbl::NoOfPrtns

No of partitions present.

u32 XilLoader_ImgHdrTbl::OptionalDataLen

Len in words of OptionalData.

u32 XilLoader_ImgHdrTbl::PdiId

PDI ID.

u32 XilLoader_BootHdr::PlmLen

PLM Length.

u32 XilLoader_PrtnHdr::PrtnAttrb

Partition attributes.

u8 XilPdi_PrtnHashInfo::PrtnHash[XLOADER_SHA3_HASH_LEN_IN_BYTES]

Partition hash.

u32 XilLoader_ImgHdrTbl::PrtnHdrAddr

Address to start of 1st partition header.

u32 XilLoader_PrtnHdr::PrtnId

Partition ID.

u32 XilLoader_PrtnHdr::PrtnIv[3U]

IV of the partition's SH.

u32 XilPdi_PrtnHashInfo::PrtnNum

Partition Number.

u32 XilLoader_BootHdr::PufShutterVal

PUF Shutter Value.

u32 XilLoader_PrtnHdr::Reserved[9U]

Reserved.

u32 XilLoader_BootHdr::RomRsvd[20U]

ROM Reserved.

u32 XilLoader_ImgHdrTbl::Rsrvd[3U]

Reserved for future use.

u32 XilLoader_ImgHdrTbl::Rsvd[8U]

Reserved.

u32 XilLoader_ImgHdrTbl::SBDAddr

Secondary Boot device address.

u32 XilLoader_PrtnHdr::SectionCount

Section count.

u32 XilLoader_BootHdr::SecureHdrIv[3U]

Secure Header IV.

XilPdi_PrtnHashInfo* XilPdi_HashTblInfo::StartOffset

Start offset of digest table.

u32 XilLoader_BootHdr::TotalDataPrtnLen

Total Data Partition length.

u32 XilLoader_PrtnHdr::TotalDataWordLen

Total word length including the authentication certificate if any.

u32 XilLoader_ImgHdrTbl::TotalHdrLen

Total size of Meta header AC + encryption overload.

u32 XilLoader_BootHdr::TotalPlmLen

Total PLM length.

u32 XilLoader_PrtnHdr::UnEncDataWordLen

Unencrypted word length.

u32 XilLoader_ImgHdrTbl::Version

PDI version used.

u32 XilLoader_BootHdr::WidthDetection

Width Detection 0xAA995566.