]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Include/Protocol/VariableLock.h
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / VariableLock.h
CommitLineData
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
d1102dba 6 Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.<BR>\r
9d510e61 7 SPDX-License-Identifier: BSD-2-Clause-Patent\r
ff843847
RN
8\r
9**/\r
10\r
11#ifndef __VARIABLE_LOCK_H__\r
12#define __VARIABLE_LOCK_H__\r
13\r
14#define EDKII_VARIABLE_LOCK_PROTOCOL_GUID \\r
15 { \\r
16 0xcd3d0a05, 0x9e24, 0x437c, { 0xa8, 0x91, 0x1e, 0xe0, 0x53, 0xdb, 0x76, 0x38 } \\r
17 }\r
18\r
19typedef struct _EDKII_VARIABLE_LOCK_PROTOCOL EDKII_VARIABLE_LOCK_PROTOCOL;\r
20\r
21/**\r
22 Mark a variable that will become read-only after leaving the DXE phase of execution.\r
23 Write request coming from SMM environment through EFI_SMM_VARIABLE_PROTOCOL is allowed.\r
24\r
25 @param[in] This The EDKII_VARIABLE_LOCK_PROTOCOL instance.\r
26 @param[in] VariableName A pointer to the variable name that will be made read-only subsequently.\r
27 @param[in] VendorGuid A pointer to the vendor GUID that will be made read-only subsequently.\r
28\r
29 @retval EFI_SUCCESS The variable specified by the VariableName and the VendorGuid was marked\r
30 as pending to be read-only.\r
31 @retval EFI_INVALID_PARAMETER VariableName or VendorGuid is NULL.\r
32 Or VariableName is an empty string.\r
33 @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has\r
34 already been signaled.\r
35 @retval EFI_OUT_OF_RESOURCES There is not enough resource to hold the lock request.\r
36**/\r
37typedef\r
38EFI_STATUS\r
39(EFIAPI * EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK) (\r
40 IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,\r
41 IN CHAR16 *VariableName,\r
42 IN EFI_GUID *VendorGuid\r
43 );\r
44\r
45///\r
46/// Variable Lock Protocol is related to EDK II-specific implementation of variables\r
47/// and intended for use as a means to mark a variable read-only after the event\r
48/// EFI_END_OF_DXE_EVENT_GUID is signaled.\r
49///\r
50struct _EDKII_VARIABLE_LOCK_PROTOCOL {\r
51 EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK RequestToLock;\r
52};\r
53\r
54extern EFI_GUID gEdkiiVariableLockProtocolGuid;\r
55\r
d1102dba 56#endif\r
ff843847 57\r