PDK API Guide for J721E
Sciserver APIs

Introduction

Files

file  sciserver.h
 This file contains prototypes for APIs contained as a part of SCISERVER as well as the structures of their arguments.
 

Data Structures

struct  Sciserver_CfgPrms_t
 Sciserver Configuration Parameters. More...
 
struct  Sciserver_msgData
 Contains data about the message needed to idetify the sender and route the message response back to the proper location. More...
 
struct  Sciserver_taskState
 Contains data needed for Sciserver task operation. More...
 
struct  Sciserver_hwiData
 Contains data needed for Sciserver HWI operation. More...
 
struct  Sciserver_taskData
 Contains data needed for secure task operation. More...
 
struct  Sciserver_taskStateState
 States for Sciserver_taskState. More...
 

Functions

char * Sciserver_getVersionStr (void)
 Sciserver Get Version String Function. More...
 
char * Sciserver_getRmPmHalVersionStr (void)
 Sciserver Get RM_PM_HAL Version String Function. More...
 
int32_t Sciserver_init (Sciserver_CfgPrms_t *pPrms)
 Sciserver Initialization Function. More...
 
int32_t Sciserver_deinit (void)
 Sciserver De-Initialization Function. More...
 
void Sciserver_setCtrlState (uint8_t state)
 Sciserver Set the Control Command State. More...
 
uint8_t Sciserver_getCtrlState (void)
 Sciserver Get the Control Command State. More...
 
void Sciserver_setProcessState (uint8_t state)
 Sciserver Set the Process State. More...
 
uint8_t Sciserver_getProcessState (void)
 Sciserver Get the Process State. More...
 
int32_t Sciserver_interruptHandler (Sciserver_hwiData *uhd, bool *soft_error)
 Sciserver Interrupt Handler. More...
 
int32_t Sciserver_processtask (Sciserver_taskData *utd)
 Sciserver Process Task Function. More...
 
int32_t Sciserver_initPrms_Init (Sciserver_CfgPrms_t *pPrms)
 Initialize the init params for SCISERVER. More...
 
void Sciserver_socInit (void)
 Sciserver function to implement SoC specific configuration. More...
 

Enumerations

enum  Sciserver_taskStateState { SCISERVER_TASK_PENDING = 0, SCISERVER_TASK_PROCESSING_USER_MSG = 1, SCISERVER_TASK_PROCESSING_SECURE_MSG = 2 }
 

Macros

#define SCISERVER_CTRL_CMD_HALT   (0xA5)
 
#define SCISERVER_CTRL_CMD_RUN   (0x5A)
 
#define SCISERVER_PROCESS_STATE_WAIT   (0x5A)
 
#define SCISERVER_PROCESS_STATE_RUN   (0xA5U)
 
#define SCISERVER_FORWARD_MSG   (0x5AU)
 
#define SCISERVER_NO_FORWARD_MSG   (0xA5U)
 
#define SCISERVER_INIT_DONE   (0x69U)
 
#define SCISERVER_INIT_NOT_DONE   (0x96U)
 
#define SCISERVER_HW_QUEUE_SIZE   (52U)
 
#define SCISERVER_HWI_NUM   (5U)
 
#define SCISERVER_SECPROXY_INSTANCE_COUNT   (0x2U)
 

Semaphore Ids to be used for the user and DM tasks.

typedef uint32_t Sciserver_SemaphoreIds
 Semaphore Ids to be used for the user and DM tasks. More...
 
#define SCISERVER_SEMAPHORE_USER_HI   (uint32_t)0
 
#define SCISERVER_SEMAPHORE_USER_LO   (uint32_t)1
 
#define SCISERVER_SEMAPHORE_USER_DM   (uint32_t)2
 
#define SCISERVER_SEMAPHORE_MAX_CNT   (uint32_t)3
 

Task Ids to be used for the user and DM tasks.

typedef uint32_t Sciserver_TaskIds
 Task Ids to be used for the user and DM tasks. More...
 
#define SCISERVER_TASK_USER_HI   (uint32_t)0
 
#define SCISERVER_TASK_USER_LO   (uint32_t)1
 
#define SCISERVER_TASK_MAX_CNT   (uint32_t)2
 

Macro Definition Documentation

◆ SCISERVER_CTRL_CMD_HALT

#define SCISERVER_CTRL_CMD_HALT   (0xA5)

SCISERVER Control state for Halting the SCISERVER. This is used with the API Sciserver_setCtrlState to set the SCISERVER to halt and not process the incoming messages. This is done so that the SCICLIENT Direct and SCISERVER can both run on the same core. There could be a scenario where the MCU1_0 or DM is running its own SCICLIENT Direct calls and the SCISERVER is running the calls for other Cores. This can lead to race conditions where the SCISERVER call is mid way and an SCICLIENT Direct call is made. This flag based mechanism helps in making sure SCICLIENT direct calls are only made when the SCISERVER is done with its processing. Then the SCISERVER calls the API to halt the the SCISERVER and then processes its messages. This macro will put the SCISERVER to HALT state to not process any further messages.

◆ SCISERVER_CTRL_CMD_RUN

#define SCISERVER_CTRL_CMD_RUN   (0x5A)

SCISERVER Control state for Running the SCISERVER. This is used with the API Sciserver_setCtrlState to set the SCISERVER to run and process the incoming messages. This is done so that the SCICLIENT Direct and SCISERVER can both run on the same core. There could be a scenario where the MCU1_0 or DM is running its own SCICLIENT Direct calls and the SCISERVER is running the calls for other Cores. This can lead to race conditions where the SCISERVER call is mid way and an SCICLIENT Direct call is made. This flag based mechanism helps in making sure SCICLIENT direct calls are only made when the SCISERVER is done with its processing. Then the SCISERVER calls the API to halt the the SCISERVER and then processes its messages. This macro will put the SCISERVER to RUN state to process any further messages.

◆ SCISERVER_PROCESS_STATE_WAIT

#define SCISERVER_PROCESS_STATE_WAIT   (0x5A)

SCISERVER Process state for Waiting for new messages. This is used with the API Sciserver_getProcessState to know the status of the SCISERVER. This is done so that the SCICLIENT Direct and SCISERVER can both run on the same core. There could be a scenario where the MCU1_0 or DM is running its own SCICLIENT Direct calls and the SCISERVER is running the calls for other Cores. This can lead to race conditions where the SCISERVER call is mid way and an SCICLIENT Direct call is made. This flag based mechanism helps in making sure SCICLIENT direct calls are only made when the SCISERVER is done with its processing. Then the SCISERVER calls the API to halt the the SCISERVER and then processes its messages. This macro will indicate to SCICLIENT Direct if the SCISERVER is done processing messages.

◆ SCISERVER_PROCESS_STATE_RUN

#define SCISERVER_PROCESS_STATE_RUN   (0xA5U)

SCISERVER Process state for Waiting for new messages. This is used with the API Sciserver_getProcessState to know the status of the SCISERVER. This is done so that the SCICLIENT Direct and SCISERVER can both run on the same core. There could be a scenario where the MCU1_0 or DM is running its own SCICLIENT Direct calls and the SCISERVER is running the calls for other Cores. This can lead to race conditions where the SCISERVER call is mid way and an SCICLIENT Direct call is made. This flag based mechanism helps in making sure SCICLIENT direct calls are only made when the SCISERVER is done with its processing. Then the SCISERVER calls the API to halt the the SCISERVER and then processes its messages. This macro will indicate to SCICLIENT Direct if the SCISERVER is still processing messages.

◆ SCISERVER_FORWARD_MSG

#define SCISERVER_FORWARD_MSG   (0x5AU)

Macro do indicate whether the message is being forwarded to another service provider.

◆ SCISERVER_NO_FORWARD_MSG

#define SCISERVER_NO_FORWARD_MSG   (0xA5U)

Macro do indicate whether the message is NOT being forwarded to another service provider.

◆ SCISERVER_INIT_DONE

#define SCISERVER_INIT_DONE   (0x69U)

Macro to indicate if the SCISERVER is initialized

◆ SCISERVER_INIT_NOT_DONE

#define SCISERVER_INIT_NOT_DONE   (0x96U)

Macro to indicate if the SCISERVER is not initialized

◆ SCISERVER_HW_QUEUE_SIZE

#define SCISERVER_HW_QUEUE_SIZE   (52U)

Max size of the message for SCICLIENT

◆ SCISERVER_HWI_NUM

#define SCISERVER_HWI_NUM   (5U)

Max number of interrupts for HWI

◆ SCISERVER_SECPROXY_INSTANCE_COUNT

#define SCISERVER_SECPROXY_INSTANCE_COUNT   (0x2U)

Macro to define number of secure proxy instances

◆ SCISERVER_SEMAPHORE_USER_HI

#define SCISERVER_SEMAPHORE_USER_HI   (uint32_t)0

User High Priority Semaphore

◆ SCISERVER_SEMAPHORE_USER_LO

#define SCISERVER_SEMAPHORE_USER_LO   (uint32_t)1

User Low Priority Semaphore

◆ SCISERVER_SEMAPHORE_USER_DM

#define SCISERVER_SEMAPHORE_USER_DM   (uint32_t)2

Device Manager Semaphore

◆ SCISERVER_SEMAPHORE_MAX_CNT

#define SCISERVER_SEMAPHORE_MAX_CNT   (uint32_t)3

Max Semaphore

◆ SCISERVER_TASK_USER_HI

#define SCISERVER_TASK_USER_HI   (uint32_t)0

User High priority Task ID

◆ SCISERVER_TASK_USER_LO

#define SCISERVER_TASK_USER_LO   (uint32_t)1

User Low priority Task ID

◆ SCISERVER_TASK_MAX_CNT

#define SCISERVER_TASK_MAX_CNT   (uint32_t)2

User Max Task ID

Typedef Documentation

◆ Sciserver_SemaphoreIds

typedef uint32_t Sciserver_SemaphoreIds

Semaphore Ids to be used for the user and DM tasks.

◆ Sciserver_TaskIds

typedef uint32_t Sciserver_TaskIds

Task Ids to be used for the user and DM tasks.

Enumeration Type Documentation

◆ Sciserver_taskStateState

Enumerator
SCISERVER_TASK_PENDING 

Task is pending

SCISERVER_TASK_PROCESSING_USER_MSG 

Task is processing user message

SCISERVER_TASK_PROCESSING_SECURE_MSG 

Task is processing secure message

Function Documentation

◆ Sciserver_getVersionStr()

char* Sciserver_getVersionStr ( void  )

Sciserver Get Version String Function.

Returns
string with Sciserver version info

◆ Sciserver_getRmPmHalVersionStr()

char* Sciserver_getRmPmHalVersionStr ( void  )

Sciserver Get RM_PM_HAL Version String Function.

Returns
string with RM_PM_HAL version info

◆ Sciserver_init()

int32_t Sciserver_init ( Sciserver_CfgPrms_t pPrms)

Sciserver Initialization Function.

Parameters
pPrmsConfiguration Parameters for Sciserver. Refer Sciserver_CfgPrms_t.
Returns
CSL_PASS if the server has been intialized correctly. CSL_EFAIL if otherwise.

◆ Sciserver_deinit()

int32_t Sciserver_deinit ( void  )

Sciserver De-Initialization Function.

Returns
CSL_PASS if the server has been de-initialized correctly. CSL_EFAIL if otherwise.

◆ Sciserver_setCtrlState()

void Sciserver_setCtrlState ( uint8_t  state)

Sciserver Set the Control Command State.

Parameters
stateControl Command State.
Returns
None

◆ Sciserver_getCtrlState()

uint8_t Sciserver_getCtrlState ( void  )

Sciserver Get the Control Command State.

Returns
state Control Command State.

◆ Sciserver_setProcessState()

void Sciserver_setProcessState ( uint8_t  state)

Sciserver Set the Process State.

Parameters
stateProcess State.
Returns
None

◆ Sciserver_getProcessState()

uint8_t Sciserver_getProcessState ( void  )

Sciserver Get the Process State.

Returns
state Process State.

◆ Sciserver_interruptHandler()

int32_t Sciserver_interruptHandler ( Sciserver_hwiData uhd,
bool *  soft_error 
)

Sciserver Interrupt Handler.

Parameters
uhdSciserver HWI Data. Refer Sciserver_hwiData.
soft_errorSoft Error indicator which mentions if the host does match expectation.
Returns
CSL_PASS If the secure Proxy is handled correctly. CSL_EFAIL If otherwise.

◆ Sciserver_processtask()

int32_t Sciserver_processtask ( Sciserver_taskData utd)

Sciserver Process Task Function.

Parameters
utdTask Data
Returns
CSL_PASS If the API is processed Successfully. CSL_EFAIL If otherwise.

◆ Sciserver_initPrms_Init()

int32_t Sciserver_initPrms_Init ( Sciserver_CfgPrms_t pPrms)

Initialize the init params for SCISERVER.

Parameters
pPrmsPointer to the init parameters.
Returns
CSL_PASS if init Params are initilized with some default. CSL_EFAIL otherwise.

◆ Sciserver_socInit()

void Sciserver_socInit ( void  )

Sciserver function to implement SoC specific configuration.