![]() |
xilloader
Vitis Drivers API Documentation
|
This file contains the code related to PDI image loading.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 kc 07/25/2018 Initial release tp 04/05/2019 Added API to reload a particular image kc 04/09/2019 Added support for PCIe secondary boot mode and partial PDI load bsv 06/11/2019 Added TCM power up code to Xilloader to fix issue in R5-1 split mode functionality bsv 06/17/2019 Added support for CFI and CFU error handling bsv 06/26/2019 Added secondary boot support kc 07/16/2019 Added code to print execution time rv 07/29/2019 Added code to request boot source before subsystem restart vnsl 07/30/2019 Added APIs to load secure headers scs 08/29/2019 Added API to validate extended ID Code bsv 08/30/2019 Added fallback and multiboot support in PLM kc 09/05/2019 Added code to use PMCDMA0 and PMCDMA1 in parallel kc 09/13/2019 SBI reset is removed for SMAP boot mode to ensure smap bus width value remains unchanged 1.01 bsv 10/31/2019 Added USB secondary boot mode support kc 12/02/2019 Added performance time stamps ma 12/12/2019 Added support for passing hand off parameters to ATF bsv 12/30/2019 Added SMAP secondary boot mode support ma 02/03/2020 Change XPlmi_MeasurePerfTime to retrieve Performance time and print bsv 02/12/2020 Added support for SD/eMMC raw boot mode bsv 02/23/2020 Added multi partition support for SD/eMMC FS boot modes bsv 02/25/2020 Added macros to handle u32 return values from drivers vnsl 02/26/2020 Added boot header reading call during partial PDI kc 02/27/2020 Added SEM support for partial reconfiguration bsv 02/28/2020 Added support for delay handoff har 02/28/2020 Removed code to return error codes for security related errors vnsl 03/01/2020 Added PUF KEK decrypt support bsv 03/14/2020 Added eMMC0 FS and raw boot mode support bsv 04/09/2020 Code clean up 1.02 ana 06/04/2020 Updated PlmkatStatus and Kekstatus variables from initial boot pdi to partial pdi structure variables bsv 06/22/2020 Cfi error handler should only be called for PL image bsv 07/01/2020 Added DevRelease to DevOps kc 07/28/2020 PLM mode is set to configuration during PDI load bsv 07/29/2020 Added support for delay load attribute bsv 08/06/2020 Code clean up bsv 08/10/2020 Added subsystem restart support from DDR har 08/11/2020 Added task to scheduler for checking Authenticated JTAG interrupt status bsv 08/16/2020 Reinitialized Status variable to XST_FAILURE for security reasons td 08/19/2020 Fixed MISRA C violations Rule 10.3 bm 08/19/2020 Added logic to store ImageInfo bsv 08/21/2020 Added XSECURE_TEMPORAL_CHECK macro to add redundancy in security critical functions bm 09/07/2020 Clear PMC RAM chunk after loading PDIs and reloading images bm 09/21/2020 Added ImageInfo related code and added compatibility check required for DFx bm 09/24/2020 Added FuncID to RestartImage bsv 09/30/2020 Enable parallel DMA for SBI related boot modes bsv 10/09/2020 Add subsystem restart support for SD raw boot modes bsv 10/13/2020 Code clean up kpt 10/19/2020 Renamed XLoader_UpdateKekRdKeyStatus to XLoader_UpdateKekSrc td 10/19/2020 MISRA C Fixes 1.03 td 11/23/2020 Coverity Warning Fixes bsv 12/02/2020 Replace SemCfr APIs with generic Sem APIs bm 12/16/2020 Added PLM_SECURE_EXCLUDE macro kpt 01/06/2021 Added redundancy check for XLoader_ReadAndVerifySecureHdrs ma 01/18/2021 Added function for PMC state clear bsv 01/28/2021 Initialize ParentImgID to invalid value skd 02/01/2021 Added EL_3 check for partition in ATF HandoffParams bm 02/12/2021 Updated logic to use BootHdr directly from PMC RAM kpt 02/16/2021 Updated error code when secure validations are failed rb 03/09/2021 Updated Sem Scan Init API call bm 03/16/2021 Added Image Upgrade support har 03/17/2021 Added API call to set the secure state ma 03/24/2021 Redirect XilPdi prints to XilLoader ma 03/24/2021 Minor updates to prints in XilLoader har 03/31/2021 Added code to update PDI ID in RTC area of PMC RAM bl 04/01/2021 Add extra arg for calls to XPm_RequestWakeUp bm 04/14/2021 Update UID logic for AIE Image IDs rp 04/20/2021 Add extra arg for calls to XPm_RequestDevice and XPm_ReleaseDevice bm 05/05/2021 Added USR_ACCESS support for PLD0 image bm 05/10/2021 Updated chunking logic for hashes ma 05/18/2021 Minor code cleanup 1.04 td 07/08/2021 Fix doxygen warnings td 07/15/2021 Fix doxygen warnings bm 07/16/2021 Updated XLoader_PdiInit prototype bsv 07/18/2021 Debug enhancements bsv 07/19/2021 Disable UART prints when invalid header is encountered in slave boot modes bsv 07/24/2021 Clear RTC area at the beginning of PLM ma 07/27/2021 Added temporal check for XLoader_SetSecureState ma 07/27/2021 Added temporal check for XilPdi_ValidateImgHdrTbl bm 08/09/2021 Removed obsolete XLoader_PMCStateClear API bsv 08/17/2021 Code clean up rb 08/11/2021 Fix compilation warnings bm 08/24/2021 Added Extract Metaheader support bm 08/26/2021 Updated XLOADER_PDI_LOAD_STARTED register write bsv 08/31/2021 Code clean up kpt 09/06/2021 Fixed SW-BP-ZEROIZE issue in XLoader_LoadAndStartSubSystemImages gm 09/17/2021 Support added for MJTAG workaround bsv 09/24/2021 Fix secondary Pdi load issue 1.05 kpt 10/20/2021 Modified temporal checks to use temporal variables from data section bsv 10/26/2021 Code clean up bsv 12/04/2021 Clear complete PMCRAM in XLoader_ReloadImage kpt 12/13/2021 Replace Xil_SecureMemCpy with Xil_SMemCpy bsv 12/22/2021 Added zeroization of ImageHeaderTable instance in case of invalid header bm 01/20/2022 Fix compilation warnings in Xil_SMemCpy bsv 01/29/2022 Added redundancy to Status variable in XLoader_LoadImage 1.06 kpt 02/01/2022 Updated XilPdi_ReadBootHdr prototype skg 06/20/2022 Fixed MISRA C Rule 10.3 violation ma 06/21/2022 Add support for Get Handoff Parameters IPI command bsv 07/06/2022 Added support to read Optional Data in slave boot modes bm 07/06/2022 Refactor versal and versal_net code kpt 07/05/22 Added support to update KAT status bsv 07/08/2022 Code changes related to Optional data in Image header dc 07/12/2022 Added device stage to scheduler bm 07/13/2022 Added compatibility check for In-Place PLM Update bm 07/13/2022 Retain critical data structures after In-Place PLM Update dc 07/20/2022 Added Data measurement, supports only for Versal Net dc 07/27/2022 Added goto END in error case for header failures ma 08/08/2022 Check EAM errors between each image load ng 08/18/2022 Modified DelayedHandoffCpus condition to handle all possible values 1.07 sk 11/22/2022 Added Subsystems ValidHeader member variable init to XLoader_Init function to handle in-place update scenerio ng 11/23/2022 Updated doxygen comments ng 01/02/2023 Check to bypass entire ID Code Check kpt 01/04/2023 Added check to update FIPS state sk 01/11/2023 Added Image Store support as secondary boot media bm 01/04/2023 Switch to SSIT Events as soon as basic Noc path is configured bm 01/14/2023 Remove bypassing of PLM Set Alive during boot sk 02/08/2023 Renamed XLoader_UpdateKatStatus to XLoader_ClearKatOnPPDI sk 03/17/2023 Renamed Kekstatus to DecKeySrc in xilpdi structure ng 03/30/2023 Updated algorithm and return values in doxygen comments sk 04/28/2023 Added function to retrieve PDI Address from Image Store based on PDI ID sk 05/18/2023 Deprecate copy to memory feature,Added function to save BootPDI info, Definition for XLoader_GetPdiInstance am 07/07/2023 Added error code for Read IHT optional data sk 07/31/2023 Updated error codes in XLoader_IsPdiAddrLookup sk 08/18/2023 Fixed security review comments sk 08/28/2023 Added redundant call for XLoader_GetKekSrc rama 08/30/2023 Changed PDI source type print to DEBUG_ALWAYS for debug level_0 option dd 09/11/2023 MISRA-C violation Rule 10.3 fixed dd 09/11/2023 MISRA-C violation Rule 17.8 fixed kpt 11/22/2023 Add support to clear AES keys when RedKeyClear bit is set mss 11/06/2023 Added VerifyAddr check for Image Store Address of RTCA registers kpt 11/01/2023 Clear AES keys during PDI failure bm 02/12/2024 Update XLoader_ReadAndValidateHdrs prototype ng 02/14/2024 removed int typecast for errors sk 02/18/2024 Added DDRMC Calib Check Status RTCA Register Init 1.08 sk 04/18/2024 Enhance Restart Image to Support loading from Boot PDI Present in Image Store kal 06/29/2024 Make XLoader_LoadImage as a non-static function kal 07/24/2024 Code refactoring for Versal 2VE and 2VM Devices updates. mb 08/10/2024 Added support for loading cdo after secure boot. pre 10/03/2024 Clearing GSW error after PDI loading obs 09/30/2024 Fixed Doxygen Warnings 1.09 kpt 11/05/2024 Fixed issue in reading optional data pre 12/09/2024 use PMC RAM for Metaheader instead of PPU1 RAM pre 01/02/2025 clearing metaheader space based on size of metaheader structure mb 01/22/2025 Fix SMAP secondary boot fail tri 03/01/2025 Added data measurement support for Versal 2VE and 2VM Devices tri 03/13/2025 Moved partition measurement to platform specific and Added XLoader_DataMeasurement support for versal ma 03/19/2025 Update function ID of the PLD0 image to USR_ACCESS register in RTCA before loading the PLD0 image sk 03/29/2025 Added redundant check for XLoader_ValidateMetaHdrIntegrity pre 04/01/2025 Clearing metaheader in XLoader_InitPdiInstanceForExtractMHAndOptData pre 04/04/2025 Fixed bug in load image feature sk 05/07/2025 Fix the config for PCIe as secondary boot mode
Macros | |
| #define | XLOADER_IMAGE_INFO_TBL_MAX_NUM |
| Maximum number of image info tables in the available buffer. More... | |
Functions | |
| int | XLoader_Init (void) |
| This function initializes the loader instance and registers loader commands with PLM. More... | |
| int | XLoader_PdiInit (XilPdi *PdiPtr, PdiSrc_t PdiSource, u64 PdiAddr) |
| This function initializes the PDI instance with required details and read the meta header. More... | |
| int | XLoader_LoadPdi (XilPdi *PdiPtr, PdiSrc_t PdiSrc, u64 PdiAddr) |
| This function provides loading PDI. More... | |
| XLoader_ImageInfo * | XLoader_GetImageInfoEntry (u32 ImgID) |
| This function returns the ImageInfoEntry by checking if an entry exists for that particular ImgId in the ImgInfoTbl. More... | |
| int | XLoader_LoadImageInfoTbl (u64 DestAddr, u32 MaxSize, u32 *NumEntries) |
| This function loads the ImageInfo table to the given memory address. More... | |
| int | XLoader_LoadImage (XilPdi *PdiPtr) |
| This function is used load a image in PDI. More... | |
| int | XLoader_RestartImage (u32 ImageId, u32 *FuncID) |
| This function is used to restart the image in PDI. More... | |
| int | XLoader_IdCodeCheck (const XilPdi_ImgHdrTbl *ImgHdrTbl) |
| This function performs the checks of IDCODE and EXTENDED IDCODE. More... | |
| int | XLoader_ReadImageStoreCfg (void) |
| This function is used to read the Image Store DDR Memory Addr. More... | |
| int | XLoader_IsPdiAddrLookup (u32 PdiId, u64 *PdiAddr) |
| This function is used to read the Address based-on PDI Id from Image Store. More... | |
| void | Xloader_SaveBootPdiInfo (XilPdi *BootPdiPtr) |
| This function is used to save the BootPDI info. More... | |
| XilPdi * | XLoader_GetPdiInstance (void) |
| This function provides PdiInstance pointer. More... | |
| int | XLoader_InitPdiInstanceForExtractMHAndOptData (XPlmi_Cmd *Cmd, XilPdi *PdiPtr, u64 SrcAddr, u64 DestAddr, u32 DestSize) |
| This function initializes PDI Instance pointer for extracting Metaheader and OptionalData. More... | |
| int | XLoader_ClearATFHandoffParams (XilPdi *PdiPtr) |
| This function clears ATF Handoff parameters in case of multi-partitions in APU subsystem. More... | |
| int | XLoader_GetImageAndPrtnInfo (XilPdi *PdiPtr, u32 ImageId) |
| This function provides Image number and partition number of a given ImgId in the PDI instance. More... | |