]>
Commit | Line | Data |
---|---|---|
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 | |
31 | VOID\r | |
32 | EFIAPI\r | |
33 | SecureBootHook (\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 | |
44 | EFI_STATUS\r | |
45 | MorLockInit (\r | |
46 | VOID\r | |
47 | );\r | |
48 | \r | |
f1304280 LE |
49 | /**\r |
50 | Delayed initialization for MOR Control Lock at EndOfDxe.\r | |
51 | \r | |
52 | This function performs any operations queued by MorLockInit().\r | |
53 | **/\r | |
54 | VOID\r | |
55 | MorLockInitAtEndOfDxe (\r | |
56 | VOID\r | |
57 | );\r | |
58 | \r | |
03877377 LE |
59 | /**\r |
60 | This service is an MOR/MorLock checker handler for the SetVariable().\r | |
61 | \r | |
62 | @param[in] VariableName the name of the vendor's variable, as a\r | |
63 | Null-Terminated Unicode String\r | |
64 | @param[in] VendorGuid Unify identifier for vendor.\r | |
65 | @param[in] Attributes Attributes bitmask to set for the variable.\r | |
66 | @param[in] DataSize The size in bytes of Data-Buffer.\r | |
67 | @param[in] Data Point to the content of the variable.\r | |
68 | \r | |
69 | @retval EFI_SUCCESS The MOR/MorLock check pass, and Variable\r | |
70 | driver can store the variable data.\r | |
71 | @retval EFI_INVALID_PARAMETER The MOR/MorLock data or data size or\r | |
72 | attributes is not allowed for MOR variable.\r | |
73 | @retval EFI_ACCESS_DENIED The MOR/MorLock is locked.\r | |
74 | @retval EFI_ALREADY_STARTED The MorLock variable is handled inside this\r | |
75 | function. Variable driver can just return\r | |
76 | EFI_SUCCESS.\r | |
77 | **/\r | |
78 | EFI_STATUS\r | |
79 | SetVariableCheckHandlerMor (\r | |
80 | IN CHAR16 *VariableName,\r | |
81 | IN EFI_GUID *VendorGuid,\r | |
82 | IN UINT32 Attributes,\r | |
83 | IN UINTN DataSize,\r | |
84 | IN VOID *Data\r | |
85 | );\r | |
86 | \r | |
00663d04 | 87 | #endif\r |