![]() |
xilloader
Vitis Drivers API Documentation
|
Macros | |
| #define | XLOADER_IMAGE_INFO_TBL_MAX_NUM |
| Maximum number of image info tables in the available buffer. More... | |
| #define | XLOADER_RSA_PSS_MSB_PADDING_MASK (u8)(0x80U) |
| RSA PSS MSB padding mask. More... | |
| #define | XLOADER_RSA_EM_MSB_INDEX (0x0U) |
| RSA EM MSB Index. More... | |
| #define | XLOADER_PUF_SHUT_GLB_VAR_FLTR_EN_SHIFT (31U) |
| Shift for Global Variation Filter in PUF shutter value. More... | |
| #define | XLOADER_AES_RESET_VAL (0x1U) |
| AES Reset value. More... | |
| #define | XLOADER_AES_RESET_REG (0xF11E0010U) |
| AES Reset register address. More... | |
| #define | XLOADER_ECDSA_RSA_RESET_REG (0xF1200040U) |
| ECDSA RSA Reset register address. More... | |
| #define | XLOADER_ECDSA_RSA_RESET_VAL (0x1U) |
| ECDSA RSA Reset value. More... | |
| #define | XLOADER_GET_PRTN_HASH_INDEX(PdiPtr) |
| Get partition hash index depending on full/partial PDI. More... | |
| #define | CFRAME_BCAST_REG_TESTMODE_OFFSET (0x120U) |
| Test mode offset. More... | |
| #define | CFRAME_BCAST_REG_TESTMODE_CRAM_SELF_CHECK_MASK (0x100U) |
| CRAM self check mask. More... | |
| #define | CFRAME_BCAST_REG_FAR_OFFSET (0x10U) |
| CFrame address register offset. More... | |
| #define | CFRAME_BCAST_REG_FAR_BLOCKTYPE_SHIFT (20U) |
| CFrame address register block type shift. More... | |
| #define | CFRAME_MAX_BLOCK_TYPE_COUNT (0x3U) |
| CFrame maximum block type count. More... | |
| #define | XPLMI_ZERO (0x0U) |
| Zero. More... | |
| #define | CFRAME_CRC_POLL_TIMEOUT (0xFFFFU) |
| CRC poll time out. More... | |
| #define | XLOADER_CFRAME_DATACLEAR_CHECK_CMD_ID (0xCU) |
| Data clear check command Id. More... | |
| #define | PMC_GLOBAL_PMC_ERR2_STATUS_CFI_SHIFT (16U) |
| CFI Non-Correctable Error shift. More... | |
| #define | XLOADER_SBI_DELAY_IN_MICROSEC (5000U) |
| Flag indicates SBI delay in micro second. More... | |
| #define | XLOADER_LOG_LEVEL_MASK (0xF0U) |
| Flag indicates Log level mask. More... | |
| #define | XLOADER_SBI_CTRL_INTERFACE_AXI_SLAVE (0x8U) |
| SBI PCIE PDI load. More... | |
| #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... | |
| #define | XLOADER_SHA3_RESET_REG (0xF1210004U) |
| SHA3 Reset register address. More... | |
| #define | XLOADER_SHA3_RESET_VAL (0x1U) |
| SHA3 Reset value. More... | |
| #define | XLOADER_TCM_0 (0U) |
| TCM 0. More... | |
| #define | XLOADER_TCM_1 (1U) |
| TCM 1. More... | |
| #define | XLOADER_RPU_GLBL_CNTL (0xFF9A0000U) |
| RPU global control. More... | |
| #define | XLOADER_TCMCOMB_MASK (0x40U) |
| TCM combine mask. More... | |
| #define | XLOADER_TCMCOMB_SHIFT (6U) |
| TCM combine shift. More... | |
| #define | PLM_VP1802_POR_SETTLE_TIME (25000U) |
| Flag indicates POR settle time for VP1802. More... | |
| #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... | |
| #define | XLOADER_EFUSE_OBFUS_KEY (0xA5C3C5A7U) |
| eFuse obfuscated key More... | |
| #define | XLOADER_BBRAM_OBFUS_KEY (0x3A5C3C57U) |
| BBRAM obfuscated key. More... | |
| #define | XLOADER_BH_OBFUS_KEY (0xA35C7CA5U) |
| Boot header obfuscated key. More... | |
| #define | XLOADER_INVALID_OBFUS_KEY (0xFFFFFFFFU) |
| Invalid obfuscated key. More... | |
| #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_EFUSE_ROM_RSVD_CACHE_ADDRESS (0xF1250090U) |
| ROM Reserved eFuse cache offset. More... | |
| #define | XLOADER_EFUSE_ROM_RSVD_AUTH_KEYS_TO_HASH_MASK (0x00000200U) |
| AUTH_KEYS_TO_HASH eFuse bit mask. More... | |
| #define | XLOADER_EFUSE_ROM_RSVD_AUTH_KEYS_TO_HASH_SHIFT (9U) |
| AUTH_KEYS_TO_HASH eFuse bit shift. More... | |
| #define | XLOADER_PCR_MEASUREMENT_INDEX_MASK (0xFFFF0000U) |
| Mask for PCR Measurement index. More... | |
| #define | XLOADER_EFUSE_OBFUS_KEY (0xA5C3C5A7U) |
| eFuse obfuscated key More... | |
| #define | XLOADER_BBRAM_OBFUS_KEY (0x3A5C3C57U) |
| BBRAM obfuscated key. More... | |
| #define | XLOADER_BH_OBFUS_KEY (0xA35C7CA5U) |
| Boot header obfuscated key. More... | |
Functions | |
| int | XLoader_SecureAuthInit (XLoader_SecureParams *SecurePtr, const XilPdi_PrtnHdr *PrtnHdr) |
| This function initializes authentication parameters of XLoader_SecureParams's instance. More... | |
| int | XLoader_SecureEncInit (XLoader_SecureParams *SecurePtr, const XilPdi_PrtnHdr *PrtnHdr) |
| This function initializes encryption parameters of XLoader_SecureParams's instance. More... | |
| int | XLoader_SecureValidations (const XLoader_SecureParams *SecurePtr) |
| This function checks if authentication/encryption is compulsory. More... | |
| int | XLoader_ReadAndVerifySecureHdrs (XLoader_SecureParams *SecurePtr, XilPdi_MetaHdr *MetaHdr) |
| This function authenticates and/or decrypts the image headers and partition headers and copies the contents to the corresponding structures. More... | |
| int | XLoader_IsPpkValid (XLoader_PpkSel PpkSelect, const u8 *PpkHash) |
| The function reads PPK invalid bits. More... | |
| int | XLoader_RsaPssSignVerify (u8 *MsgHash, XSecure_Rsa *RsaInstPtr, u8 *Signature, u32 KeySize) |
| This function encrypts the RSA signature provided and performs required PSS operations to extract salt and calculates M prime hash and compares with hash obtained from EM. More... | |
| int | XLoader_AddAuthJtagToScheduler (void) |
| This function adds periodic checks of the status of Auth JTAG interrupt status to the scheduler. More... | |
| int | XLoader_CheckAuthJtagIntStatus (void *Arg) |
| This function checks the status of Auth JTAG interrupt status and it disables the Jtag as per the timeout set by user. More... | |
| int | XLoader_EnableJtag (volatile u32 CfgState) |
| This function enables the Jtag. More... | |
| int | XLoader_DisableJtag (void) |
| This function disables the Jtag. More... | |
| int | XLoader_AuthEncClear (void) |
| This function is called to clear secure critical data related to authentication and encryption in case of exceptions. More... | |
| void | XLoader_ClearKatOnPPDI (XilPdi *PdiPtr, u32 PlmKatMask) |
| This function updates the KAT status. More... | |
| int | XLoader_ClearAesKey (u32 *DecKeySrc) |
| This function clears the AES keys when RedKeyClear is set in PMC RAM. More... | |
| int | XLoader_ProcessAuthEncPrtn (XLoader_SecureParams *SecurePtr, u64 DestAddr, u32 BlockSize, u8 Last) |
| This function performs authentication and decryption of the partition. More... | |
| int | XLoader_CheckSecureState (u32 RegVal, u32 Var, u32 ExpectedValue) |
| This function checks if the secure state of boot matches the expected value or not. More... | |
| int | XLoader_ImgHdrTblAuth (XLoader_SecureParams *SecurePtr) |
| This function authenticates the image header table. More... | |
| int | XLoader_DataAuth (XLoader_SecureParams *SecurePtr, u8 *Hash, u8 *Signature) |
| This function authenticates the data with SPK. More... | |
| int | XLoader_CframeInit (void) |
| This function initializes the Cframe driver. More... | |
| void | XLoader_CframeErrorHandler (u32 ImageId) |
| This function is used to check the CFU ISR and PMC_ERR1 and PMC_ERR2 status registers to check for any errors in PL and call corresponding error recovery functions if needed. More... | |
| int | XLoader_CframeDataClearCheck (XPlmi_Cmd *Cmd) |
| This function is used to check if the Cframe data is cleared or not using CRC method. More... | |
| int | XLoader_CfiSelectiveRead (XPlmi_Cmd *Cmd) |
| This function provides CFI SELECTIVE READ command execution. More... | |
| int | XLoader_DdrInit (u32 DeviceFlags) |
| This function is used to initialize for DDR init. More... | |
| int | XLoader_DdrCopy (u64 SrcAddr, u64 DestAddr, u32 Length, u32 FlagsVal) |
| This function is used to copy the data from DDR to destination address. More... | |
| int | XLoader_DdrRelease (void) |
| This function releases control of DDR. More... | |
| int | XLoader_IntrInit (void) |
| This function initializes the loader instance and registers loader commands with PLM. More... | |
| 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... | |
| int | XLoader_SecureInit (XLoader_SecureParams *SecurePtr, XilPdi *PdiPtr, u32 PrtnNum) |
| This function initializes XLoader_SecureParams's instance. More... | |
| int | XLoader_SecureCopy (XLoader_SecureParams *SecurePtr, u64 DestAddr, u32 Size) |
| This function loads secure non-cdo partitions. More... | |
| int | XLoader_SecureClear (void) |
| This function is called to clear secure critical data in case of exceptions. More... | |
| int | XLoader_VerifyHashNUpdateNext (XLoader_SecureParams *SecurePtr, u64 DataAddr, u32 Size, u8 Last) |
| This function calculates hash and compares with expected hash. More... | |
| int | XLoader_SecureChunkCopy (XLoader_SecureParams *SecurePtr, u64 SrcAddr, u8 Last, u32 BlockSize, u32 TotalSize) |
| This function copies the data from SrcAddr to chunk memory during processing of secure partitions. More... | |
| int | XLoader_CheckNonZeroPpk (void) |
| This function checks if PPK is programmed. More... | |
| u32 | XLoader_GetAHWRoT (const u32 *AHWRoTPtr) |
| This function returns the state of authenticated boot. More... | |
| u32 | XLoader_GetSHWRoT (const u32 *SHWRoTPtr) |
| This function returns the state of encrypted boot. More... | |
| int | XLoader_SetSecureState (void) |
| This function reads the value of PPK efuse bits, DEC only efuse bits and fields in bootheader and accordingly sets the Secure State of boot. More... | |
| XLoader_SecureTempParams * | XLoader_GetTempParams (void) |
| This function returns the pointer to XLoader_SecureTempParams. More... | |
| u32 | XLoader_GetKekSrc (void) |
| This function updates KEK red key availability status from boot header. More... | |
| int | XLoader_AesObfusKeySelect (u32 PdiKeySrc, u32 DecKeyMask, void *KeySrcPtr) |
| This function provides Obfuscated Aes Key source. More... | |
| int | XLoader_RsaKat (void) |
| This function runs the KAT for RSA. More... | |
| int | XLoader_MaskGenFunc (XSecure_Sha3 *Sha3InstancePtr, u8 *Out, u32 OutLen, u8 *Input) |
| Mask generation function with SHA3. More... | |
| int | XLoader_IsAdditionalPpkValid (const u8 *PpkHash) |
| This function verifies whether the additional PPK is valid. More... | |
| int | XLoader_AdditionalPpkSelect (XLoader_PpkSel PpkSelect, u32 *InvalidMask, u32 *PpkOffset) |
| This function checks for the additional PPK select and returns the PPK invalid mask and PPK efuse cache start offset if PPK is valid. More... | |
| int | XLoader_CheckSecureStateAuth (volatile u32 *AHWRoT) |
| This function checks Secure State for Authentication. More... | |
| int | XLoader_AddDeviceStateChangeToScheduler (void) |
| This function adds periodic checks of the device status change during secure boot. More... | |
| int | XLoader_CheckDeviceStateChange (void *Arg) |
| This function checks the JTAG device state change. More... | |
| int | XLoader_MaskGenFunc (XSecure_Sha *ShaInstancePtr, u8 *Out, u32 OutLen, u8 *Input) |
| Mask generation function with SHA3. More... | |
| int | XLoader_UpdateCfgLimitCount (u32 UpdateFlag) |
| This function updates the configuration limiter count if Configuration limiter feature is enabled in case of secure boot. More... | |
Variables | |
| u32 | XLoader_AuthJtagStatus::JtagTimeOut |
| Timeout value set by user. More... | |
| u8 | XLoader_AuthJtagStatus::JtagTimerEnabled |
| Enable JTAG timer. More... | |
| volatile u8 | XLoader_AuthJtagStatus::AuthFailCounter |
| Counter for failed attempts to authenticate JTAG. More... | |
| volatile u8 | XLoader_AuthJtagStatus::AuthFailCounterTmp |
| For temporal redundancy. More... | |
| 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... | |
| 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... | |
| int | XLoader_DataMeasurement (XLoader_ImageMeasureInfo *ImageInfo) |
| This function measures the data by calculating SHA3 hash. More... | |
| void | XLoader_SetATFHandoffParameters (const XilPdi_PrtnHdr *PrtnHdr) |
| This function sets the handoff parameters to the ARM Trusted Firmware(ATF). More... | |
| void | XLoader_SetJtagTapToReset (void) |
| This function is used to run MJTAG solution workaround in which JTAG Tap state will be set to reset. 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... | |
| u8 | XLoader_SkipMJtagWorkAround (XilPdi *PdiPtr) |
| This function checks if MJTAG workaround partition needs to be skipped. More... | |
| int | XLoader_ProcessDeferredError (void) |
| This function checks if MJTAG workaround is required. More... | |
| void | XLoader_PerformInternalPOR (void) |
| This function check conditions and perform internal POR for VP1802 and VP1502 device if required. More... | |
| int | Xloader_SsitEoPdiSync (XilPdi *PdiPtr) |
| This function will sync the PDI load status with master if End of PDI SYNC bit is enabled in IHT. More... | |
| 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... | |
| int | XLoader_LoadLpdAndPsmElf () |
| This function will load the LPD and PSM ELF file from DDR. More... | |
| #define CFRAME_BCAST_REG_FAR_BLOCKTYPE_SHIFT (20U) |
CFrame address register block type shift.
Referenced by XLoader_CframeDataClearCheck().
| #define CFRAME_BCAST_REG_FAR_OFFSET (0x10U) |
CFrame address register offset.
Referenced by XLoader_CframeDataClearCheck().
| #define CFRAME_BCAST_REG_TESTMODE_CRAM_SELF_CHECK_MASK (0x100U) |
CRAM self check mask.
Referenced by XLoader_CframeDataClearCheck().
| #define CFRAME_BCAST_REG_TESTMODE_OFFSET (0x120U) |
Test mode offset.
Referenced by XLoader_CframeDataClearCheck().
| #define CFRAME_CRC_POLL_TIMEOUT (0xFFFFU) |
CRC poll time out.
Referenced by XLoader_CframeDataClearCheck().
| #define CFRAME_MAX_BLOCK_TYPE_COUNT (0x3U) |
CFrame maximum block type count.
Referenced by XLoader_CframeDataClearCheck().
| #define PLM_VP1802_POR_SETTLE_TIME (25000U) |
Flag indicates POR settle time for VP1802.
Referenced by XLoader_PerformInternalPOR().
| #define PMC_GLOBAL_PMC_ERR2_STATUS_CFI_SHIFT (16U) |
CFI Non-Correctable Error shift.
Referenced by XLoader_CframeErrorHandler().
| #define XLOADER_AES_RESET_REG (0xF11E0010U) |
AES Reset register address.
| #define XLOADER_AES_RESET_VAL (0x1U) |
AES Reset value.
| #define XLOADER_ATF_HANDOFF_PARAMS_LCVERSION (1U) |
ATF handoff parameters lowest compatible version.
| #define XLOADER_ATF_HANDOFF_PARAMS_LCVERSION (1U) |
ATF handoff parameters lowest compatible version.
| #define XLOADER_ATF_HANDOFF_PARAMS_VERSION (1U) |
ATF handoff parameters version.
| #define XLOADER_ATF_HANDOFF_PARAMS_VERSION (1U) |
ATF handoff parameters version.
| #define XLOADER_BBRAM_OBFUS_KEY (0x3A5C3C57U) |
BBRAM obfuscated key.
| #define XLOADER_BBRAM_OBFUS_KEY (0x3A5C3C57U) |
BBRAM obfuscated key.
| #define XLOADER_BH_OBFUS_KEY (0xA35C7CA5U) |
Boot header obfuscated key.
| #define XLOADER_BH_OBFUS_KEY (0xA35C7CA5U) |
Boot header obfuscated key.
| #define XLOADER_BOOT_COPY_OPTIMIZATION_ENABLED (0U) |
Indicates Boot Device Copy Optimization is Enabled.
| #define XLOADER_BOOTPDI_INFO_PARAMS_LCVERSION (2U) |
BootPDI info lowest compatible version.
| #define XLOADER_BOOTPDI_INFO_PARAMS_LCVERSION (2U) |
BootPDI info lowest compatible version.
| #define XLOADER_BOOTPDI_INFO_PARAMS_VERSION (2U) |
BootPDI info version.
| #define XLOADER_BOOTPDI_INFO_PARAMS_VERSION (2U) |
BootPDI info version.
| #define XLOADER_CFRAME_DATACLEAR_CHECK_CMD_ID (0xCU) |
Data clear check command Id.
Referenced by XLoader_CframeDataClearCheck().
| #define XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_INDEX (0U) |
Index in the Payload of ConfigureJtagState command where JTAG state flag is present.
| #define XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_INDEX (0U) |
Index in the Payload of ConfigureJtagState command where JTAG state flag is present.
Referenced by XLoader_ConfigureJtagState().
| #define XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_MASK (0x03U) |
Mask for JTAG state flag.
| #define XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_MASK (0x03U) |
Mask for JTAG state flag.
Referenced by XLoader_ConfigureJtagState().
| #define XLOADER_CMD_GET_DDR_DEVICE_ID (0U) |
DDR device id.
| #define XLOADER_CMD_GET_DDR_DEVICE_ID (0U) |
DDR device id.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_CONFIG_JTAG_STATE_FLAG_DISABLE (0x00U) |
Value of JTAG state flag if disabled.
| #define XLOADER_CONFIG_JTAG_STATE_FLAG_DISABLE (0x00U) |
Value of JTAG state flag if disabled.
Referenced by XLoader_ConfigureJtagState().
| #define XLOADER_CONFIG_JTAG_STATE_FLAG_ENABLE (0x03U) |
Value of JTAG state flag if enabled.
| #define XLOADER_CONFIG_JTAG_STATE_FLAG_ENABLE (0x03U) |
Value of JTAG state flag if enabled.
Referenced by XLoader_ConfigureJtagState().
| #define XLOADER_DDR_CRYPTO_MAIN_OFFSET (0X40000U) |
DDR crypto block offset from ub.
| #define XLOADER_DDR_CRYPTO_MAIN_OFFSET (0X40000U) |
DDR crypto block offset from ub.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_DDR_PERF_MON_CNT0_OFFSET (0X868U) |
Counter 0 offset.
| #define XLOADER_DDR_PERF_MON_CNT0_OFFSET (0X868U) |
Counter 0 offset.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_DDR_PERF_MON_CNT1_OFFSET (0X86CU) |
Counter 1 offset.
| #define XLOADER_DDR_PERF_MON_CNT1_OFFSET (0X86CU) |
Counter 1 offset.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_DDR_PERF_MON_CNT2_OFFSET (0X870U) |
Counter 2 offset.
| #define XLOADER_DDR_PERF_MON_CNT2_OFFSET (0X870U) |
Counter 2 offset.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_DDR_PERF_MON_CNT3_OFFSET (0X874U) |
Counter 3 offset.
| #define XLOADER_DDR_PERF_MON_CNT3_OFFSET (0X874U) |
Counter 3 offset.
Referenced by XLoader_ReadDdrCryptoPerfCounters().
| #define XLOADER_ECDSA_RSA_RESET_REG (0xF1200040U) |
ECDSA RSA Reset register address.
| #define XLOADER_ECDSA_RSA_RESET_VAL (0x1U) |
ECDSA RSA Reset value.
| #define XLOADER_EFUSE_OBFUS_KEY (0xA5C3C5A7U) |
eFuse obfuscated key
| #define XLOADER_EFUSE_OBFUS_KEY (0xA5C3C5A7U) |
eFuse obfuscated key
| #define XLOADER_EFUSE_ROM_RSVD_AUTH_KEYS_TO_HASH_MASK (0x00000200U) |
AUTH_KEYS_TO_HASH eFuse bit mask.
| #define XLOADER_EFUSE_ROM_RSVD_AUTH_KEYS_TO_HASH_SHIFT (9U) |
AUTH_KEYS_TO_HASH eFuse bit shift.
| #define XLOADER_EFUSE_ROM_RSVD_CACHE_ADDRESS (0xF1250090U) |
ROM Reserved eFuse cache offset.
| #define XLOADER_GET_PRTN_HASH_INDEX | ( | PdiPtr | ) |
Get partition hash index depending on full/partial PDI.
Referenced by XLoader_DataMeasurement().
| #define XLOADER_IMAGE_INFO_LCVERSION (1U) |
Image lowest compatible version information.
| #define XLOADER_IMAGE_INFO_LCVERSION (1U) |
Image lowest compatible version information.
| #define XLOADER_IMAGE_INFO_TBL_MAX_NUM |
Maximum number of image info tables in the available buffer.
Referenced by XLoader_GetImageInfoEntry().
| #define XLOADER_IMAGE_INFO_VERSION (1U) |
Image version information.
| #define XLOADER_IMAGE_INFO_VERSION (1U) |
Image version information.
| #define XLOADER_INVALID_OBFUS_KEY (0xFFFFFFFFU) |
Invalid obfuscated key.
| #define XLOADER_LOG_LEVEL_MASK (0xF0U) |
Flag indicates Log level mask.
| #define XLOADER_PCR_MEASUREMENT_INDEX_MASK (0xFFFF0000U) |
Mask for PCR Measurement index.
Referenced by XLoader_MeasureNLoad().
| #define XLOADER_PCR_MEASUREMENT_INDEX_MASK (0xFFFF0000U) |
Mask for PCR Measurement index.
| #define XLOADER_PDI_LIST_LCVERSION (1U) |
PDI lowest compatible version list.
| #define XLOADER_PDI_LIST_LCVERSION (1U) |
PDI lowest compatible version list.
| #define XLOADER_PDI_LIST_VERSION (1U) |
PDI version list.
| #define XLOADER_PDI_LIST_VERSION (1U) |
PDI version list.
| #define XLOADER_PUF_SHUT_GLB_VAR_FLTR_EN_SHIFT (31U) |
Shift for Global Variation Filter in PUF shutter value.
| #define XLOADER_RPU_GLBL_CNTL (0xFF9A0000U) |
RPU global control.
Referenced by XLoader_ProcessElf().
| #define XLOADER_RSA_EM_MSB_INDEX (0x0U) |
RSA EM MSB Index.
| #define XLOADER_RSA_PSS_MSB_PADDING_MASK (u8)(0x80U) |
RSA PSS MSB padding mask.
| #define XLOADER_SBI_CTRL_INTERFACE_AXI_SLAVE (0x8U) |
SBI PCIE PDI load.
| #define XLOADER_SBI_DELAY_IN_MICROSEC (5000U) |
Flag indicates SBI delay in micro second.
| #define XLOADER_SHA3_RESET_REG (0xF1210004U) |
SHA3 Reset register address.
Referenced by XLoader_SecureClear().
| #define XLOADER_SHA3_RESET_VAL (0x1U) |
SHA3 Reset value.
Referenced by XLoader_SecureClear().
| #define XLOADER_SUCCESS_NOT_PRTN_OWNER (0x100U) |
Indicates that PLM is not the partition owner.
Referenced by XLoader_LoadImagePrtns().
| #define XLOADER_TCM_0 (0U) |
TCM 0.
Referenced by XLoader_ProcessElf().
| #define XLOADER_TCM_1 (1U) |
TCM 1.
Referenced by XLoader_ProcessElf().
| #define XLOADER_TCMCOMB_MASK (0x40U) |
TCM combine mask.
Referenced by XLoader_ProcessElf().
| #define XLOADER_TCMCOMB_SHIFT (6U) |
TCM combine shift.
Referenced by XLoader_ProcessElf().
| #define XPLMI_ZERO (0x0U) |
Zero.
Referenced by XLoader_CframeDataClearCheck().
| int XLoader_AddAuthJtagToScheduler | ( | void | ) |
This function adds periodic checks of the status of Auth JTAG interrupt status to the scheduler.
Referenced by XLoader_Init().
| int XLoader_AddDeviceStateChangeToScheduler | ( | void | ) |
This function adds periodic checks of the device status change during secure boot.
References XLoader_CheckDeviceStateChange(), XLOADER_DEVICE_STATE_POLL_INTERVAL, XLOADER_EFUSE_CACHE_JTAG_DIS_MASK, XLOADER_EFUSE_CACHE_SECURITY_CONTROL_OFFSET, XLoader_GetAHWRoT(), and XLoader_GetSHWRoT().
Referenced by XLoader_Init().
| int XLoader_AdditionalPpkSelect | ( | XLoader_PpkSel | PpkSelect, |
| u32 * | InvalidMask, | ||
| u32 * | PpkOffset | ||
| ) |
This function checks for the additional PPK select and returns the PPK invalid mask and PPK efuse cache start offset if PPK is valid.
| PpkSelect | PPK selection of eFUSE. |
| InvalidMask | Pointer to the PPK invalid mask |
| PpkOffset | Pointer to the efuse cache PPK start offset |
| PpkSelect | PPK selection of eFUSE. |
| InvalidMask | Pointer to the PPK invalid mask |
| PpkOffset | Pointer to the efuse cache PPK start offset |
| PpkSelect | PPK selection of eFUSE. |
| InvalidMask | Pointer to the PPK invalid mask |
| PpkOffset | Pointer to the efuse cache PPK start offset |
| int XLoader_AesObfusKeySelect | ( | u32 | PdiKeySrc, |
| u32 | DecKeyMask, | ||
| void * | KeySrcPtr | ||
| ) |
This function provides Obfuscated Aes Key source.
| PdiKeySrc | is the Key source given in Pdi |
| DecKeyMask | is the current DecKeyMask |
| KeySrcPtr | is the pointer to the calculated KeySrc |
| PdiKeySrc | is the Key source given in Pdi |
| DecKeyMask | is the current DecKeyMask |
| KeySrcPtr | is the pointer to the calculated KeySrc |
References XLOADER_SEC_AES_KEK_DEC.
| int XLoader_AuthEncClear | ( | void | ) |
This function is called to clear secure critical data related to authentication and encryption in case of exceptions.
The function also places AES, ECDSA_RSA in reset.
Referenced by XLoader_SecureClear().
| int XLoader_CfiSelectiveRead | ( | XPlmi_Cmd * | Cmd | ) |
This function provides CFI SELECTIVE READ command execution.
Command payload parameters are
- Row, block type and Start frame address
- Frame count to be read from CFU(1frame = 25Quadwords)
- High Dest Addr
- Low Dest Addr
| Cmd | is pointer to the command structure |
References XLOADER_CFI_SEL_READBACK_ID, XLoader_CframeInit(), XLOADER_ERR_INVALID_BLOCK_TYPE, XLOADER_ERR_INVALID_ROW, XLOADER_FRAME_COUNT_EXCEEDS_LASTFRAME, XLOADER_INVALID_FRAME_ADDRESS, and XLOADER_SELREADBACK_ROW_MASK.
| int XLoader_CframeDataClearCheck | ( | XPlmi_Cmd * | Cmd | ) |
This function is used to check if the Cframe data is cleared or not using CRC method.
This function need to be called after CFI house cleaning is done.
| Cmd | is pointer to the command. Command payload parameters are: Block Type |
References CFRAME_BCAST_REG_FAR_BLOCKTYPE_SHIFT, CFRAME_BCAST_REG_FAR_OFFSET, CFRAME_BCAST_REG_TESTMODE_CRAM_SELF_CHECK_MASK, CFRAME_BCAST_REG_TESTMODE_OFFSET, CFRAME_CRC_POLL_TIMEOUT, CFRAME_MAX_BLOCK_TYPE_COUNT, XLOADER_CFI_CFRAME_IS_BUSY, XLOADER_CFRAME_CRC_CHECK_FAILED, XLOADER_CFRAME_DATACLEAR_CHECK_CMD_ID, XLoader_CframeInit(), XLOADER_INVALID_BLOCKTYPE, and XPLMI_ZERO.
| void XLoader_CframeErrorHandler | ( | u32 | ImageId | ) |
This function is used to check the CFU ISR and PMC_ERR1 and PMC_ERR2 status registers to check for any errors in PL and call corresponding error recovery functions if needed.
| ImageId | is Id of the image present in PDI |
CFU Driver Instance
References PMC_GLOBAL_PMC_ERR2_STATUS_CFI_SHIFT.
| int XLoader_CframeInit | ( | void | ) |
This function initializes the Cframe driver.
Referenced by XLoader_CfiSelectiveRead(), XLoader_CframeDataClearCheck(), and XLoader_Init().
| int XLoader_CheckAndUpdateSecureState | ( | void | ) |
This function checks and updates the secure state configuration.
References XLOADER_SEC_STATE_CONFIG_MEASUREMENT_ERROR.
Referenced by XLoader_CheckDeviceStateChange().
| int XLoader_CheckAuthJtagIntStatus | ( | void * | Arg | ) |
This function checks the status of Auth JTAG interrupt status and it disables the Jtag as per the timeout set by user.
| Arg | Not used in the function currently |
References XLOADER_AUTH_JTAG_LOCK_DIS_MASK, XLOADER_AUTH_JTAG_MAX_ATTEMPTS, XLOADER_EFUSE_CACHE_SECURITY_CONTROL_OFFSET, XLOADER_PMC_TAP_AUTH_JTAG_INT_STATUS_MASK, and XLOADER_PMC_TAP_AUTH_JTAG_INT_STATUS_OFFSET.
Referenced by XLoader_UpdateHandler().
| int XLoader_CheckDeviceStateChange | ( | void * | Arg | ) |
This function checks the JTAG device state change.
When Secure gate is opened from close state this API raises an error,
if the gate is closed and re-opened again this function recognizes the
state change and performs the action configured.
| Arg | is of pointer of void type. |
References XLoader_CheckAndUpdateSecureState(), XLOADER_JTAG_SEC_GATE_CLOSE, XLOADER_JTAG_SEC_GATE_OPEN, XLOADER_PMC_TAP_JTAG_STATUS_0, and XLOADER_PMC_TAP_JTAG_STATUS_DAP_STATUS_MASK.
Referenced by XLoader_AddDeviceStateChangeToScheduler(), and XLoader_UpdateHandler().
| int XLoader_CheckNonZeroPpk | ( | void | ) |
This function checks if PPK is programmed.
References XLOADER_EFUSE_PPK0_START_OFFSET, and XLOADER_EFUSE_PPK2_END_OFFSET.
Referenced by XLoader_CheckSecureStateAuth().
| int XLoader_CheckSecureState | ( | u32 | RegVal, |
| u32 | Var, | ||
| u32 | ExpectedValue | ||
| ) |
This function checks if the secure state of boot matches the expected value or not.
| RegVal | - Value of secure state stored in register |
| Var | - Value of secure state stored in variable |
| ExpectedValue | - Expected value of secure state |
Referenced by XLoader_DataAuth(), XLoader_SecureEncInit(), and XLoader_UpdateCfgLimitCount().
| int XLoader_CheckSecureStateAuth | ( | volatile u32 * | AHWRoT | ) |
This function checks Secure State for Authentication.
| AHWRoT | - Buffer to store Secure state for authentication |
| AHWRoT | - Buffer to store Secure state for authentication |
If PPK hash is programmed in eFUSEs, then Secure State of boot is A-HWRoT
If PPK hash is not programmed in eFUSEs and PLM is authenticated then Secure State of boot is emulated A-HWRoT
If PPK hash is programmed in eFUSEs, then Secure State of boot is A-HWRoT
If PPK hash is not programmed in eFUSEs and PLM is authenticated then Secure State of boot is emulated A-HWRoT
References XLoader_CheckNonZeroPpk().
Referenced by XLoader_SetSecureState().
| int XLoader_ClearAesKey | ( | u32 * | DecKeySrc | ) |
This function clears the AES keys when RedKeyClear is set in PMC RAM.
| DecKeySrc | is pointer to the Decrypt Key source |
References XLOADER_SEC_KEY_CLEAR_FAILED_ERROR.
| int XLoader_ClearATFHandoffParams | ( | XilPdi * | PdiPtr | ) |
This function clears ATF Handoff parameters in case of multi-partitions in APU subsystem.
| PdiPtr | Pointer to XilPdi instance |
Referenced by XLoader_ProcessElf().
| void XLoader_ClearKatOnPPDI | ( | XilPdi * | PdiPtr, |
| u32 | PlmKatMask | ||
| ) |
This function updates the KAT status.
| PdiPtr | is pointer to the XilPdi instance |
| PlmKatMask | is the mask of the KAT that is going to run |
| int XLoader_ConfigureJtagState | ( | XPlmi_Cmd * | Cmd | ) |
This function enables or disable Jtag Access Command payload parameters are.
- Flag (enable / disable)
| Cmd | is pointer to the command structure |
Invalid JTAG Operation request
Invalid JTAG Operation request
References XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_INDEX, XLOADER_CMD_CONFIG_JTAG_STATE_FLAG_MASK, XLOADER_CONFIG_DAP_STATE_NONSECURE_DBG, XLOADER_CONFIG_JTAG_STATE_FLAG_DISABLE, XLOADER_CONFIG_JTAG_STATE_FLAG_ENABLE, XLoader_DisableJtag(), XLoader_EnableJtag(), and XLOADER_ERR_INVALID_JTAG_OPERATION.
| int XLoader_DataAuth | ( | XLoader_SecureParams * | SecurePtr, |
| u8 * | Hash, | ||
| u8 * | Signature | ||
| ) |
This function authenticates the data with SPK.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| Hash | is a Pointer to the expected hash buffer. |
| Signature | pointer points to the signature buffer. |
References XLoader_CheckSecureState(), XLoader_GetAHWRoT(), XLOADER_NOLOAD_VAL, XLOADER_PPK_SIZE, and XLOADER_SEC_GLITCH_DETECTED_ERROR.
| int XLoader_DataMeasurement | ( | XLoader_ImageMeasureInfo * | ImageInfo | ) |
This function measures the data by calculating SHA3 hash.
| ImageInfo | Pointer to the XLoader_ImageMeasureInfo structure |
| ImageInfo | Pointer to the XLoader_ImageMeasureInfo structure. |
References XLOADER_GET_PRTN_HASH_INDEX, XLOADER_MEASURE_FINISH, XLOADER_MEASURE_START, XLOADER_MEASURE_UPDATE, XLOADER_PCR_NUMBER_MASK, and XLOADER_SHA3_LEN.
Referenced by XLoader_HdrMeasurement(), XLoader_MeasureNLoad(), and XLoader_PrtnCopy().
| int XLoader_DdrCopy | ( | u64 | SrcAddr, |
| u64 | DestAddr, | ||
| u32 | Length, | ||
| u32 | FlagsVal | ||
| ) |
This function is used to copy the data from DDR to destination address.
| SrcAddr | of DDR |
| DestAddr | is the address of the destination where the data needs to be copied. |
| Length | of the bytes to be copied |
| FlagsVal | that denote blocking / non-blocking dma |
| int XLoader_DdrInit | ( | u32 | DeviceFlags | ) |
This function is used to initialize for DDR init.
| DeviceFlags | Loader init prototype requires flags |
Referenced by XLoader_DumpDdrmcRegisters().
| int XLoader_DdrRelease | ( | void | ) |
This function releases control of DDR.
References XLOADER_PDI_SRC_DDR.
| int XLoader_DisableJtag | ( | void | ) |
This function disables the Jtag.
Reset DBG module
Enable security gate
Disable all the instructions
Disable secure/non-secure debug Disabled invasive & non-invasive debug
Referenced by XLoader_ConfigureJtagState().
| int XLoader_EnableJtag | ( | volatile u32 | CfgState | ) |
This function enables the Jtag.
Enable secure/non-secure debug Enabled invasive & non-invasive debug
Enable only non-secure debug
Enable all the instructions
Disable security gate
Take DBG module out of reset
References XLOADER_DAP_CFG_ENABLE_ALL_DBG_MASK.
Referenced by XLoader_ConfigureJtagState().
| u32 XLoader_GetAHWRoT | ( | const u32 * | AHWRoTPtr | ) |
This function returns the state of authenticated boot.
| AHWRoTPtr | - Always NULL except at time of initialization of SecureStateAHWRoT variable |
Referenced by XLoader_AddDeviceStateChangeToScheduler(), XLoader_DataAuth(), XLoader_SecureEncInit(), XLoader_SetSecureState(), and XLoader_UpdateCfgLimitCount().
| XilPdi_ATFHandoffParams * XLoader_GetATFHandoffParamsAddr | ( | void | ) |
This function returns the ATFHandoffParams structure address to the caller.
< Instance containing ATF handoff params
Referenced by XLoader_PdiInit(), and XLoader_SetATFHandoffParameters().
| XilBootPdiInfo * XLoader_GetBootPdiInfo | ( | void | ) |
This function provides pointer to BootPDI Info.
< BootPDI info Storage
< BootPDI info Storage
< BootPDI info Storage
Referenced by XLoader_RestartImage(), and Xloader_SaveBootPdiInfo().
| int XLoader_GetImageAndPrtnInfo | ( | XilPdi * | PdiPtr, |
| u32 | ImageId | ||
| ) |
This function provides Image number and partition number of a given ImgId in the PDI instance.
| PdiPtr | Pdi instance pointer |
| ImageId | Image id of a subsystem |
Check if the given ImageId matches with any Images present in PDI.
If not matched return error, else success.
Referenced by XLoader_LoadLpdAndPsmElf().
| XLoader_ImageInfo* XLoader_GetImageInfoEntry | ( | u32 | ImgID | ) |
This function returns the ImageInfoEntry by checking if an entry exists for that particular ImgId in the ImgInfoTbl.
| ImgID | of the the entry that has to be stored |
Check for a existing valid image entry matching given ImgID
References XLoader_GetImageInfoTbl(), XLOADER_IMAGE_INFO_TBL_MAX_NUM, and XLOADER_INVALID_IMG_ID.
| XLoader_ImageInfoTbl * XLoader_GetImageInfoTbl | ( | void | ) |
This function provides ImageInfoTbl pointer.
Referenced by XLoader_GetImageInfoEntry(), and XLoader_LoadImageInfoTbl().
| u32 XLoader_GetKekSrc | ( | void | ) |
This function updates KEK red key availability status from boot header.
References XLOADER_BBRAM_BLK_KEY, XLOADER_BBRAM_RED_KEY, XLOADER_BH_BLK_KEY, XLOADER_BHDR_RED_KEY, XLOADER_EFUSE_BLK_KEY, and XLOADER_EFUSE_RED_KEY.
| XilPdi* XLoader_GetPdiInstance | ( | void | ) |
This function provides PdiInstance pointer.
Referenced by XLoader_Init(), XLoader_LoadLpdAndPsmElf(), XLoader_PdiInit(), and XLoader_RestartImage().
| XLoader_ImageStore * XLoader_GetPdiList | ( | void | ) |
This function provides pointer to PdiList.
Referenced by XLoader_IsPdiAddrLookup(), XLoader_ReadImageStoreCfg(), and XLoader_RestartImage().
| 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.
| SecBootMode | is the secondary boot mode value |
| PdiPtr | Pointer to PDI instance |
| PdiSrc | Pointer to the source of PDI |
| PdiAddr | is the pointer to the address of the Pdi |
| SecBootMode | is the secondary boot mode value |
| PdiPtr | Pointer to the PDI instance |
| PdiSrc | is pointer to the source of PDI |
| PdiAddr | is the pointer to the address of the Pdi |
References XLOADER_SD_RAWBOOT_MASK.
| u32 XLoader_GetSHWRoT | ( | const u32 * | SHWRoTPtr | ) |
This function returns the state of encrypted boot.
| SHWRoTPtr | - Always NULL except at time of initialization of SecureStateSHWRoT variable |
Referenced by XLoader_AddDeviceStateChangeToScheduler(), XLoader_SecureEncInit(), XLoader_SetSecureState(), and XLoader_UpdateCfgLimitCount().
| XLoader_SecureTempParams* XLoader_GetTempParams | ( | void | ) |
This function returns the pointer to XLoader_SecureTempParams.
Referenced by XLoader_ProcessAuthEncPrtn(), XLoader_PrtnCopy(), XLoader_ReadAndVerifySecureHdrs(), XLoader_SecureAuthInit(), XLoader_SecureEncInit(), and XLoader_SecureInit().
| int XLoader_HdrMeasurement | ( | XilPdi * | PdiPtr | ) |
This function measures the PDI's meta header data by calculating the hash using SHA3.
| PdiPtr | is the pointer to PDI instance |
References XLoader_DataMeasurement(), XLOADER_MEASURE_FINISH, XLOADER_MEASURE_START, and XLOADER_MEASURE_UPDATE.
| int XLoader_IdCodeCheck | ( | const XilPdi_ImgHdrTbl * | ImgHdrTbl | ) |
This function performs the checks of IDCODE and EXTENDED IDCODE.
It also supports bypass of subset of these checks.
| ImgHdrTbl | pointer to the image header table. |
< IdCode as read from IHT
< Extended IdCode as read from IHT
< IdCode as read from Device
< Extended IdCode as read from Device
< Flag to bypass checks
< Flag to indicate IsVC1902-ES1 device
< Flag to indicate Extended IdCode is valid
References XLOADER_ERR_EXT_ID_SI, XLOADER_ERR_EXT_IDCODE, and XLOADER_ERR_IDCODE.
| int XLoader_ImgHdrTblAuth | ( | XLoader_SecureParams * | SecurePtr | ) |
This function authenticates the image header table.
| SecurePtr | is pointer to the XLoader_SecureParams instance |
| int XLoader_Init | ( | void | ) |
This function initializes the loader instance and registers loader commands with PLM.
References XLoader_AddAuthJtagToScheduler(), XLoader_AddDeviceStateChangeToScheduler(), XLOADER_BBRAM_CL_DECREMENT_COUNT, XLoader_CframeInit(), XLoader_GetPdiInstance(), XLoader_IntrInit(), XLoader_PlatInit(), XLoader_SetSecureState(), and XLoader_UpdateCfgLimitCount().
| 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.
| Cmd | Pointer to the command structure |
| PdiPtr | Pointer to PdiInstance |
| SrcAddr | Address of the PDI |
| DestAddr | Address of the destination buffer |
| DestSize | Size of the destination buffer |
Clear the Metaheader instance area
Check if Metaheader offset is pointing to a valid location
Extract Metaheader using PdiInit
References XLOADER_ERR_INVALID_METAHEADER_DEST_ADDR, XLOADER_ERR_INVALID_METAHEADER_OFFSET, XLOADER_ERR_INVALID_METAHEADER_SRC_ADDR, XLOADER_ERR_INVALID_PDI_INPUT, XLOADER_GET_OPT_DATA_FLAG, XLOADER_PDI_SRC_DDR, and XLoader_PdiInit().
| int XLoader_IntrInit | ( | void | ) |
This function initializes the loader instance and registers loader commands with PLM.
Referenced by XLoader_Init().
| int XLoader_IsAdditionalPpkValid | ( | const u8 * | PpkHash | ) |
This function verifies whether the additional PPK is valid.
| PpkHash | is pointer to the PPK hash. |
| PpkHash | is pointer to the PPK hash. |
| PpkHash | is pointer to the PPK hash. |
References XLoader_IsPpkValid().
| int XLoader_IsPdiAddrLookup | ( | u32 | PdiId, |
| u64 * | PdiAddr | ||
| ) |
This function is used to read the Address based-on PDI Id from Image Store.
| PdiId | Index of the PDI stored |
| PdiAddr | Pointer to the PDI address |
References XLOADER_ERR_PDI_ADDR_NOT_FOUND, XLOADER_ERR_PDI_LIST_EMPTY, and XLoader_GetPdiList().
| int XLoader_IsPpkValid | ( | XLoader_PpkSel | PpkSelect, |
| const u8 * | PpkHash | ||
| ) |
The function reads PPK invalid bits.
If the bits are valid, it compares the provided hash value with the programed hash value. Efuse stores only 256 bits of hash.
| PpkSelect | PPK selection of eFUSE. |
| PpkHash | Pointer to the PPK hash to be verified. |
Referenced by XLoader_IsAdditionalPpkValid().
| int XLoader_LoadImage | ( | XilPdi * | PdiPtr | ) |
This function is used load a image in PDI.
PDI can have multiple images present in it. This can be used to load a single image like PL, APU, RPU. This will load all the partitions that are present in that image.
| PdiPtr | is Pdi instance pointer |
References XLOADER_INVALID_IMG_ID, XLoader_MeasureNLoad(), XLOADER_PDI_SRC_JTAG, XLOADER_PDI_TYPE_FULL, and XLoader_SetJtagTapToReset().
| int XLoader_LoadImageInfoTbl | ( | u64 | DestAddr, |
| u32 | MaxSize, | ||
| u32 * | NumEntries | ||
| ) |
This function loads the ImageInfo table to the given memory address.
| DestAddr | is the 64 bit Destination Address |
| MaxSize | is the max size of Buffer present at Destination Address |
| NumEntries | that are loaded from the Image Info Table |
Validate the available length of ImageInfoTable is in the range of Maximum buffer size available
Copy the ImageInfoTable for the given length of table
References XLOADER_ERR_IMAGE_INFO_TBL_FULL, XLOADER_ERR_INVALID_DEST_IMGINFOTBL_SIZE, and XLoader_GetImageInfoTbl().
| int XLoader_LoadImagePrtns | ( | XilPdi * | PdiPtr | ) |
This function loads the partition.
| PdiPtr | is pointer to XilPdi instance |
References XLOADER_SUCCESS_NOT_PRTN_OWNER.
Referenced by XLoader_MeasureNLoad().
| int XLoader_LoadLpdAndPsmElf | ( | void | ) |
This function will load the LPD and PSM ELF file from DDR.
Memset the PDI instance.
Initialize the PDI to load the LPD subsystem from DDR.
Check if LPD is present in InPlacePLM PDI and get the Image number and Partition number. If LPD is not found, return error.
Load the LPD image.
We need to reset NoOfHandOffCpus here because we don't call StartImage routine
References XLOADER_ERR_MEMSET_PDIPTR, XLoader_GetImageAndPrtnInfo(), XLoader_GetPdiInstance(), XLoader_LoadImage(), XLOADER_PDI_SRC_DDR, and XLoader_PdiInit().
| int XLoader_LoadPdi | ( | XilPdi * | PdiPtr, |
| PdiSrc_t | PdiSrc, | ||
| u64 | PdiAddr | ||
| ) |
This function provides loading PDI.
| PdiPtr | is the instance pointer that points to PDI details |
| PdiSrc | is source of PDI. It can be in Boot Device or DDR. |
| PdiAddr | is the address at PDI is located in the PDI source |
References XLoader_PdiInit().
| int XLoader_MaskGenFunc | ( | XSecure_Sha3 * | Sha3InstancePtr, |
| u8 * | Out, | ||
| u32 | OutLen, | ||
| u8 * | Input | ||
| ) |
Mask generation function with SHA3.
| Sha3InstancePtr | is pointer to the XSecure_Sha3 instance. |
| Out | is pointer in which output of this function will be stored. |
| OutLen | specifies the required length. |
| Input | is pointer which holds the input data for which mask should be calculated which should be 48 bytes length. |
| Sha3InstancePtr | is pointer to the XSecure_Sha3 instance. |
| Out | is pointer in which output of this function will be stored. |
| OutLen | specifies the required length. |
| Input | is pointer which holds the input data for which mask should be calculated which should be 48 bytes length. |
References XLOADER_SHA3_LEN.
| int XLoader_MaskGenFunc | ( | XSecure_Sha * | ShaInstancePtr, |
| u8 * | Out, | ||
| u32 | OutLen, | ||
| u8 * | Input | ||
| ) |
Mask generation function with SHA3.
| ShaInstancePtr | is pointer to the XSecure_Sha3 instance. |
| Out | is pointer in which output of this function will be stored. |
| OutLen | specifies the required length. |
| Input | is pointer which holds the input data for which mask should be calculated which should be 48 bytes length. |
References XLOADER_SHA3_LEN.
| int XLoader_MeasureNLoad | ( | XilPdi * | PdiPtr | ) |
This function measures the partion hashes.
This function measures the partion hashes from the hash block.
| PdiPtr | is pointer to XilPdi instance |
References XLoader_DataMeasurement(), XLoader_LoadImagePrtns(), XLOADER_MEASURE_FINISH, XLOADER_MEASURE_START, XLOADER_MEASURE_UPDATE, XLOADER_PCR_MEASUREMENT_INDEX_MASK, XLOADER_PDI_TYPE_PARTIAL, and XLOADER_SHA3_LEN.
Referenced by XLoader_LoadImage().
| int XLoader_PdiInit | ( | XilPdi * | PdiPtr, |
| PdiSrc_t | PdiSource, | ||
| u64 | PdiAddr | ||
| ) |
This function initializes the PDI instance with required details and read the meta header.
| PdiPtr | is instance pointer pointing to PDI details |
| PdiSource | is source of PDI. It can be any boot Device or DDR |
| PdiAddr | is the address at which PDI is located in the PDI source |
Clear the Metaheader instance area
Clear the DDR Calib Check RTCA Register.
References PdiSrc_t, XLOADER_GET_PDISRC_INFO, XLoader_GetATFHandoffParamsAddr(), XLoader_GetPdiInstance(), XLOADER_PDI_SRC_USB, XLOADER_PDI_TYPE_FULL, XLOADER_PDI_TYPE_PARTIAL, XLOADER_PDISRC_FLAGS_MASK, XLOADER_SD_RAWBOOT_MASK, and XLOADER_SSIT_MONOLITIC.
Referenced by XLoader_InitPdiInstanceForExtractMHAndOptData(), XLoader_LoadLpdAndPsmElf(), XLoader_LoadPdi(), and XLoader_RestartImage().
| void XLoader_PerformInternalPOR | ( | void | ) |
This function check conditions and perform internal POR for VP1802 and VP1502 device if required.
References PdiSrc_t, PLM_VP1802_POR_SETTLE_TIME, XLOADER_PDI_SRC_JTAG, and XLOADER_PDI_SRC_SMAP.
| int XLoader_PlatInit | ( | void | ) |
This function initializes the loader with platform specific initializations.
Referenced by XLoader_Init().
| int XLoader_ProcessAuthEncPrtn | ( | XLoader_SecureParams * | SecurePtr, |
| u64 | DestAddr, | ||
| u32 | BlockSize, | ||
| u8 | Last | ||
| ) |
This function performs authentication and decryption of the partition.
| SecurePtr | is pointer to the XLoader_SecureParams instance |
| DestAddr | is the address to which data is copied |
| BlockSize | is size of the data block to be processed which doesn't include padding lengths and hash |
| Last | notifies if the block to be processed is last or not |
References XLoader_GetTempParams(), XLOADER_PDI_TYPE_PARTIAL, XLOADER_SECURE_HDR_TOTAL_SIZE, XLoader_SecureChunkCopy(), XLoader_SecureConfigMeasurement(), XLOADER_SHA3_LEN, and XLoader_VerifyHashNUpdateNext().
Referenced by XLoader_SecureAuthInit(), and XLoader_SecureEncInit().
| int XLoader_ProcessDeferredError | ( | void | ) |
This function checks if MJTAG workaround is required.
References XLoader_DumpDdrmcRegisters().
| int XLoader_ProcessElf | ( | XilPdi * | PdiPtr, |
| const XilPdi_PrtnHdr * | PrtnHdr, | ||
| XLoader_PrtnParams * | PrtnParams, | ||
| XLoader_SecureParams * | SecureParams | ||
| ) |
This function copies the elf partitions to specified destinations.
| PdiPtr | is pointer to XilPdi instance |
| PrtnHdr | is pointer to the partition header |
| PrtnParams | is pointer to the structure variable that contains parameters required to process the partition |
| SecureParams | is pointer to the instance containing security related params |
| PdiPtr | is pointer to XilPdi instance |
| PrtnHdr | is pointer to the partition header |
| PrtnParams | is pointer to the structure variable that contains parameters required to process the partition |
| SecureParams | is pointer to the instance containing security related params |
| PdiPtr | is pointer to XilPdi instance |
| PrtnHdr | is pointer to the partition header |
| PrtnParams | is pointer to the structure variable that contains parameters required to process the partition |
| SecureParams | is pointer to the instance containing security related params |
Check if TCM Boot Bit is set
Check if TCM Boot Bit is set
References XLoader_ClearATFHandoffParams(), XLoader_PrtnCopy(), XLOADER_RPU_GLBL_CNTL, XLoader_SetATFHandoffParameters(), XLOADER_TCM_0, XLOADER_TCM_1, XLOADER_TCMCOMB_MASK, XLOADER_TCMCOMB_SHIFT, and XLoader_UpdateHandoffParam().
| int XLoader_PrtnCopy | ( | const XilPdi * | PdiPtr, |
| const XLoader_DeviceCopy * | DeviceCopy, | ||
| void * | SecureParamsPtr | ||
| ) |
This function copies partition data to respective target memories.
| PdiPtr | is pointer to XilPdi instance |
| DeviceCopy | is pointer to the structure variable with parameters required for copying |
| SecureParamsPtr | is pointer to the instance containing security related params |
Verify the destination address range before writing
References XLoader_DataMeasurement(), XLoader_GetTempParams(), XLOADER_MEASURE_UPDATE, and XLoader_SecureCopy().
Referenced by XLoader_ProcessElf().
| int XLoader_ReadAndVerifySecureHdrs | ( | XLoader_SecureParams * | SecurePtr, |
| XilPdi_MetaHdr * | MetaHdr | ||
| ) |
This function authenticates and/or decrypts the image headers and partition headers and copies the contents to the corresponding structures.
| SecurePtr | Pointer to the XLoader_SecureParams instance. |
| MetaHdr | Pointer to the Meta header table. |
References XLOADER_AUTH_CERT_MIN_SIZE, XLOADER_CHUNK_SIZE, XLoader_GetTempParams(), and XLOADER_SECURE_CHUNK_SIZE.
| int XLoader_ReadDdrCryptoPerfCounters | ( | XPlmi_Cmd * | Cmd | ) |
This function reads DDR crypto performance counters of given DDR device id.
| Cmd | is pointer to the command structure |
Get DDRMC UB Base address
Read PCSR control status
Read DDR crypto counters
Get DDRMC UB Base address
Read PCSR control status
Read DDR crypto counters
References XLOADER_CMD_GET_DDR_DEVICE_ID, XLOADER_DDR_CRYPTO_MAIN_OFFSET, XLOADER_DDR_PERF_MON_CNT0_OFFSET, XLOADER_DDR_PERF_MON_CNT1_OFFSET, XLOADER_DDR_PERF_MON_CNT2_OFFSET, XLOADER_DDR_PERF_MON_CNT3_OFFSET, XLOADER_ERR_DDR_DEVICE_ID, and XLOADER_ERR_PCOMPLETE_NOT_DONE.
| int XLoader_ReadImageStoreCfg | ( | void | ) |
This function is used to read the Image Store DDR Memory Addr.
Verify the image store address range
References XLOADER_ERR_INVALID_IMAGE_STORE_ADDRESS, XLoader_GetPdiList(), XLOADER_IMG_STORE_INVALID_ADDR, and XLOADER_IMG_STORE_INVALID_SIZE.
| int XLoader_RestartImage | ( | u32 | ImageId, |
| u32 * | FuncID | ||
| ) |
This function is used to restart the image in PDI.
This function will take ImageId as an input and based on the subsystem info available, it will read the image partitions, loads them and hand-off to the required CPUs as part of the image load.
| ImageId | Id of the image present in PDI |
| FuncID | is verified with the FuncID present in PDI |
References XLoader_GetBootPdiInfo(), XLoader_GetPdiInstance(), XLoader_GetPdiList(), XLOADER_PDI_LOAD_COMPLETE, XLOADER_PDI_SRC_DDR, XLOADER_PDI_SRC_JTAG, XLOADER_PDI_SRC_SMAP, XLOADER_PDI_TYPE_FULL, XLOADER_PDI_TYPE_PARTIAL, XLoader_PdiInit(), and XLoader_StartImage().
| int XLoader_RsaKat | ( | void | ) |
This function runs the KAT for RSA.
| PmcDmaPtr | - Pointer to DMA instance |
| int XLoader_RsaPssSignVerify | ( | u8 * | MsgHash, |
| XSecure_Rsa * | RsaInstPtr, | ||
| u8 * | Signature, | ||
| u32 | KeySize | ||
| ) |
This function encrypts the RSA signature provided and performs required PSS operations to extract salt and calculates M prime hash and compares with hash obtained from EM.
| PmcDmaInstPtr | Pointer to DMA instance |
| MsgHash | of the data to be authenticated. |
| RsaInstPtr | is pointer to the XSecure_Rsa instance. |
| Signature | is pointer to RSA signature for data to be authenticated. |
| KeySize | is size of RSA key in bytes. |
| void Xloader_SaveBootPdiInfo | ( | XilPdi * | BootPdiPtr | ) |
This function is used to save the BootPDI info.
| BootPdiPtr | Pointer to the PDI instance |
References XLoader_GetBootPdiInfo().
| int XLoader_SecureAuthInit | ( | XLoader_SecureParams * | SecurePtr, |
| const XilPdi_PrtnHdr * | PrtnHdr | ||
| ) |
This function initializes authentication parameters of XLoader_SecureParams's instance.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| PrtnHdr | is pointer to XilPdi_PrtnHdr instance that has to be processed. |
References XLOADER_AUTH_CERT_MIN_SIZE, XLoader_GetTempParams(), and XLoader_ProcessAuthEncPrtn().
Referenced by XLoader_SecureInit().
| int XLoader_SecureChunkCopy | ( | XLoader_SecureParams * | SecurePtr, |
| u64 | SrcAddr, | ||
| u8 | Last, | ||
| u32 | BlockSize, | ||
| u32 | TotalSize | ||
| ) |
This function copies the data from SrcAddr to chunk memory during processing of secure partitions.
| SecurePtr | is pointer to the XLoader_SecureParams instance |
| SrcAddr | is the source address from which the data is to be processed or copied |
| Last | notifies if the block to be processed is last or not |
| BlockSize | is size of the data block to be processed which doesn't include padding lengths and hash. |
| TotalSize | is pointer to TotalSize which has to be processed |
Referenced by XLoader_ProcessAuthEncPrtn().
| int XLoader_SecureClear | ( | void | ) |
This function is called to clear secure critical data in case of exceptions.
The function also places AES, ECDSA_RSA and SHA3 in reset.
Place SHA3 in reset
References XLoader_AuthEncClear(), XLOADER_SHA3_RESET_REG, and XLOADER_SHA3_RESET_VAL.
| 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.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| PcrInfo | provides the PCR number and Measurement Index to be extended. |
| DigestIndex | is pointer to the DigestIndex across the PCR |
| OverWrite | TRUE or FALSE to overwrite the extended digest or not |
Referenced by XLoader_ProcessAuthEncPrtn().
| int XLoader_SecureCopy | ( | XLoader_SecureParams * | SecurePtr, |
| u64 | DestAddr, | ||
| u32 | Size | ||
| ) |
This function loads secure non-cdo partitions.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| DestAddr | is load address of the partition. |
| Size | is unencrypted size of the partition in bytes. |
References XLOADER_SECURE_CHUNK_SIZE.
Referenced by XLoader_PrtnCopy().
| int XLoader_SecureEncInit | ( | XLoader_SecureParams * | SecurePtr, |
| const XilPdi_PrtnHdr * | PrtnHdr | ||
| ) |
This function initializes encryption parameters of XLoader_SecureParams's instance.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| PrtnHdr | is pointer to XilPdi_PrtnHdr instance that has to be processed. |
References XLOADER_BBRAM_KEY, XLoader_CheckSecureState(), XLOADER_EFUSE_KEY, XLoader_GetAHWRoT(), XLoader_GetSHWRoT(), XLoader_GetTempParams(), XLOADER_PDI_TYPE_PARTIAL, XLoader_ProcessAuthEncPrtn(), and XLOADER_SHA3_LEN.
Referenced by XLoader_SecureInit().
| int XLoader_SecureInit | ( | XLoader_SecureParams * | SecurePtr, |
| XilPdi * | PdiPtr, | ||
| u32 | PrtnNum | ||
| ) |
This function initializes XLoader_SecureParams's instance.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| PdiPtr | is pointer to the XilPdi instance |
| PrtnNum | is the partition number to be processed |
References XLoader_GetTempParams(), XLoader_SecureAuthInit(), and XLoader_SecureEncInit().
| int XLoader_SecureValidations | ( | const XLoader_SecureParams * | SecurePtr | ) |
This function checks if authentication/encryption is compulsory.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| void XLoader_SetATFHandoffParameters | ( | const XilPdi_PrtnHdr * | PrtnHdr | ) |
This function sets the handoff parameters to the ARM Trusted Firmware(ATF).
Some of the inputs for this are taken from image partition header. A pointer to the structure containing these parameters is stored in the PMC_GLOBAL.GLOBAL_GEN_STORAGE4 register, which ATF reads.
| PrtnHdr | is pointer to Partition header details |
References XLoader_GetATFHandoffParamsAddr().
Referenced by XLoader_ProcessElf().
| void XLoader_SetJtagTapToReset | ( | void | ) |
This function is used to run MJTAG solution workaround in which JTAG Tap state will be set to reset.
Referenced by XLoader_LoadImage().
| int XLoader_SetSecureState | ( | void | ) |
This function reads the value of PPK efuse bits, DEC only efuse bits and fields in bootheader and accordingly sets the Secure State of boot.
References XLoader_CheckSecureStateAuth(), XLOADER_EFUSE_SEC_DEC_MASK, XLOADER_EFUSE_SEC_MISC0_OFFSET, XLoader_GetAHWRoT(), and XLoader_GetSHWRoT().
Referenced by XLoader_Init().
| u8 XLoader_SkipMJtagWorkAround | ( | XilPdi * | PdiPtr | ) |
This function checks if MJTAG workaround partition needs to be skipped.
| PdiPtr | is pointer to PDI instance |
Skip MJTAG WA2 partitions if boot mode is JTAG and Reset Reason is not external POR
References XLOADER_PDI_SRC_JTAG.
| int Xloader_SsitEoPdiSync | ( | XilPdi * | PdiPtr | ) |
This function will sync the PDI load status with master if End of PDI SYNC bit is enabled in IHT.
| PdiPtr | is pointer to PDI instance |
References XLOADER_SSIT_MONOLITIC.
| int XLoader_StartImage | ( | XilPdi * | PdiPtr | ) |
This function is used to start the subsystems in the PDI.
| PdiPtr | Pdi instance pointer |
| PdiPtr | Pdi instance pointer |
| PdiPtr | Pdi instance pointer |
References XLoader_Printf.
Referenced by XLoader_RestartImage().
| int XLoader_UpdateCfgLimitCount | ( | u32 | UpdateFlag | ) |
This function updates the configuration limiter count if Configuration limiter feature is enabled in case of secure boot.
In case of eny error, secure lockdown is triggered.
| UpdateFlag | - Indicates id the counter should be incremented or decremeted |
References XLOADER_BBRAM_8_ADDRESS, XLOADER_BBRAM_8_MEM_ADDRESS, XLOADER_BBRAM_CL_COUNTER_MASK, XLOADER_BBRAM_CL_DECREMENT_COUNT, XLOADER_BBRAM_CL_FEATURE_EN_MASK, XLOADER_BBRAM_CL_FEATURE_ENABLE, XLOADER_BBRAM_CL_INCREMENT_COUNT, XLoader_CheckSecureState(), XLOADER_CL_FEATURE_EN_SHIFT, XLoader_GetAHWRoT(), and XLoader_GetSHWRoT().
Referenced by XLoader_Init().
| int XLoader_UpdateHandler | ( | XPlmi_ModuleOp | Op | ) |
This function provides update handler for xilloader.
| Op | is the module operation variable |
Enable SBI Interrupt
Enable SBI Interrupt
References XLOADER_AUTH_JTAG_INT_STATUS_POLL_INTERVAL, XLoader_CheckAuthJtagIntStatus(), XLoader_CheckDeviceStateChange(), and XLOADER_DEVICE_STATE_POLL_INTERVAL.
| int XLoader_UpdateHandoffParam | ( | XilPdi * | PdiPtr | ) |
This function is used to update the handoff parameters.
| PdiPtr | is pointer to XilPdi instance |
| PdiPtr | is pointer to XilPdi instance |
References XLOADER_MAX_HANDOFF_CPUS.
Referenced by XLoader_ProcessElf().
| int XLoader_VerifyHashNUpdateNext | ( | XLoader_SecureParams * | SecurePtr, |
| u64 | DataAddr, | ||
| u32 | Size, | ||
| u8 | Last | ||
| ) |
This function calculates hash and compares with expected hash.
For every block, hash of next block is updated into expected hash.
| SecurePtr | is pointer to the XLoader_SecureParams instance. |
| DataAddr | is the address of the data present in the block |
| Size | is size of the data block to be processed |
| Last | notifies if the block to be processed is last or not. |
Set the data context of previous SHA operation
Update the next expected hash and data location
References XLOADER_SHA3_LEN.
Referenced by XLoader_ProcessAuthEncPrtn().
| volatile u8 XLoader_AuthJtagStatus::AuthFailCounter |
Counter for failed attempts to authenticate JTAG.
| volatile u8 XLoader_AuthJtagStatus::AuthFailCounterTmp |
For temporal redundancy.
| u32 XLoader_AuthJtagStatus::JtagTimeOut |
Timeout value set by user.
| u8 XLoader_AuthJtagStatus::JtagTimerEnabled |
Enable JTAG timer.