]>
Commit | Line | Data |
---|---|---|
1bfda055 | 1 | /** @file\r |
2 | *\r | |
3 | * Copyright (c) 2011, ARM Limited. All rights reserved.\r | |
4 | * \r | |
5 | * This program and the accompanying materials \r | |
6 | * are licensed and made available under the terms and conditions of the BSD License \r | |
7 | * which accompanies this distribution. The full text of the license may be found at \r | |
8 | * http://opensource.org/licenses/bsd-license.php \r | |
9 | *\r | |
10 | * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
11 | * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
12 | *\r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __ARM_TRUSTZONE_LIB_H__\r | |
16 | #define __ARM_TRUSTZONE_LIB_H__\r | |
17 | \r | |
18 | #include <Uefi.h>\r | |
19 | \r | |
20 | // Setup TZ Protection Controller\r | |
21 | #define TZPC_DECPROT_0 0\r | |
22 | #define TZPC_DECPROT_1 1\r | |
23 | #define TZPC_DECPROT_2 2\r | |
24 | #define TZPC_DECPROT_MAX 2\r | |
25 | \r | |
26 | /**\r | |
27 | FIXME: Need documentation\r | |
28 | **/\r | |
29 | EFI_STATUS TZPCSetDecProtBits(UINTN tzpc_base, UINTN tzpc_id, UINTN bits);\r | |
30 | \r | |
31 | /**\r | |
32 | FIXME: Need documentation\r | |
33 | **/\r | |
34 | EFI_STATUS TZPCClearDecProtBits(UINTN tzpc_base, UINTN tzpc_id, UINTN bits);\r | |
35 | \r | |
36 | // Setup TZ Address Space Controller\r | |
37 | #define TZASC_REGION_ENABLED 1\r | |
38 | #define TZASC_REGION_DISABLED 0\r | |
39 | #define TZASC_REGION_SIZE_32KB 0xE\r | |
40 | #define TZASC_REGION_SIZE_64KB 0xF\r | |
41 | #define TZASC_REGION_SIZE_128KB 0x10\r | |
42 | #define TZASC_REGION_SIZE_256KB 0x11\r | |
43 | #define TZASC_REGION_SIZE_512KB 0x12\r | |
44 | #define TZASC_REGION_SIZE_1MB 0x13\r | |
45 | #define TZASC_REGION_SIZE_2MB 0x14\r | |
46 | #define TZASC_REGION_SIZE_4MB 0x15\r | |
47 | #define TZASC_REGION_SIZE_8MB 0x16\r | |
48 | #define TZASC_REGION_SIZE_16MB 0x17\r | |
49 | #define TZASC_REGION_SIZE_32MB 0x18\r | |
50 | #define TZASC_REGION_SIZE_64MB 0x19\r | |
51 | #define TZASC_REGION_SIZE_128MB 0x1A\r | |
52 | #define TZASC_REGION_SIZE_256MB 0x1B\r | |
53 | #define TZASC_REGION_SIZE_512MB 0x1C\r | |
54 | #define TZASC_REGION_SIZE_1GB 0x1D\r | |
55 | #define TZASC_REGION_SIZE_2GB 0x1E\r | |
56 | #define TZASC_REGION_SIZE_4GB 0x1F\r | |
57 | #define TZASC_REGION_SECURITY_SR (1 << 3)\r | |
58 | #define TZASC_REGION_SECURITY_SW (1 << 2)\r | |
59 | #define TZASC_REGION_SECURITY_SRW (TZASC_REGION_SECURITY_SR|TZASC_REGION_SECURITY_SW)\r | |
60 | #define TZASC_REGION_SECURITY_NSR (1 << 1)\r | |
61 | #define TZASC_REGION_SECURITY_NSW 1\r | |
62 | #define TZASC_REGION_SECURITY_NSRW (TZASC_REGION_SECURITY_NSR|TZASC_REGION_SECURITY_NSW)\r | |
63 | \r | |
64 | /**\r | |
65 | FIXME: Need documentation\r | |
66 | **/\r | |
67 | EFI_STATUS TZASCSetRegion(UINTN tzasc_base, UINTN region_id, UINTN enabled, UINTN low_address, UINTN high_address, UINTN size, UINTN security);\r | |
68 | \r | |
69 | #endif\r |