]>
Commit | Line | Data |
---|---|---|
ff843847 RN |
1 | /** @file\r |
2 | Variable Lock Protocol is related to EDK II-specific implementation of variables\r | |
3 | and intended for use as a means to mark a variable read-only after the event\r | |
4 | EFI_END_OF_DXE_EVENT_GUID is signaled.\r | |
5 | \r | |
6 | Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r | |
7 | This program and the accompanying materials \r | |
8 | are licensed and made available under the terms and conditions of the BSD License \r | |
9 | which accompanies this distribution. The full text of the license may be found at \r | |
10 | http://opensource.org/licenses/bsd-license.php \r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __VARIABLE_LOCK_H__\r | |
18 | #define __VARIABLE_LOCK_H__\r | |
19 | \r | |
20 | #define EDKII_VARIABLE_LOCK_PROTOCOL_GUID \\r | |
21 | { \\r | |
22 | 0xcd3d0a05, 0x9e24, 0x437c, { 0xa8, 0x91, 0x1e, 0xe0, 0x53, 0xdb, 0x76, 0x38 } \\r | |
23 | }\r | |
24 | \r | |
25 | typedef struct _EDKII_VARIABLE_LOCK_PROTOCOL EDKII_VARIABLE_LOCK_PROTOCOL;\r | |
26 | \r | |
27 | /**\r | |
28 | Mark a variable that will become read-only after leaving the DXE phase of execution.\r | |
29 | Write request coming from SMM environment through EFI_SMM_VARIABLE_PROTOCOL is allowed.\r | |
30 | \r | |
31 | @param[in] This The EDKII_VARIABLE_LOCK_PROTOCOL instance.\r | |
32 | @param[in] VariableName A pointer to the variable name that will be made read-only subsequently.\r | |
33 | @param[in] VendorGuid A pointer to the vendor GUID that will be made read-only subsequently.\r | |
34 | \r | |
35 | @retval EFI_SUCCESS The variable specified by the VariableName and the VendorGuid was marked\r | |
36 | as pending to be read-only.\r | |
37 | @retval EFI_INVALID_PARAMETER VariableName or VendorGuid is NULL.\r | |
38 | Or VariableName is an empty string.\r | |
39 | @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has\r | |
40 | already been signaled.\r | |
41 | @retval EFI_OUT_OF_RESOURCES There is not enough resource to hold the lock request.\r | |
42 | **/\r | |
43 | typedef\r | |
44 | EFI_STATUS\r | |
45 | (EFIAPI * EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK) (\r | |
46 | IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,\r | |
47 | IN CHAR16 *VariableName,\r | |
48 | IN EFI_GUID *VendorGuid\r | |
49 | );\r | |
50 | \r | |
51 | ///\r | |
52 | /// Variable Lock Protocol is related to EDK II-specific implementation of variables\r | |
53 | /// and intended for use as a means to mark a variable read-only after the event\r | |
54 | /// EFI_END_OF_DXE_EVENT_GUID is signaled.\r | |
55 | ///\r | |
56 | struct _EDKII_VARIABLE_LOCK_PROTOCOL {\r | |
57 | EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK RequestToLock;\r | |
58 | };\r | |
59 | \r | |
60 | extern EFI_GUID gEdkiiVariableLockProtocolGuid;\r | |
61 | \r | |
62 | #endif \r | |
63 | \r |