1 | /** @file
|
---|
2 | Header file for NV data structure definition.
|
---|
3 |
|
---|
4 | Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.<BR>
|
---|
5 | This program and the accompanying materials
|
---|
6 | are licensed and made available under the terms and conditions of the BSD License
|
---|
7 | which accompanies this distribution. The full text of the license may be found at
|
---|
8 | http://opensource.org/licenses/bsd-license.php
|
---|
9 |
|
---|
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
12 |
|
---|
13 | **/
|
---|
14 |
|
---|
15 | #ifndef __SECUREBOOT_CONFIG_NV_DATA_H__
|
---|
16 | #define __SECUREBOOT_CONFIG_NV_DATA_H__
|
---|
17 |
|
---|
18 | #include <Guid/HiiPlatformSetupFormset.h>
|
---|
19 | #include <Guid/SecureBootConfigHii.h>
|
---|
20 |
|
---|
21 | //
|
---|
22 | // Used by VFR for form or button identification
|
---|
23 | //
|
---|
24 | #define SECUREBOOT_CONFIGURATION_VARSTORE_ID 0x0001
|
---|
25 | #define SECUREBOOT_CONFIGURATION_FORM_ID 0x01
|
---|
26 | #define FORMID_SECURE_BOOT_OPTION_FORM 0x02
|
---|
27 | #define FORMID_SECURE_BOOT_PK_OPTION_FORM 0x03
|
---|
28 | #define FORMID_SECURE_BOOT_KEK_OPTION_FORM 0x04
|
---|
29 | #define FORMID_SECURE_BOOT_DB_OPTION_FORM 0x05
|
---|
30 | #define FORMID_SECURE_BOOT_DBX_OPTION_FORM 0x06
|
---|
31 | #define FORMID_ENROLL_PK_FORM 0x07
|
---|
32 | #define SECUREBOOT_ADD_PK_FILE_FORM_ID 0x08
|
---|
33 | #define FORMID_ENROLL_KEK_FORM 0x09
|
---|
34 | #define FORMID_DELETE_KEK_FORM 0x0a
|
---|
35 | #define SECUREBOOT_ENROLL_SIGNATURE_TO_DB 0x0b
|
---|
36 | #define SECUREBOOT_DELETE_SIGNATURE_FROM_DB 0x0c
|
---|
37 | #define SECUREBOOT_ENROLL_SIGNATURE_TO_DBX 0x0d
|
---|
38 | #define SECUREBOOT_DELETE_SIGNATURE_FROM_DBX 0x0e
|
---|
39 | #define FORM_FILE_EXPLORER_ID 0x0f
|
---|
40 | #define FORM_FILE_EXPLORER_ID_PK 0x10
|
---|
41 | #define FORM_FILE_EXPLORER_ID_KEK 0x11
|
---|
42 | #define FORM_FILE_EXPLORER_ID_DB 0x12
|
---|
43 | #define FORM_FILE_EXPLORER_ID_DBX 0x13
|
---|
44 |
|
---|
45 | #define SECURE_BOOT_MODE_CUSTOM 0x01
|
---|
46 | #define SECURE_BOOT_MODE_STANDARD 0x00
|
---|
47 |
|
---|
48 | #define KEY_SECURE_BOOT_ENABLE 0x1000
|
---|
49 | #define KEY_SECURE_BOOT_MODE 0x1001
|
---|
50 | #define KEY_VALUE_SAVE_AND_EXIT_DB 0x1002
|
---|
51 | #define KEY_VALUE_NO_SAVE_AND_EXIT_DB 0x1003
|
---|
52 | #define KEY_VALUE_SAVE_AND_EXIT_PK 0x1004
|
---|
53 | #define KEY_VALUE_NO_SAVE_AND_EXIT_PK 0x1005
|
---|
54 | #define KEY_VALUE_SAVE_AND_EXIT_KEK 0x1008
|
---|
55 | #define KEY_VALUE_NO_SAVE_AND_EXIT_KEK 0x1009
|
---|
56 | #define KEY_VALUE_SAVE_AND_EXIT_DBX 0x100a
|
---|
57 | #define KEY_VALUE_NO_SAVE_AND_EXIT_DBX 0x100b
|
---|
58 |
|
---|
59 | #define KEY_SECURE_BOOT_OPTION 0x1100
|
---|
60 | #define KEY_SECURE_BOOT_PK_OPTION 0x1101
|
---|
61 | #define KEY_SECURE_BOOT_KEK_OPTION 0x1102
|
---|
62 | #define KEY_SECURE_BOOT_DB_OPTION 0x1103
|
---|
63 | #define KEY_SECURE_BOOT_DBX_OPTION 0x1104
|
---|
64 | #define KEY_SECURE_BOOT_DELETE_PK 0x1105
|
---|
65 | #define KEY_ENROLL_PK 0x1106
|
---|
66 | #define KEY_ENROLL_KEK 0x1107
|
---|
67 | #define KEY_DELETE_KEK 0x1108
|
---|
68 | #define KEY_SECURE_BOOT_KEK_GUID 0x110a
|
---|
69 | #define KEY_SECURE_BOOT_SIGNATURE_GUID_DB 0x110b
|
---|
70 | #define KEY_SECURE_BOOT_SIGNATURE_GUID_DBX 0x110c
|
---|
71 |
|
---|
72 | #define LABEL_KEK_DELETE 0x1200
|
---|
73 | #define LABEL_DB_DELETE 0x1201
|
---|
74 | #define LABEL_DBX_DELETE 0x1202
|
---|
75 | #define LABEL_END 0xffff
|
---|
76 |
|
---|
77 | #define SECURE_BOOT_MAX_ATTEMPTS_NUM 255
|
---|
78 |
|
---|
79 | #define CONFIG_OPTION_OFFSET 0x2000
|
---|
80 |
|
---|
81 | #define OPTION_CONFIG_QUESTION_ID 0x2000
|
---|
82 | #define OPTION_CONFIG_RANGE 0x1000
|
---|
83 |
|
---|
84 | //
|
---|
85 | // Question ID 0x2000 ~ 0x2FFF is for KEK
|
---|
86 | //
|
---|
87 | #define OPTION_DEL_KEK_QUESTION_ID 0x2000
|
---|
88 | //
|
---|
89 | // Question ID 0x3000 ~ 0x3FFF is for DB
|
---|
90 | //
|
---|
91 | #define OPTION_DEL_DB_QUESTION_ID 0x3000
|
---|
92 | //
|
---|
93 | // Question ID 0x4000 ~ 0x4FFF is for DBX
|
---|
94 | //
|
---|
95 | #define OPTION_DEL_DBX_QUESTION_ID 0x4000
|
---|
96 |
|
---|
97 |
|
---|
98 | #define FILE_OPTION_OFFSET 0x8000
|
---|
99 | #define FILE_OPTION_MASK 0x7FFF
|
---|
100 |
|
---|
101 | #define SECURE_BOOT_GUID_SIZE 36
|
---|
102 | #define SECURE_BOOT_GUID_STORAGE_SIZE 37
|
---|
103 |
|
---|
104 |
|
---|
105 | //
|
---|
106 | // Nv Data structure referenced by IFR
|
---|
107 | //
|
---|
108 | typedef struct {
|
---|
109 | BOOLEAN SecureBootState; //Secure Boot Disable/Enable;
|
---|
110 | BOOLEAN HideSecureBoot; //Hiden Attempt Secure Boot
|
---|
111 | CHAR16 SignatureGuid[SECURE_BOOT_GUID_STORAGE_SIZE];
|
---|
112 | BOOLEAN PhysicalPresent; //If a Physical Present User;
|
---|
113 | UINT8 SecureBootMode; //Secure Boot Mode: Standard Or Custom
|
---|
114 | BOOLEAN DeletePk;
|
---|
115 | BOOLEAN HasPk; //If Pk is existed it is true;
|
---|
116 | } SECUREBOOT_CONFIGURATION;
|
---|
117 |
|
---|
118 | #endif
|
---|