p3/exp3/optee_test/ta/storage/ta_entry.c
/* Called when a command is invoked */
Called when a command is invoked
Called when a command is invoked
TEE_Result TA_InvokeCommandEntryPoint(void *pSessionContext,
				      uint32_t nCommandID, uint32_t nParamTypes,
				      TEE_Param pParams[4])
{
	(void)pSessionContext;
	switch (nCommandID) {
	case TA_STORAGE_CMD_OPEN:
	case TA_STORAGE_CMD_OPEN_ID_IN_SHM:
		return ta_storage_cmd_open(nCommandID, nParamTypes, pParams);
	case TA_STORAGE_CMD_CLOSE:
		return ta_storage_cmd_close(nParamTypes, pParams);
	case TA_STORAGE_CMD_READ:
		return ta_storage_cmd_read(nParamTypes, pParams);
	case TA_STORAGE_CMD_WRITE:
		return ta_storage_cmd_write(nParamTypes, pParams);
	case TA_STORAGE_CMD_CREATE:
	case TA_STORAGE_CMD_CREATE_ID_IN_SHM:
		return ta_storage_cmd_create(nCommandID, nParamTypes, pParams);
	case TA_STORAGE_CMD_CREATE_OVERWRITE:
	case TA_STORAGE_CMD_CREATEOVER_ID_IN_SHM:
		return ta_storage_cmd_create_overwrite(nCommandID, nParamTypes, pParams);
	case TA_STORAGE_CMD_SEEK:
		return ta_storage_cmd_seek(nParamTypes, pParams);
	case TA_STORAGE_CMD_UNLINK:
		return ta_storage_cmd_unlink(nParamTypes, pParams);
	case TA_STORAGE_CMD_RENAME:
	case TA_STORAGE_CMD_RENAME_ID_IN_SHM:
		return ta_storage_cmd_rename(nCommandID, nParamTypes, pParams);
	case TA_STORAGE_CMD_TRUNC:
		return ta_storage_cmd_trunc(nParamTypes, pParams);
	case TA_STORAGE_CMD_ALLOC_ENUM:
		return ta_storage_cmd_alloc_enum(nParamTypes, pParams);
	case TA_STORAGE_CMD_FREE_ENUM:
		return ta_storage_cmd_free_enum(nParamTypes, pParams);
	case TA_STORAGE_CMD_RESET_ENUM:
		return ta_storage_cmd_reset_enum(nParamTypes, pParams);
	case TA_STORAGE_CMD_START_ENUM:
		return ta_storage_cmd_start_enum(nParamTypes, pParams);
	case TA_STORAGE_CMD_NEXT_ENUM:
		return ta_storage_cmd_next_enum(nParamTypes, pParams);
	case TA_STORAGE_CMD_KEY_IN_PERSISTENT:
		return ta_storage_cmd_key_in_persistent(nParamTypes, pParams);
	case TA_STORAGE_CMD_LOOP:
		return ta_storage_cmd_loop(nParamTypes, pParams);
	case TA_STORAGE_CMD_RESTRICT_USAGE:
		return ta_storage_cmd_restrict_usage(nParamTypes, pParams);
	case TA_STORAGE_CMD_ALLOC_OBJ:
		return ta_storage_cmd_alloc_obj(nParamTypes, pParams);
	case TA_STORAGE_CMD_FREE_OBJ:
		return ta_storage_cmd_free_obj(nParamTypes, pParams);
	case TA_STORAGE_CMD_RESET_OBJ:
		return ta_storage_cmd_reset_obj(nParamTypes, pParams);
	case TA_STORAGE_CMD_GET_OBJ_INFO:
		return ta_storage_cmd_get_obj_info(nParamTypes, pParams);
	default:
		return TEE_ERROR_BAD_PARAMETERS;
	}
}
TEE_Result TA_InvokeCommandEntryPoint ( void * pSessionContext , uint32_t nCommandID , uint32_t nParamTypes , TEE_Param pParams [ 4 ] ) { ( void ) pSessionContext ; switch ( nCommandID ) { case TA_STORAGE_CMD_OPEN : case TA_STORAGE_CMD_OPEN_ID_IN_SHM : return ta_storage_cmd_open ( nCommandID , nParamTypes , pParams ) ; case TA_STORAGE_CMD_CLOSE : return ta_storage_cmd_close ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_READ : return ta_storage_cmd_read ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_WRITE : return ta_storage_cmd_write ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_CREATE : case TA_STORAGE_CMD_CREATE_ID_IN_SHM : return ta_storage_cmd_create ( nCommandID , nParamTypes , pParams ) ; case TA_STORAGE_CMD_CREATE_OVERWRITE : case TA_STORAGE_CMD_CREATEOVER_ID_IN_SHM : return ta_storage_cmd_create_overwrite ( nCommandID , nParamTypes , pParams ) ; case TA_STORAGE_CMD_SEEK : return ta_storage_cmd_seek ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_UNLINK : return ta_storage_cmd_unlink ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_RENAME : case TA_STORAGE_CMD_RENAME_ID_IN_SHM : return ta_storage_cmd_rename ( nCommandID , nParamTypes , pParams ) ; case TA_STORAGE_CMD_TRUNC : return ta_storage_cmd_trunc ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_ALLOC_ENUM : return ta_storage_cmd_alloc_enum ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_FREE_ENUM : return ta_storage_cmd_free_enum ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_RESET_ENUM : return ta_storage_cmd_reset_enum ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_START_ENUM : return ta_storage_cmd_start_enum ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_NEXT_ENUM : return ta_storage_cmd_next_enum ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_KEY_IN_PERSISTENT : return ta_storage_cmd_key_in_persistent ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_LOOP : return ta_storage_cmd_loop ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_RESTRICT_USAGE : return ta_storage_cmd_restrict_usage ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_ALLOC_OBJ : return ta_storage_cmd_alloc_obj ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_FREE_OBJ : return ta_storage_cmd_free_obj ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_RESET_OBJ : return ta_storage_cmd_reset_obj ( nParamTypes , pParams ) ; case TA_STORAGE_CMD_GET_OBJ_INFO : return ta_storage_cmd_get_obj_info ( nParamTypes , pParams ) ; default : return TEE_ERROR_BAD_PARAMETERS ; } }
Called when a command is invoked
Called when a command is invoked