TianoCore EDK2 master
Loading...
Searching...
No Matches
VariableTraditionalMm.c
Go to the documentation of this file.
1
12#include <Library/SmmMemLib.h>
13#include "Variable.h"
14
24BOOLEAN
27 IN UINT64 Length
28 )
29{
30 return SmmIsBufferOutsideSmmValid (Buffer, Length);
31}
32
45BOOLEAN
48 IN UINT64 Length
49 )
50{
51 return SmmIsBufferOutsideSmmValid (Buffer, Length);
52}
53
57VOID
59 VOID
60 )
61{
62 EFI_STATUS Status;
63 EFI_HANDLE Handle;
64
65 Handle = NULL;
66 Status = gBS->InstallProtocolInterface (
67 &Handle,
68 &gEfiSmmVariableProtocolGuid,
70 NULL
71 );
72 ASSERT_EFI_ERROR (Status);
73}
74
78VOID
80 VOID
81 )
82{
83 EFI_STATUS Status;
84 EFI_HANDLE Handle;
85
86 Handle = NULL;
87 Status = gBS->InstallProtocolInterface (
88 &Handle,
89 &gSmmVariableWriteGuid,
91 NULL
92 );
93 ASSERT_EFI_ERROR (Status);
94}
95
106EFIAPI
108 IN EFI_HANDLE ImageHandle,
109 IN EFI_SYSTEM_TABLE *SystemTable
110 )
111{
113}
114
125BOOLEAN
127 VOID
128 )
129{
130 EFI_STATUS Status;
131 VOID *Interface;
132
133 Status = gBS->LocateProtocol (
134 &gEfiTcg2ProtocolGuid,
135 NULL, // Registration
136 &Interface
137 );
138 if (!EFI_ERROR (Status)) {
139 return TRUE;
140 }
141
142 Status = gBS->LocateProtocol (
143 &gEfiTcgProtocolGuid,
144 NULL, // Registration
145 &Interface
146 );
147 return !EFI_ERROR (Status);
148}
#define NULL
Definition: Base.h:319
#define TRUE
Definition: Base.h:301
#define IN
Definition: Base.h:279
#define ASSERT_EFI_ERROR(StatusParameter)
Definition: DebugLib.h:462
EFI_STATUS EFIAPI MmVariableServiceInitialize(VOID)
Definition: VariableSmm.c:1151
BOOLEAN EFIAPI SmmIsBufferOutsideSmmValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
Definition: SmmMemLib.c:114
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_BOOT_SERVICES * gBS
@ EFI_NATIVE_INTERFACE
Definition: UefiSpec.h:1193
BOOLEAN VariableSmmIsPrimaryBufferValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
VOID VariableNotifySmmReady(VOID)
BOOLEAN VariableIsMorVariableLegitimate(VOID)
EFI_STATUS EFIAPI VariableServiceInitialize(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
BOOLEAN VariableSmmIsNonPrimaryBufferValid(IN EFI_PHYSICAL_ADDRESS Buffer, IN UINT64 Length)
VOID VariableNotifySmmWriteReady(VOID)