xilplmi
Vitis Drivers API Documentation
xplmi_ipi.c File Reference

Overview

This is the file which contains ipi manager code.

MODIFICATION HISTORY:
Ver   Who  Date        Changes
----- ---- -------- -------------------------------------------------------
1.00  ma   10/09/2018 Initial release
1.01  kc   04/09/2019 Added code to register/enable/disable interrupts
      kc   05/21/2019 Updated IPI error code to response buffer
      ma   08/01/2019 Added LPD init code
      rv   02/04/2020 Set the 1st element of response array always to status
      bsv  02/13/2020 XilPlmi generic commands should not be supported
                      via IPI
      ma   02/21/2020 Added code to allow event logging command via IPI
      ma   02/28/2020 Added code to disallow EM commands over IPI
      bsv  03/09/2020 Added code to support CDO features command
      ma   03/19/2020 Added features command for EM module
      bsv  04/04/2020 Code clean up
1.02  bsv  06/02/2020 Added code to support GET BOARD command and disallow
                      SET BOARD command via IPI
      bm   10/14/2020 Code clean up
      td   10/19/2020 MISRA C Fixes
1.03  ma   02/12/2021 Return unique error codes in case of IPI read errors
      ma   03/04/2021 Code clean up
      ma   03/04/2021 Added access check for IPI commands
      ma   03/10/2021 Added code to disallow set image info Loader command
      bsv  03/24/2021 All IPIs to be acknowledged in XPlmi_IpiDispatchHandler
      bm   04/03/2021 Register IPI handler in IpiInit
      bsv  04/16/2021 Add provision to store Subsystem Id in XilPlmi
      bm   05/17/2021 Code cleanup
      bm   05/18/2021 Fix issue in IpiDispatchHandler
      har  05/18/2021 Updated Status to include library error code in case
                      of IPI access error
1.04  bsv  06/09/2021 Add warning in case IPI-0 interrupt is disabled
      bsv  06/17/2021 Update warning in case some IPIs are disabled
      bsv  08/02/2021 Reduce PLM code size
      ma   08/05/2021 Add separate task for each IPI channel
      ma   08/12/2021 Fix issue in task creation for IPI channels
      bsv  08/15/2021 Removed unwanted goto statements
      rv   08/19/2021 Do not ack force power down command
      rv   08/22/2021 Use XPLMI_PLM_GENERIC_CMD_ID_MASK macro instead of hard
                 coded value
      rv   08/25/2021 Check for module ID also along with API ID for xilpm
                 force power down command
      bsv  10/11/2021 Added redundancy for CheckIpiAccess API
1.05  ma   12/15/2021 Update function header for XPlmi_IpiDispatchHandler
      ma   01/17/2022 Enable SLVERR for IPI
      ma   02/04/2022 Print Command ID when IPI command execute fails
      bsv  03/05/2022 Fix exception while deleting two consecutive tasks of
                      same priority
1.06  skd  04/21/2022 Misra-C violation Rule 8.7 fixed
          rj   05/25/2022 Remove check for module ID and API ID for XilPM
                             force power down command
      skg  06/20/2022 Misra-C violation Rule 8.13 fixed
      bm   07/06/2022 Refactor versal and versal_net code
      bm   07/18/2022 Shutdown modules gracefully during update
      sk   08/08/2022 Set IPI task's to low priority
1.07  skg  10/04/2022 Added support to handle valid and invalid commands
      ng   11/11/2022 Updated doxygen comments
      bm   02/04/2023 Added support to return warnings
      bm   03/09/2023 Add NULL check for module before using it
      bm   03/09/2023 Added redundant calls for XPlmi_ValidateCmd and
                      CheckIpiAccess
      ng   03/30/2023 Updated algorithm and return values in doxygen comments
1.08  bm   06/23/2023 Added IPI access permissions validation
2.0   ng   11/11/2023 Implemented user modules
2.00  ng   12/27/2023 Reduced log level for less frequent prints
      ng   01/28/2024 optimized u8 variables
      bm   02/23/2024 Ack In-Place PLM Update request after complete restore
2.01  sk   05/07/2024 Added support to get ipi instance
      pre  07/11/2024 Throwing error if IPI request length is greater than XPLMI_MAX_IPI_CMD_LEN
      pre  07/30/2024 Fixed misrac violation
      am   08/22/2024 Fixed IPI acknowledgement prior to executing handlers
      pre  09/18/2024 Throwing error if SlrIndex is not valid
      pre  10/07/2024 Executing invalid command handler registered for SEM module
                      irrespective of SLR index field
      ma   09/23/2024 Added support for PSM to PLM IPI event handler
      jb   11/13/2024 Updated logic to ack IPI interrupts earlier instead of
                 ack after handling events
2.02  gam  01/07/2025 Created dummy IPI APIs in case of no IPI instance to
                      fix plm build issue with XilSEM.
      pre  03/02/2025 Added handling for XPLMI_CMD_IN_PROGRESS status
      pre  03/24/2024 Executing invalid command handler registered for STL module
                      irrespective of SLR index field
Note

Functions

int XPlmi_ValidateIpiCmd (XPlmi_Cmd *Cmd, u32 SrcIndex)
 This function checks whether the Cmd passed is supported via IPI mechanism or not. More...
 
int XPlmi_IpiPollForAck (u32 DestCpuMask, u32 TimeOutCount)
 This function polls for IPI acknowledgment from destination CPU. More...
 
int XPlmi_IpiWrite (u32 DestCpuMask, const u32 *MsgPtr, u32 MsgLen, u8 Type)
 This function writes an IPI message or a response to destination CPU. More...
 
int XPlmi_IpiTrigger (u32 DestCpuMask)
 This function triggers the IPI interrupt to destination CPU. More...
 
int XPlmi_IpiRead (u32 SrcCpuMask, u32 *MsgPtr, u32 MsgLen, u8 Type)
 This function reads an IPI message or response from source CPU. More...