xilplmi
Vitis Drivers API Documentation
xplmi_tamper.h File Reference

Overview

This file contains APIs for tamper processing routines.

MODIFICATION HISTORY:
Ver   Who  Date        Changes
----- ---- ---------- -------------------------------------------------------
1.0   ma   07/08/2022 Initial release
      ma   07/19/2022 Change XPlmi_ProcessTamperResponse return type to void
      kpt  07/19/2022 Added temporal macro to trigger secure lockdown
                                         if haltboot efuses are programmed
      ma   07/25/2022 Enhancements to secure lockdown code
1.1   bm   01/03/2023 Create Secure Lockdown as a Critical Priority Task
      dd   03/28/2023 Updated doxygen comments
      pre  03/02/2025 Added XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK_FOR_INPRGRESS_STS macro
Note

Macros

#define XPLMI_TRIGGER_TAMPER_TASK   (0U)
 Trigger tamper as a Task. More...
 
#define XPLMI_TRIGGER_TAMPER_IMMEDIATE   (1U)
 Trigger tamper immediately. More...
 
#define XPLMI_SLD_NOT_TRIGGERED   (0U)
 Secure lockdown not triggered. More...
 
#define XPLMI_SLD_TRIGGERED   (1U)
 Secure lockdown triggered. More...
 
#define XPLMI_SLD_IN_PROGRESS   (2U)
 Secure lockdown is in progress. More...
 
#define XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK(MajorError, Status, StatusTmp, function,...)
 Updates the return value of the called function into Status and StatusTmp variables for redundancy. More...
 

Functions

int XPlmi_RegisterTamperIntrHandler (void)
 This function registers the handler for tamper interrupt. More...
 
void XPlmi_TriggerTamperResponse (u32 Response, u32 Flag)
 This functions Triggers Tamper Response processing immediately or as a task. More...
 
void XPlmi_TriggerSLDOnHaltBoot (u32 Flag)
 This function triggers secure lockdown if haltboot efuses are programmed. More...
 
u32 XPlmi_SldState (void)
 This function returns Secure Lockdown State. More...
 

Macro Definition Documentation

#define XPLMI_HALT_BOOT_SLD_TEMPORAL_CHECK (   MajorError,
  Status,
  StatusTmp,
  function,
  ... 
)
Value:
{ \
XSECURE_TEMPORAL_IMPL(Status, StatusTmp, function, __VA_ARGS__); \
if ((Status != XST_SUCCESS) || (StatusTmp != XST_SUCCESS)) { \
Status |= StatusTmp; \
Status = XPlmi_UpdateStatus((XPlmiStatus_t)MajorError, Status); \
XPlmi_UtilRMW(PMC_GLOBAL_PMC_FW_ERR, PMC_GLOBAL_PMC_FW_ERR_DATA_MASK, \
(u32)Status); \
} \
}
void XPlmi_UtilRMW(u32 RegAddr, u32 Mask, u32 Value)
This function will Read, Modify and Write to a register.
Definition: xplmi_util.c:99
#define XPLMI_TRIGGER_TAMPER_TASK
Trigger tamper as a Task.
Definition: xplmi_tamper.h:44
void XPlmi_TriggerSLDOnHaltBoot(u32 Flag)
This function triggers secure lockdown if haltboot efuses are programmed.
Definition: xplmi_tamper.c:345

Updates the return value of the called function into Status and StatusTmp variables for redundancy.

when called function returns a failure it triggers secure lockdown if haltboot efuses are programmed.

Parameters
MajorErrorcontains the major error code
Statusis the variable which holds the return value of function executed
StatusTmpis the variable which holds the value stored in Status
functionis the function to be executed
Otherparams are arguments to the called function
Returns
None
#define XPLMI_SLD_IN_PROGRESS   (2U)

Secure lockdown is in progress.

Referenced by XPlmi_ProcessCdo().

#define XPLMI_SLD_NOT_TRIGGERED   (0U)

Secure lockdown not triggered.

Referenced by XPlmi_TriggerTamperResponse().

#define XPLMI_SLD_TRIGGERED   (1U)

Secure lockdown triggered.

Referenced by XPlmi_TriggerTamperResponse().

#define XPLMI_TRIGGER_TAMPER_IMMEDIATE   (1U)

Trigger tamper immediately.

Referenced by XPlmi_ErrMgr().

#define XPLMI_TRIGGER_TAMPER_TASK   (0U)

Trigger tamper as a Task.

Referenced by XPlmi_TriggerTamperResponse().