![]() |
xilloader
Vitis Drivers API Documentation
|
This file contains the versal_2ve_2vm specific code related to PDI image loading.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00 bm 07/06/2022 Initial release bm 07/13/2022 Retain critical data structures after In-Place PLM Update bm 07/18/2022 Shutdown modules gracefully during update dc 07/20/2022 Added support for data measurement dc 09/04/2022 Initialized TRNG is 09/12/2022 Remove PM_CAP_SECURE capability when requesting PSM_PROC, TCM memory banks 1.01 ng 11/11/2022 Updated doxygen comments dc 12/27/2022 Added SHA1 instance kal 01/05/2023 Added PCR Extend functions for secure images dd 03/28/2023 Updated doxygen comments ng 03/30/2023 Updated algorithm and return values in doxygen comments 1.02 ng 04/27/2023 Added support for cluster flags in ATF handoff params sk 05/23/2023 Made Status variable volatile to avoid optimization kal 06/04/2023 Added SW PCR extend support sk 06/12/2023 Removed PDI Inst DS export,Added Bootpdiinfo storage & DS export to handle in-place update flow, Removed XLoader_GetPdiInstance function definition bm 06/13/2023 Log PLM error before deferring sk 07/06/2023 Added Jtag DAP config support for Non-Secure Debug kpt 07/10/2023 Added IPI support to read DDR crypto status sk 07/09/2023 Enable TCM Boot based on PH Attribute Removed XLoader_GetLoadAddr targeting TCM Memory ng 06/26/2023 Added support for system device tree flow dd 08/11/2023 Updated doxygen comments sk 08/11/2023 Added error code for default case in XLoader_StartImage ng 02/14/2024 removed int typecast for errors 1.03 am 01/31/2024 Fixed internal security review comments of XilOcp library kpt 01/22/2024 Added support to extend secure state to SWPCR mss 03/06/2024 Removed code which was overwriting partition header Destination Execution Address sk 03/13/2024 Fixed doxygen comments format mss 04/12/2024 Added code to dump DDRMC error logs har 06/07/2024 Updated condition to check if optional data is not found kal 06/29/2024 Update InPlace update to load LPD and PSM pre 12/09/2024 use PMC RAM for Metaheader instead of PPU1 RAM obs 12/10/2024 Fixed GCC Warnings ma 01/07/2025 Added support for ASU handoff sk 02/04/2024 Reset Status before call to XLoader_PrtnCopy tri 03/01/2025 Added XLOADER_MEASURE_LAST case in XLoader_DataMeasurement for Versal 2VE and 2VM Devices sk 03/05/2025 Reset Status before use in XLoader_ProcessElf sk 03/05/2025 Added temporal check in XLoader_EncRevokeIdMeasurement sk 03/05/2025 Added ASU destination CPU attribute tri 03/13/2025 Added XLoader_MeasureNLoad support sk 03/17/2025 Added support for all 5 RPU clusters sk 03/22/2025 Updated status variable as volatile in XLoader_StartImage sk 03/29/2025 Added redundancy for handoff address
Macros | |
| #define | XLOADER_IMAGE_INFO_VERSION (1U) |
| Image version information. More... | |
| #define | XLOADER_IMAGE_INFO_LCVERSION (1U) |
| Image lowest compatible version information. More... | |
| #define | XLOADER_PDI_LIST_VERSION (1U) |
| PDI version list. More... | |
| #define | XLOADER_PDI_LIST_LCVERSION (1U) |
| PDI lowest compatible version list. More... | |
| #define | XLOADER_ATF_HANDOFF_PARAMS_VERSION (1U) |
| ATF handoff parameters version. More... | |
| #define | XLOADER_ATF_HANDOFF_PARAMS_LCVERSION (1U) |
| ATF handoff parameters lowest compatible version. More... | |
| #define | XLOADER_BOOTPDI_INFO_PARAMS_VERSION (2U) |
| BootPDI info version. More... | |
| #define | XLOADER_BOOTPDI_INFO_PARAMS_LCVERSION (2U) |
| BootPDI info lowest compatible version. More... | |
| #define | XLOADER_CMD_GET_DDR_DEVICE_ID (0U) |
| DDR device id. More... | |
| #define | XLOADER_DDR_CRYPTO_MAIN_OFFSET (0X40000U) |
| DDR crypto block offset from ub. More... | |
| #define | XLOADER_DDR_PERF_MON_CNT0_OFFSET (0X868U) |
| Counter 0 offset. More... | |
| #define | XLOADER_DDR_PERF_MON_CNT1_OFFSET (0X86CU) |
| Counter 1 offset. More... | |
| #define | XLOADER_DDR_PERF_MON_CNT2_OFFSET (0X870U) |
| Counter 2 offset. More... | |
| #define | XLOADER_DDR_PERF_MON_CNT3_OFFSET (0X874U) |
| Counter 3 offset. More... | |
| #define | XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_INDEX (0U) |
| Index in the Payload of ConfigureJtagState command where JTAG state flag is present. More... | |
| #define | XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_MASK (0x03U) |
| Mask for JTAG state flag. More... | |
| #define | XLOADER_CONFIG_JTAG_STATE_FLAG_ENABLE (0x03U) |
| Value of JTAG state flag if enabled. More... | |
| #define | XLOADER_CONFIG_JTAG_STATE_FLAG_DISABLE (0x00U) |
| Value of JTAG state flag if disabled. More... | |
| #define | XLOADER_PCR_MEASUREMENT_INDEX_MASK (0xFFFF0000U) |
| Mask for PCR Measurement index. More... | |
Functions | |
| int | XLoader_ReadDdrCryptoPerfCounters (XPlmi_Cmd *Cmd) |
| This function reads DDR crypto performance counters of given DDR device id. More... | |
| int | XLoader_UpdateHandler (XPlmi_ModuleOp Op) |
| This function provides update handler for xilloader. More... | |
| int | XLoader_PlatInit (void) |
| This function initializes the loader with platform specific initializations. More... | |
| int | XLoader_HdrMeasurement (XilPdi *PdiPtr) |
| This function measures the PDI's meta header data by calculating the hash using SHA3. More... | |
| int | XLoader_SecureConfigMeasurement (XLoader_SecureParams *SecurePtr, u32 PcrInfo, u32 *DigestIndex, u32 OverWrite) |
| This function measures the Secure Configuration that is SPK, SPK ID and Encryption Revoke ID and extends to the specified PCR. More... | |
| int | XLoader_ConfigureJtagState (XPlmi_Cmd *Cmd) |
| This function enables or disable Jtag Access Command payload parameters are. More... | |
| int | XLoader_CheckAndUpdateSecureState (void) |
| This function checks and updates the secure state configuration. More... | |
| XLoader_ImageInfoTbl * | XLoader_GetImageInfoTbl (void) |
| This function provides ImageInfoTbl pointer. More... | |
| XLoader_ImageStore * | XLoader_GetPdiList (void) |
| This function provides pointer to PdiList. More... | |
| XilPdi_ATFHandoffParams * | XLoader_GetATFHandoffParamsAddr (void) |
| This function returns the ATFHandoffParams structure address to the caller. More... | |
| XilBootPdiInfo * | XLoader_GetBootPdiInfo (void) |
| This function provides pointer to BootPDI Info. More... | |
| int | XLoader_StartImage (XilPdi *PdiPtr) |
| This function is used to start the subsystems in the PDI. More... | |
| int | XLoader_MeasureNLoad (XilPdi *PdiPtr) |
| This function measures the partion hashes. More... | |
| void | XLoader_SetATFHandoffParameters (const XilPdi_PrtnHdr *PrtnHdr) |
| This function sets the handoff parameters to the ARM Trusted Firmware(ATF). More... | |
| int | XLoader_GetSDPdiSrcNAddr (u32 SecBootMode, XilPdi *PdiPtr, u32 *PdiSrc, u64 *PdiAddr) |
| This function is used to get PdiSrc and PdiAddr for Secondary SD boot modes. More... | |
| int | XLoader_ProcessElf (XilPdi *PdiPtr, const XilPdi_PrtnHdr *PrtnHdr, XLoader_PrtnParams *PrtnParams, XLoader_SecureParams *SecureParams) |
| This function copies the elf partitions to specified destinations. More... | |
| int | XLoader_UpdateHandoffParam (XilPdi *PdiPtr) |
| This function is used to update the handoff parameters. More... | |
| int | XLoader_ProcessDeferredError (void) |
| This function checks if MJTAG workaround is required. More... | |
| int | XLoader_DataMeasurement (XLoader_ImageMeasureInfo *ImageInfo) |
| This function measures the data by calculating SHA3 hash. More... | |