xilloader
Vitis Drivers API Documentation
xloader_prtn_load.c File Reference

Overview

This is the file which contains partition load code for the Platform loader.

MODIFICATION HISTORY:
Ver   Who  Date        Changes
----- ---- -------- -------------------------------------------------------
1.00  kc   02/21/2017 Initial release
1.01  vnsl 04/28/2019 Added security support
      kc   05/09/2019 Added code for PSM RAM ECC initialization
      bsv  06/11/2019 Added TCM power up code to Xilloader to fix issue in
                                        R5-1 split mode functionality
      bsv  06/24/2019 Moved ECC initialization code from Xilloader to Xilpm
      js   06/27/2019 Updated PSM arguments
      vnsl 07/09/2019 Added PPK and SPK integrity checks
      vnsl 07/09/2019 Added authentication + encryption support
      kc   09/05/2019 Added code to use PMCDMA0 and PMCDMA1 in parallel
1.02  ma   12/12/2019 Added support for passing hand off parameters to ATF
      kc   12/17/2019 Added support for deferred error mechanism for mask poll
      bsv  01/12/2020 Changes related to bitstream loading
      bsv  01/30/2002 Enabled direct DMA from boot devices to CFI
      ma   02/03/2020 Change XPlmi_MeasurePerfTime to retrieve Performance
                      time and print
      bsv  02/28/2020 Added support for delay handoff
      ma   03/02/2020 Added support for logging trace events
      bsv  04/09/2020 Code clean up of Xilloader
1.03  kc   06/12/2020 Added IPI mask to PDI CDO commands to get subsystem info
      kal  07/20/2020 Added double buffering support for secure CDOs
      bsv  07/29/2020 Added delay load support
      skd  07/29/2020 Added parallel DMA support for Qspi and Ospi
      bsv  08/06/2020 Code clean up
      td   08/19/2020 Fixed MISRA C violations Rule 10.3
      kal  08/23/2020 Added parallel DMA support for Qspi and Ospi for secure
      kpt  09/07/2020 Fixed key rolling issue for secure cases
      bsv  09/30/2020 Added parallel DMA support for SBI, JTAG, SMAP and PCIE
                      boot modes
      bsv  10/13/2020 Code clean up
      td   10/19/2020 MISRA C Fixes
1.04  bsv  01/28/2021 Initialize variables to invalid values
      bsv  01/29/2021 Added check for NPI errors after loading every partition
1.05  bm   03/04/2021 Added address range check before loading elfs
      ma   03/24/2021 Redirect XilPdi prints to XilLoader
      ma   03/24/2021 Minor updates to prints in XilLoader
      bl   04/01/2021 Add secure IPI arg to XPm_DevIoctl and
                      XPm_RequestWakeUp
      bsv  04/13/2021 Added support for variable Keyhole sizes in
                      DmaWriteKeyHole command
      bsv  04/16/2021 Add provision to store Subsystem Id in XilPlmi
      rp   04/20/2021 Add extra arg for calls to XPm_RequestDevice and
                XPm_ReleaseDevice
      gm   05/10/2021 Added support to dump DDRMC registers in case of
                deferred error
      td   05/20/2021 Fixed blind write on locking NPI address space in
                      XPlmi_ClearNpiErrors
1.06  td   07/15/2021 Fix doxygen warnings
      bsv  08/17/2021 Code clean up
      bsv  08/31/2021 Code clean up
      bsv  09/01/2021 Added checks for zero length in XLoader_ProcessCdo
      bsv  09/20/2021 Fixed logical error in processing Cdos
      bm   09/23/2021 Fix R5 partition load issue
1.07  kpt  10/07/2021 Decoupled checksum functionality from secure code
      is   10/12/2021 Updated XPm_DevIoctl to reflect additional command arg
      kpt  10/20/2021 Modified temporal checks to use temporal variables from
                      data section
      bsv  10/26/2021 Code clean up
      kpt  10/28/2021 Fixed checksum issue in case of copy to memory
1.08  skd  11/18/2021 Added time stamps in XLoader_ProcessCdo
      ma   01/30/2022 Added support for skipping MJTAG image when bootmode is
                      JTAG or Reset Reason is not EPOR
      ma   01/31/2022 Fix DMA Keyhole command issue where the command
                      starts at the 32K boundary
      kpt  02/18/2022 Fix copy to memory issue for slave and non-slave boot
                      modes
      bsv  03/17/2022 Add support for A72 elfs to run from TCM
      bsv  03/23/2022 Minor change in loading of A72 elfs to TCM
      bsv  03/29/2022 Dump Ddrmc registers only when PLM DEBUG MODE is enabled
1.09  skg  06/20/2022 Fixed MISRA C Rule 10.3 violation
      skg  06/20/2022 Fixed MISRA C Rule 4.1 violation
      bm   07/06/2022 Refactor versal and versal_net code
      dc   07/19/2022 Added support for data measurement in VersalNet
      bm   07/24/2022 Set PlmLiveStatus during boot time
1.10  ng   11/11/2022 Updated doxygen comments
      kal  01/05/2023 Added XLoader_SecureConfigMeasurement function for
                      secure images measurement
      bm   01/05/2023 Clear End Stack before processing a CDO partition
      bm   01/03/2023 Notify Other SLRs about Secure Lockdown
      ng   03/30/2023 Updated algorithm and return values in doxygen comments
      sk   05/18/2023 Deprecate copy to memory feature
      bm   05/22/2023 Update current CDO command offset in GSW Error Status
      bm   07/06/2023 Remove XPlmi_ClearEndStack call
      rama 08/10/2023 Changed partition ID print to DEBUG_ALWAYS for
                      debug level_0 option
      dd   09/11/2023 MISRA-C violation Rule 10.3 fixed
      mss  11/02/2023 Added VerifyAddr check for destination address of
                      Raw Partition Loading
      sk   02/18/2024 Added logic to print DDRMC Calib Check Status
      kal  06/04/2024 Moved XLoader_SecureConfigMeasurement call to
                XLoader_ProcessAuthEncPrtn
      mss  04/05/2024 Added logic to disable device copy optimization
      bm   09/25/2024 Fix Boot Device Copy Optimization logic
      pre  12/09/2024 use PMC RAM for Metaheader instead of PPU1 RAM
        tri  03/01/2025 Updated XLoader_ImageMeasureInfo for partion measurement
Note

Macros

#define XLOADER_SUCCESS_NOT_PRTN_OWNER   (0x100U)
 Indicates that PLM is not the partition owner. More...
 
#define XLOADER_BOOT_COPY_OPTIMIZATION_ENABLED   (0U)
 Indicates Boot Device Copy Optimization is Enabled. More...
 

Functions

int XLoader_LoadImagePrtns (XilPdi *PdiPtr)
 This function loads the partition. More...
 
int XLoader_PrtnCopy (const XilPdi *PdiPtr, const XLoader_DeviceCopy *DeviceCopy, void *SecureParamsPtr)
 This function copies partition data to respective target memories. More...