]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPkg/Library/OpteeLib/OpteeSmc.h
ArmPkg/OpteeLib: Add dummy RPC handler
[mirror_edk2.git] / ArmPkg / Library / OpteeLib / OpteeSmc.h
1 /** @file
2 OP-TEE SMC header file.
3
4 Copyright (c) 2018, Linaro Ltd. All rights reserved.<BR>
5
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 #ifndef _OPTEE_SMC_H_
17 #define _OPTEE_SMC_H_
18
19 /* Returned in Arg0 only from Trusted OS functions */
20 #define OPTEE_SMC_RETURN_OK 0x0
21
22 #define OPTEE_SMC_RETURN_FROM_RPC 0x32000003
23 #define OPTEE_SMC_CALL_WITH_ARG 0x32000004
24 #define OPTEE_SMC_GET_SHARED_MEMORY_CONFIG 0xb2000007
25
26 #define OPTEE_SMC_SHARED_MEMORY_CACHED 1
27
28 #define OPTEE_SMC_RETURN_UNKNOWN_FUNCTION 0xffffffff
29 #define OPTEE_SMC_RETURN_RPC_PREFIX_MASK 0xffff0000
30 #define OPTEE_SMC_RETURN_RPC_PREFIX 0xffff0000
31 #define OPTEE_SMC_RETURN_RPC_FOREIGN_INTERRUPT 0xffff0004
32
33 #define OPTEE_MESSAGE_COMMAND_OPEN_SESSION 0
34 #define OPTEE_MESSAGE_COMMAND_INVOKE_FUNCTION 1
35 #define OPTEE_MESSAGE_COMMAND_CLOSE_SESSION 2
36
37 #define OPTEE_MESSAGE_ATTRIBUTE_META 0x100
38
39 #define OPTEE_LOGIN_PUBLIC 0x0
40
41 typedef struct {
42 UINTN Base;
43 UINTN Size;
44 } OPTEE_SHARED_MEMORY_INFORMATION;
45
46 //
47 // UUID struct compliant with RFC4122 (network byte order).
48 //
49 typedef struct {
50 UINT32 Data1;
51 UINT16 Data2;
52 UINT16 Data3;
53 UINT8 Data4[8];
54 } RFC4122_UUID;
55
56 #endif