TianoCore EDK2 master
Loading...
Searching...
No Matches
Optee.c File Reference
#include <Library/ArmMmuLib.h>
#include <Library/ArmSmcLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/OpteeLib.h>
#include <IndustryStandard/ArmStdSmc.h>
#include <OpteeSmc.h>
#include <Uefi.h>

Go to the source code of this file.

Functions

BOOLEAN EFIAPI IsOpteePresent (VOID)
 
STATIC EFI_STATUS OpteeSharedMemoryRemap (VOID)
 
EFI_STATUS EFIAPI OpteeInit (VOID)
 
STATIC BOOLEAN IsOpteeSmcReturnRpc (UINT32 Return)
 
STATIC UINT32 OpteeCallWithArg (IN UINT64 PhysicalArg)
 
STATIC VOID EfiGuidToRfc4122Uuid (OUT RFC4122_UUID *Rfc4122Uuid, IN EFI_GUID *Guid)
 
EFI_STATUS EFIAPI OpteeOpenSession (IN OUT OPTEE_OPEN_SESSION_ARG *OpenSessionArg)
 
EFI_STATUS EFIAPI OpteeCloseSession (IN UINT32 Session)
 
STATIC EFI_STATUS OpteeToMessageParam (OUT OPTEE_MESSAGE_PARAM *MessageParams, IN UINT32 NumParams, IN OPTEE_MESSAGE_PARAM *InParams)
 
STATIC EFI_STATUS OpteeFromMessageParam (OUT OPTEE_MESSAGE_PARAM *OutParams, IN UINT32 NumParams, IN OPTEE_MESSAGE_PARAM *MessageParams)
 
EFI_STATUS EFIAPI OpteeInvokeFunction (IN OUT OPTEE_INVOKE_FUNCTION_ARG *InvokeFunctionArg)
 

Variables

STATIC OPTEE_SHARED_MEMORY_INFORMATION OpteeSharedMemoryInformation = { 0 }
 

Detailed Description

Api's to communicate with OP-TEE OS (Trusted OS based on ARM TrustZone) via secure monitor calls.

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 Optee.c.

Function Documentation

◆ EfiGuidToRfc4122Uuid()

STATIC VOID EfiGuidToRfc4122Uuid ( OUT RFC4122_UUID Rfc4122Uuid,
IN EFI_GUID Guid 
)

Definition at line 189 of file Optee.c.

◆ IsOpteePresent()

BOOLEAN EFIAPI IsOpteePresent ( VOID  )

Check for OP-TEE presence.

Definition at line 30 of file Optee.c.

◆ IsOpteeSmcReturnRpc()

STATIC BOOLEAN IsOpteeSmcReturnRpc ( UINT32  Return)

Definition at line 129 of file Optee.c.

◆ OpteeCallWithArg()

STATIC UINT32 OpteeCallWithArg ( IN UINT64  PhysicalArg)

Does Standard SMC to OP-TEE in secure world.

Parameters
[in]PhysicalArgPhysical address of message to pass to secure world
Returns
0 on success, secure world return code otherwise

Definition at line 148 of file Optee.c.

◆ OpteeCloseSession()

EFI_STATUS EFIAPI OpteeCloseSession ( IN UINT32  Session)

Definition at line 251 of file Optee.c.

◆ OpteeFromMessageParam()

STATIC EFI_STATUS OpteeFromMessageParam ( OUT OPTEE_MESSAGE_PARAM OutParams,
IN UINT32  NumParams,
IN OPTEE_MESSAGE_PARAM MessageParams 
)

Definition at line 350 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.

◆ OpteeSharedMemoryRemap()

STATIC EFI_STATUS OpteeSharedMemoryRemap ( VOID  )

Definition at line 54 of file Optee.c.

◆ OpteeToMessageParam()

STATIC EFI_STATUS OpteeToMessageParam ( OUT OPTEE_MESSAGE_PARAM MessageParams,
IN UINT32  NumParams,
IN OPTEE_MESSAGE_PARAM InParams 
)

Definition at line 277 of file Optee.c.

Variable Documentation

◆ OpteeSharedMemoryInformation

STATIC OPTEE_SHARED_MEMORY_INFORMATION OpteeSharedMemoryInformation = { 0 }

Definition at line 23 of file Optee.c.