]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.c
MdeModulePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / RuntimeDxe / VariableStandaloneMm.c
1 /** @file
2
3 Parts of the SMM/MM implementation that are specific to standalone MM
4
5 Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved. <BR>
6 Copyright (c) 2018, Linaro, Ltd. All rights reserved. <BR>
7 SPDX-License-Identifier: BSD-2-Clause-Patent
8
9 **/
10
11 #include "Variable.h"
12
13 /**
14 This function checks if the buffer is valid per processor architecture and
15 does not overlap with SMRAM.
16
17 @param Buffer The buffer start address to be checked.
18 @param Length The buffer length to be checked.
19
20 @retval TRUE This buffer is valid per processor architecture and does not
21 overlap with SMRAM.
22 @retval FALSE This buffer is not valid per processor architecture or overlaps
23 with SMRAM.
24 **/
25 BOOLEAN
26 VariableSmmIsBufferOutsideSmmValid (
27 IN EFI_PHYSICAL_ADDRESS Buffer,
28 IN UINT64 Length
29 )
30 {
31 return TRUE;
32 }
33
34 /**
35 Notify the system that the SMM variable driver is ready.
36 **/
37 VOID
38 VariableNotifySmmReady (
39 VOID
40 )
41 {
42 }
43
44 /**
45 Notify the system that the SMM variable write driver is ready.
46 **/
47 VOID
48 VariableNotifySmmWriteReady (
49 VOID
50 )
51 {
52 }
53
54 /**
55 Variable service MM driver entry point.
56
57 @param[in] ImageHandle A handle for the image that is initializing this
58 driver
59 @param[in] MmSystemTable A pointer to the MM system table
60
61 @retval EFI_SUCCESS Variable service successfully initialized.
62 **/
63 EFI_STATUS
64 EFIAPI
65 VariableServiceInitialize (
66 IN EFI_HANDLE ImageHandle,
67 IN EFI_MM_SYSTEM_TABLE *MmSystemTable
68 )
69 {
70 return MmVariableServiceInitialize ();
71 }
72
73 /**
74 Whether the TCG or TCG2 protocols are installed in the UEFI protocol database.
75 This information is used by the MorLock code to infer whether an existing
76 MOR variable is legitimate or not.
77
78 @retval TRUE Either the TCG or TCG2 protocol is installed in the UEFI
79 protocol database
80 @retval FALSE Neither the TCG nor the TCG2 protocol is installed in the UEFI
81 protocol database
82 **/
83 BOOLEAN
84 VariableHaveTcgProtocols (
85 VOID
86 )
87 {
88 return FALSE;
89 }