My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Typedefs | Functions
dispatcher_task.h File Reference
#include <secure_api.h>

Go to the source code of this file.

Classes

struct  dispatch_global
 Global variables for the task should be defined as a member of the global structure. More...
 

Typedefs

typedef struct dispatch_global dispatch_global
 Global variables for the task should be defined as a member of the global structure. More...
 

Functions

int dispatch_task_init (sa_config_t *psa_config)
 Dispatcher task init. More...
 
int dispatch_task_exit (void *data)
 Exit function for the dispatcher task. More...
 
void dispatch_task (long cur_task_id)
 Dispatcher task exit. More...
 
void set_secure_api_ret (int ret_val)
 Task return value notification. More...
 

Typedef Documentation

Global variables for the task should be defined as a member of the global structure.

Function Documentation

void dispatch_task ( long  cur_task_id)

Dispatcher task exit.

This function gets called before the task deletion

Returns
otz_return_t: OTZ_OK
OTZ_FAIL

Dispatcher task exit.

This task will process the smc commands and helps in creating the service tasks and calls the service task functions.

  1. On arrival of API command invocation "valid params flag" got set. Based on the flag, it process the command by invoking the appropriate task.
  2. At the completion of processing, the corresponding task sets the return value of the command result in the dispatcher private data.
  3. Based on the result and the source, it returns to non-secure world or originated task in case of IPI.
Parameters
cur_task_id- Dispatcher task identifier
int dispatch_task_exit ( void *  data)

Exit function for the dispatcher task.

Parameters
dataPrivate data which need to be freed.
Returns
otz_return_t: OTZ_OK - Exit function returns succcess.
OTZ_* - An implementation-defined error code for any other error.
Exit function for the dispatcher task.

This function gets called before the task deletion

Parameters
dataPrivate data which need to be freed.
Returns
otz_return_t: OTZ_OK
OTZ_FAIL
int dispatch_task_init ( sa_config_t psa_config)

Dispatcher task init.

This function initializes dispatcher task parameters and its get called before the task creation

Parameters
psa_configConfiguration parameter for the task
Returns
otz_return_t: OTZ_OK
OTZ_FAIL
void set_secure_api_ret ( int  ret_val)

Task return value notification.

This function gets called after the API completion to notify the dispatcher task and it also sets the return value of API.

Parameters
ret_valAPI return value