+/** @file\r
+ Variable Lock Protocol is related to EDK II-specific implementation of variables\r
+ and intended for use as a means to mark a variable read-only after the event\r
+ EFI_END_OF_DXE_EVENT_GUID is signaled.\r
+\r
+ Copyright (c) 2013, Intel Corporation. All rights reserved.<BR>\r
+ This program and the accompanying materials \r
+ are licensed and made available under the terms and conditions of the BSD License \r
+ which accompanies this distribution. The full text of the license may be found at \r
+ http://opensource.org/licenses/bsd-license.php \r
+\r
+ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
+ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
+\r
+**/\r
+\r
+#ifndef __VARIABLE_LOCK_H__\r
+#define __VARIABLE_LOCK_H__\r
+\r
+#define EDKII_VARIABLE_LOCK_PROTOCOL_GUID \\r
+ { \\r
+ 0xcd3d0a05, 0x9e24, 0x437c, { 0xa8, 0x91, 0x1e, 0xe0, 0x53, 0xdb, 0x76, 0x38 } \\r
+ }\r
+\r
+typedef struct _EDKII_VARIABLE_LOCK_PROTOCOL EDKII_VARIABLE_LOCK_PROTOCOL;\r
+\r
+/**\r
+ Mark a variable that will become read-only after leaving the DXE phase of execution.\r
+ Write request coming from SMM environment through EFI_SMM_VARIABLE_PROTOCOL is allowed.\r
+\r
+ @param[in] This The EDKII_VARIABLE_LOCK_PROTOCOL instance.\r
+ @param[in] VariableName A pointer to the variable name that will be made read-only subsequently.\r
+ @param[in] VendorGuid A pointer to the vendor GUID that will be made read-only subsequently.\r
+\r
+ @retval EFI_SUCCESS The variable specified by the VariableName and the VendorGuid was marked\r
+ as pending to be read-only.\r
+ @retval EFI_INVALID_PARAMETER VariableName or VendorGuid is NULL.\r
+ Or VariableName is an empty string.\r
+ @retval EFI_ACCESS_DENIED EFI_END_OF_DXE_EVENT_GROUP_GUID or EFI_EVENT_GROUP_READY_TO_BOOT has\r
+ already been signaled.\r
+ @retval EFI_OUT_OF_RESOURCES There is not enough resource to hold the lock request.\r
+**/\r
+typedef\r
+EFI_STATUS\r
+(EFIAPI * EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK) (\r
+ IN CONST EDKII_VARIABLE_LOCK_PROTOCOL *This,\r
+ IN CHAR16 *VariableName,\r
+ IN EFI_GUID *VendorGuid\r
+ );\r
+\r
+///\r
+/// Variable Lock Protocol is related to EDK II-specific implementation of variables\r
+/// and intended for use as a means to mark a variable read-only after the event\r
+/// EFI_END_OF_DXE_EVENT_GUID is signaled.\r
+///\r
+struct _EDKII_VARIABLE_LOCK_PROTOCOL {\r
+ EDKII_VARIABLE_LOCK_PROTOCOL_REQUEST_TO_LOCK RequestToLock;\r
+};\r
+\r
+extern EFI_GUID gEdkiiVariableLockProtocolGuid;\r
+\r
+#endif \r
+\r