]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/Variable/RuntimeDxe/PrivilegePolymorphic.h
MdeModulePkg/Variable/RuntimeDxe: move MOR func. declarations to header
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / PrivilegePolymorphic.h
CommitLineData
00663d04
LE
1/** @file\r
2 Polymorphic functions that are called from both the privileged driver (i.e.,\r
3 the DXE_SMM variable module) and the non-privileged drivers (i.e., one or\r
4 both of the DXE_RUNTIME variable modules).\r
5\r
6 Each of these functions has two implementations, appropriate for privileged\r
7 vs. non-privileged driver code.\r
8\r
9 Copyright (c) 2017, Red Hat, Inc.<BR>\r
10 Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.<BR>\r
11\r
12 This program and the accompanying materials are licensed and made available\r
13 under the terms and conditions of the BSD License which accompanies this\r
14 distribution. The full text of the license may be found at\r
15 http://opensource.org/licenses/bsd-license.php\r
16\r
17 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT\r
18 WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
19**/\r
20#ifndef _PRIVILEGE_POLYMORPHIC_H_\r
21#define _PRIVILEGE_POLYMORPHIC_H_\r
22\r
23#include <Uefi/UefiBaseType.h>\r
24\r
25/**\r
26 SecureBoot Hook for auth variable update.\r
27\r
28 @param[in] VariableName Name of Variable to be found.\r
29 @param[in] VendorGuid Variable vendor GUID.\r
30**/\r
31VOID\r
32EFIAPI\r
33SecureBootHook (\r
34 IN CHAR16 *VariableName,\r
35 IN EFI_GUID *VendorGuid\r
36 );\r
37\r
03877377
LE
38/**\r
39 Initialization for MOR Control Lock.\r
40\r
41 @retval EFI_SUCCESS MorLock initialization success.\r
42 @return Others Some error occurs.\r
43**/\r
44EFI_STATUS\r
45MorLockInit (\r
46 VOID\r
47 );\r
48\r
49/**\r
50 This service is an MOR/MorLock checker handler for the SetVariable().\r
51\r
52 @param[in] VariableName the name of the vendor's variable, as a\r
53 Null-Terminated Unicode String\r
54 @param[in] VendorGuid Unify identifier for vendor.\r
55 @param[in] Attributes Attributes bitmask to set for the variable.\r
56 @param[in] DataSize The size in bytes of Data-Buffer.\r
57 @param[in] Data Point to the content of the variable.\r
58\r
59 @retval EFI_SUCCESS The MOR/MorLock check pass, and Variable\r
60 driver can store the variable data.\r
61 @retval EFI_INVALID_PARAMETER The MOR/MorLock data or data size or\r
62 attributes is not allowed for MOR variable.\r
63 @retval EFI_ACCESS_DENIED The MOR/MorLock is locked.\r
64 @retval EFI_ALREADY_STARTED The MorLock variable is handled inside this\r
65 function. Variable driver can just return\r
66 EFI_SUCCESS.\r
67**/\r
68EFI_STATUS\r
69SetVariableCheckHandlerMor (\r
70 IN CHAR16 *VariableName,\r
71 IN EFI_GUID *VendorGuid,\r
72 IN UINT32 Attributes,\r
73 IN UINTN DataSize,\r
74 IN VOID *Data\r
75 );\r
76\r
00663d04 77#endif\r