TianoCore EDK2 master
Loading...
Searching...
No Matches
OpteeLib.h File Reference

Go to the source code of this file.

Data Structures

struct  OPTEE_MESSAGE_PARAM_MEMORY
 
struct  OPTEE_MESSAGE_PARAM_VALUE
 
union  OPTEE_MESSAGE_PARAM_UNION
 
struct  OPTEE_MESSAGE_PARAM
 
struct  OPTEE_MESSAGE_ARG
 
struct  OPTEE_OPEN_SESSION_ARG
 
struct  OPTEE_INVOKE_FUNCTION_ARG
 

Macros

#define OPTEE_OS_UID0   0x384fb3e0
 
#define OPTEE_OS_UID1   0xe7f811e3
 
#define OPTEE_OS_UID2   0xaf630002
 
#define OPTEE_OS_UID3   0xa5d5c51b
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_NONE   0x0
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INPUT   0x1
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_OUTPUT   0x2
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INOUT   0x3
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INPUT   0x9
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_OUTPUT   0xa
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INOUT   0xb
 
#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MASK   0xff
 
#define OPTEE_SUCCESS   0x00000000
 
#define OPTEE_ORIGIN_COMMUNICATION   0x00000002
 
#define OPTEE_ERROR_COMMUNICATION   0xFFFF000E
 
#define OPTEE_MAX_CALL_PARAMS   4
 

Functions

BOOLEAN EFIAPI IsOpteePresent (VOID)
 
EFI_STATUS EFIAPI OpteeInit (VOID)
 
EFI_STATUS EFIAPI OpteeOpenSession (IN OUT OPTEE_OPEN_SESSION_ARG *OpenSessionArg)
 
EFI_STATUS EFIAPI OpteeCloseSession (IN UINT32 Session)
 
EFI_STATUS EFIAPI OpteeInvokeFunction (IN OUT OPTEE_INVOKE_FUNCTION_ARG *InvokeFunctionArg)
 

Detailed Description

OP-TEE specific header file.

Copyright (c) 2018, Linaro Ltd. All rights reserved.
Copyright (c) 2021, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file OpteeLib.h.

Macro Definition Documentation

◆ OPTEE_ERROR_COMMUNICATION

#define OPTEE_ERROR_COMMUNICATION   0xFFFF000E

Definition at line 35 of file OpteeLib.h.

◆ OPTEE_MAX_CALL_PARAMS

#define OPTEE_MAX_CALL_PARAMS   4

Definition at line 59 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_MASK

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MASK   0xff

Definition at line 31 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INOUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INOUT   0xb

Definition at line 29 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INPUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_INPUT   0x9

Definition at line 27 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_OUTPUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_MEMORY_OUTPUT   0xa

Definition at line 28 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_NONE

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_NONE   0x0

Definition at line 23 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INOUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INOUT   0x3

Definition at line 26 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INPUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_INPUT   0x1

Definition at line 24 of file OpteeLib.h.

◆ OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_OUTPUT

#define OPTEE_MESSAGE_ATTRIBUTE_TYPE_VALUE_OUTPUT   0x2

Definition at line 25 of file OpteeLib.h.

◆ OPTEE_ORIGIN_COMMUNICATION

#define OPTEE_ORIGIN_COMMUNICATION   0x00000002

Definition at line 34 of file OpteeLib.h.

◆ OPTEE_OS_UID0

#define OPTEE_OS_UID0   0x384fb3e0

Definition at line 18 of file OpteeLib.h.

◆ OPTEE_OS_UID1

#define OPTEE_OS_UID1   0xe7f811e3

Definition at line 19 of file OpteeLib.h.

◆ OPTEE_OS_UID2

#define OPTEE_OS_UID2   0xaf630002

Definition at line 20 of file OpteeLib.h.

◆ OPTEE_OS_UID3

#define OPTEE_OS_UID3   0xa5d5c51b

Definition at line 21 of file OpteeLib.h.

◆ OPTEE_SUCCESS

#define OPTEE_SUCCESS   0x00000000

Definition at line 33 of file OpteeLib.h.

Function Documentation

◆ IsOpteePresent()

BOOLEAN EFIAPI IsOpteePresent ( VOID  )

Check for OP-TEE presence.

Definition at line 30 of file Optee.c.

◆ OpteeCloseSession()

EFI_STATUS EFIAPI OpteeCloseSession ( IN UINT32  Session)

Definition at line 251 of file Optee.c.

◆ OpteeInit()

EFI_STATUS EFIAPI OpteeInit ( VOID  )

Definition at line 107 of file Optee.c.

◆ OpteeInvokeFunction()

EFI_STATUS EFIAPI OpteeInvokeFunction ( IN OUT OPTEE_INVOKE_FUNCTION_ARG InvokeFunctionArg)

Definition at line 409 of file Optee.c.

◆ OpteeOpenSession()

EFI_STATUS EFIAPI OpteeOpenSession ( IN OUT OPTEE_OPEN_SESSION_ARG OpenSessionArg)

Definition at line 202 of file Optee.c.