TianoCore EDK2 master
Loading...
Searching...
No Matches
PiSmmCore.h
Go to the documentation of this file.
1
10#ifndef _SMM_CORE_H_
11#define _SMM_CORE_H_
12
13#include <PiSmm.h>
14
18#include <Protocol/CpuIo2.h>
20#include <Protocol/SmmAccess2.h>
23#include <Protocol/DevicePath.h>
24#include <Protocol/Security.h>
25#include <Protocol/Security2.h>
31
32#include <Guid/Apriori.h>
33#include <Guid/EventGroup.h>
35#include <Guid/MemoryProfile.h>
38#include <Guid/EndOfS3Resume.h>
39#include <Guid/S3SmmInitDone.h>
40
41#include <Library/BaseLib.h>
43#include <Library/PeCoffLib.h>
46#include <Library/DebugLib.h>
50#include <Library/UefiLib.h>
52#include <Library/PcdLib.h>
55#include <Library/HobLib.h>
56#include <Library/SmmMemLib.h>
57#include <Library/SafeIntLib.h>
58
60#include "HeapGuard.h"
61
62//
63// Used to build a table of SMI Handlers that the SMM Core registers
64//
65typedef struct {
66 EFI_SMM_HANDLER_ENTRY_POINT2 Handler;
67 EFI_GUID *HandlerType;
68 EFI_HANDLE DispatchHandle;
69 BOOLEAN UnRegister;
71
72//
73// SMM_HANDLER - used for each SMM handler
74//
75
76#define SMI_ENTRY_SIGNATURE SIGNATURE_32('s','m','i','e')
77
78typedef struct {
79 UINTN Signature;
80 LIST_ENTRY AllEntries; // All entries
81
82 EFI_GUID HandlerType; // Type of interrupt
83 LIST_ENTRY SmiHandlers; // All handlers
84} SMI_ENTRY;
85
86#define SMI_HANDLER_SIGNATURE SIGNATURE_32('s','m','i','h')
87
88typedef struct {
89 UINTN Signature;
90 LIST_ENTRY Link; // Link on SMI_ENTRY.SmiHandlers
91 EFI_SMM_HANDLER_ENTRY_POINT2 Handler; // The smm handler's entry point
92 UINTN CallerAddr; // The address of caller who register the SMI handler.
93 SMI_ENTRY *SmiEntry;
94 VOID *Context; // for profile
95 UINTN ContextSize; // for profile
96 BOOLEAN ToRemove; // To remove this SMI_HANDLER later
98
99//
100// Structure for recording the state of an SMM Driver
101//
102#define EFI_SMM_DRIVER_ENTRY_SIGNATURE SIGNATURE_32('s', 'd','r','v')
103
104typedef struct {
105 UINTN Signature;
106 LIST_ENTRY Link; // mDriverList
107
108 LIST_ENTRY ScheduledLink; // mScheduledQueue
109
110 EFI_HANDLE FvHandle;
111 EFI_GUID FileName;
112 EFI_DEVICE_PATH_PROTOCOL *FvFileDevicePath;
114
115 VOID *Depex;
116 UINTN DepexSize;
117
118 BOOLEAN Before;
119 BOOLEAN After;
120 EFI_GUID BeforeAfterGuid;
121
122 BOOLEAN Dependent;
123 BOOLEAN Scheduled;
124 BOOLEAN Initialized;
125 BOOLEAN DepexProtocolError;
126
127 EFI_HANDLE ImageHandle;
128 EFI_LOADED_IMAGE_PROTOCOL *LoadedImage;
129 //
130 // Image EntryPoint in SMRAM
131 //
132 PHYSICAL_ADDRESS ImageEntryPoint;
133 //
134 // Image Buffer in SMRAM
135 //
136 PHYSICAL_ADDRESS ImageBuffer;
137 //
138 // Image Page Number
139 //
140 UINTN NumberOfPage;
141 EFI_HANDLE SmmImageHandle;
142 EFI_LOADED_IMAGE_PROTOCOL SmmLoadedImage;
144
145#define EFI_HANDLE_SIGNATURE SIGNATURE_32('s','h','d','l')
146
150typedef struct {
151 UINTN Signature;
155 LIST_ENTRY Protocols;
156 UINTN LocateRequest;
157} IHANDLE;
158
159#define ASSERT_IS_HANDLE(a) ASSERT((a)->Signature == EFI_HANDLE_SIGNATURE)
160
161#define PROTOCOL_ENTRY_SIGNATURE SIGNATURE_32('s','p','t','e')
162
168typedef struct {
169 UINTN Signature;
171 LIST_ENTRY AllEntries;
173 EFI_GUID ProtocolID;
175 LIST_ENTRY Protocols;
177 LIST_ENTRY Notify;
179
180#define PROTOCOL_INTERFACE_SIGNATURE SIGNATURE_32('s','p','i','f')
181
186typedef struct {
187 UINTN Signature;
189 LIST_ENTRY Link;
191 IHANDLE *Handle;
195 PROTOCOL_ENTRY *Protocol;
197 VOID *Interface;
199
200#define PROTOCOL_NOTIFY_SIGNATURE SIGNATURE_32('s','p','t','n')
201
205typedef struct {
206 UINTN Signature;
207 PROTOCOL_ENTRY *Protocol;
209 LIST_ENTRY Link;
211 EFI_SMM_NOTIFY_FN Function;
213 LIST_ENTRY *Position;
215
216//
217// SMM Core Global Variables
218//
219extern SMM_CORE_PRIVATE_DATA *gSmmCorePrivate;
220extern EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst;
221extern LIST_ENTRY gHandleList;
222extern EFI_PHYSICAL_ADDRESS gLoadModuleAtFixAddressSmramBase;
223
231VOID
233 IN UINTN SmramRangeCount,
234 IN EFI_SMRAM_DESCRIPTOR *SmramRanges
235 );
236
255EFIAPI
257 IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable,
258 IN CONST EFI_GUID *Guid,
259 IN VOID *Table,
260 IN UINTN TableSize
261 );
262
278EFIAPI
280 IN OUT EFI_HANDLE *UserHandle,
281 IN EFI_GUID *Protocol,
282 IN EFI_INTERFACE_TYPE InterfaceType,
283 IN VOID *Interface
284 );
285
303EFIAPI
306 IN EFI_MEMORY_TYPE MemoryType,
307 IN UINTN NumberOfPages,
309 );
310
329EFIAPI
332 IN EFI_MEMORY_TYPE MemoryType,
333 IN UINTN NumberOfPages,
335 IN BOOLEAN NeedGuard
336 );
337
350EFIAPI
353 IN UINTN NumberOfPages
354 );
355
370EFIAPI
373 IN UINTN NumberOfPages,
374 IN BOOLEAN IsGuarded
375 );
376
391EFIAPI
393 IN EFI_MEMORY_TYPE PoolType,
394 IN UINTN Size,
395 OUT VOID **Buffer
396 );
397
412EFIAPI
414 IN EFI_MEMORY_TYPE PoolType,
415 IN UINTN Size,
416 OUT VOID **Buffer
417 );
418
429EFIAPI
431 IN VOID *Buffer
432 );
433
444EFIAPI
446 IN VOID *Buffer
447 );
448
468 IN OUT EFI_HANDLE *UserHandle,
469 IN EFI_GUID *Protocol,
470 IN EFI_INTERFACE_TYPE InterfaceType,
471 IN VOID *Interface,
472 IN BOOLEAN Notify
473 );
474
489EFIAPI
491 IN EFI_HANDLE UserHandle,
492 IN EFI_GUID *Protocol,
493 IN VOID *Interface
494 );
495
508EFIAPI
510 IN EFI_HANDLE UserHandle,
511 IN EFI_GUID *Protocol,
512 OUT VOID **Interface
513 );
514
529EFIAPI
531 IN CONST EFI_GUID *Protocol,
532 IN EFI_SMM_NOTIFY_FN Function,
533 OUT VOID **Registration
534 );
535
555EFIAPI
557 IN EFI_LOCATE_SEARCH_TYPE SearchType,
558 IN EFI_GUID *Protocol OPTIONAL,
559 IN VOID *SearchKey OPTIONAL,
560 IN OUT UINTN *BufferSize,
561 OUT EFI_HANDLE *Buffer
562 );
563
581EFIAPI
583 IN EFI_GUID *Protocol,
584 IN VOID *Registration OPTIONAL,
585 OUT VOID **Interface
586 );
587
611EFIAPI
613 IN EFI_LOCATE_SEARCH_TYPE SearchType,
614 IN EFI_GUID *Protocol OPTIONAL,
615 IN VOID *SearchKey OPTIONAL,
616 IN OUT UINTN *NumberHandles,
617 OUT EFI_HANDLE **Buffer
618 );
619
635EFIAPI
636SmiManage (
637 IN CONST EFI_GUID *HandlerType,
638 IN CONST VOID *Context OPTIONAL,
639 IN OUT VOID *CommBuffer OPTIONAL,
640 IN OUT UINTN *CommBufferSize OPTIONAL
641 );
642
655EFIAPI
657 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
658 IN CONST EFI_GUID *HandlerType OPTIONAL,
659 OUT EFI_HANDLE *DispatchHandle
660 );
661
672EFIAPI
674 IN EFI_HANDLE DispatchHandle
675 );
676
691EFIAPI
693 IN EFI_HANDLE DispatchHandle,
694 IN CONST VOID *Context OPTIONAL,
695 IN OUT VOID *CommBuffer OPTIONAL,
696 IN OUT UINTN *CommBufferSize OPTIONAL
697 );
698
713EFIAPI
715 IN EFI_HANDLE DispatchHandle,
716 IN CONST VOID *Context OPTIONAL,
717 IN OUT VOID *CommBuffer OPTIONAL,
718 IN OUT UINTN *CommBufferSize OPTIONAL
719 );
720
735EFIAPI
737 IN EFI_HANDLE DispatchHandle,
738 IN CONST VOID *Context OPTIONAL,
739 IN OUT VOID *CommBuffer OPTIONAL,
740 IN OUT UINTN *CommBufferSize OPTIONAL
741 );
742
757EFIAPI
759 IN EFI_HANDLE DispatchHandle,
760 IN CONST VOID *Context OPTIONAL,
761 IN OUT VOID *CommBuffer OPTIONAL,
762 IN OUT UINTN *CommBufferSize OPTIONAL
763 );
764
779EFIAPI
781 IN EFI_HANDLE DispatchHandle,
782 IN CONST VOID *Context OPTIONAL,
783 IN OUT VOID *CommBuffer OPTIONAL,
784 IN OUT UINTN *CommBufferSize OPTIONAL
785 );
786
801EFIAPI
803 IN EFI_HANDLE DispatchHandle,
804 IN CONST VOID *Context OPTIONAL,
805 IN OUT VOID *CommBuffer OPTIONAL,
806 IN OUT UINTN *CommBufferSize OPTIONAL
807 );
808
824EFIAPI
826 IN EFI_HANDLE DispatchHandle,
827 IN CONST VOID *Context OPTIONAL,
828 IN OUT VOID *CommBuffer OPTIONAL,
829 IN OUT UINTN *CommBufferSize OPTIONAL
830 );
831
847EFIAPI
849 IN EFI_HANDLE DispatchHandle,
850 IN CONST VOID *Context OPTIONAL,
851 IN OUT VOID *CommBuffer OPTIONAL,
852 IN OUT UINTN *CommBufferSize OPTIONAL
853 );
854
868EFIAPI
870 UINTN Arg1,
871 UINTN Arg2,
872 UINTN Arg3,
873 UINTN Arg4,
874 UINTN Arg5
875 );
876
877//
878// Functions used during debug builds
879//
880
886VOID
888 VOID
889 );
890
900VOID
902 IN EFI_PHYSICAL_ADDRESS MemBase,
903 IN UINT64 MemLength,
904 IN EFI_MEMORY_TYPE Type,
905 IN UINT64 Attributes
906 );
907
919 IN EFI_GUID *Protocol,
920 IN BOOLEAN Create
921 );
922
929VOID
932 );
933
948 IN IHANDLE *Handle,
949 IN EFI_GUID *Protocol,
950 IN VOID *Interface
951 );
952
965 IN IHANDLE *Handle,
966 IN EFI_GUID *Protocol,
967 IN VOID *Interface
968 );
969
982BOOLEAN
985 );
986
987//
988// SmramProfile
989//
990
995VOID
997 VOID
998 );
999
1004VOID
1006 VOID
1007 );
1008
1024 IN BOOLEAN RegisterToDxe
1025 );
1026
1042 IN BOOLEAN UnregisterToDxe
1043 );
1044
1068EFIAPI
1070 IN PHYSICAL_ADDRESS CallerAddress,
1071 IN MEMORY_PROFILE_ACTION Action,
1072 IN EFI_MEMORY_TYPE MemoryType, // Valid for AllocatePages/AllocatePool
1073 IN UINTN Size, // Valid for AllocatePages/FreePages/AllocatePool
1074 IN VOID *Buffer,
1075 IN CHAR8 *ActionString OPTIONAL
1076 );
1077
1082VOID
1084 VOID
1085 );
1086
1091VOID
1093 VOID
1094 );
1095
1099VOID
1100EFIAPI
1102 VOID
1103 );
1104
1136EFIAPI
1138 IN OUT UINTN *MemoryMapSize,
1139 IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap,
1140 OUT UINTN *MapKey,
1141 OUT UINTN *DescriptorSize,
1142 OUT UINT32 *DescriptorVersion
1143 );
1144
1148VOID
1150 VOID
1151 );
1152
1174EFIAPI
1177 IN EFI_GUID *HandlerGuid,
1178 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
1179 IN PHYSICAL_ADDRESS CallerAddress,
1180 IN VOID *Context OPTIONAL,
1181 IN UINTN ContextSize OPTIONAL
1182 );
1183
1202EFIAPI
1205 IN EFI_GUID *HandlerGuid,
1206 IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler,
1207 IN VOID *Context OPTIONAL,
1208 IN UINTN ContextSize OPTIONAL
1209 );
1210
1211extern UINTN mFullSmramRangeCount;
1212extern EFI_SMRAM_DESCRIPTOR *mFullSmramRanges;
1213
1214extern EFI_SMM_DRIVER_ENTRY *mSmmCoreDriverEntry;
1215
1216extern EFI_LOADED_IMAGE_PROTOCOL *mSmmCoreLoadedImage;
1217
1218//
1219// Page management
1220//
1221
1222typedef struct {
1223 LIST_ENTRY Link;
1224 UINTN NumberOfPages;
1226
1227extern LIST_ENTRY mSmmMemoryMap;
1228
1229//
1230// Pool management
1231//
1232
1233//
1234// MIN_POOL_SHIFT must not be less than 5
1235//
1236#define MIN_POOL_SHIFT 6
1237#define MIN_POOL_SIZE (1 << MIN_POOL_SHIFT)
1238
1239//
1240// MAX_POOL_SHIFT must not be less than EFI_PAGE_SHIFT - 1
1241//
1242#define MAX_POOL_SHIFT (EFI_PAGE_SHIFT - 1)
1243#define MAX_POOL_SIZE (1 << MAX_POOL_SHIFT)
1244
1245//
1246// MAX_POOL_INDEX are calculated by maximum and minimum pool sizes
1247//
1248#define MAX_POOL_INDEX (MAX_POOL_SHIFT - MIN_POOL_SHIFT + 1)
1249
1250#define POOL_HEAD_SIGNATURE SIGNATURE_32('s','p','h','d')
1251
1252typedef struct {
1253 UINT32 Signature;
1254 BOOLEAN Available;
1255 EFI_MEMORY_TYPE Type;
1256 UINTN Size;
1257} POOL_HEADER;
1258
1259#define POOL_TAIL_SIGNATURE SIGNATURE_32('s','p','t','l')
1260
1261typedef struct {
1262 UINT32 Signature;
1263 UINT32 Reserved;
1264 UINTN Size;
1265} POOL_TAIL;
1266
1267#define POOL_OVERHEAD (sizeof(POOL_HEADER) + sizeof(POOL_TAIL))
1268
1269#define HEAD_TO_TAIL(a) \
1270 ((POOL_TAIL *) (((CHAR8 *) (a)) + (a)->Size - sizeof(POOL_TAIL)));
1271
1272typedef struct {
1273 POOL_HEADER Header;
1274 LIST_ENTRY Link;
1276
1277typedef enum {
1278 SmmPoolTypeCode,
1279 SmmPoolTypeData,
1280 SmmPoolTypeMax,
1281} SMM_POOL_TYPE;
1282
1283extern LIST_ENTRY mSmmPoolLists[SmmPoolTypeMax][MAX_POOL_INDEX];
1284
1295UINTN
1297 IN OUT FREE_PAGE_LIST *Pages,
1298 IN UINTN NumberOfPages,
1299 IN UINTN MaxAddress
1300 );
1301
1310VOID
1312 IN EFI_MEMORY_TYPE Type,
1313 IN EFI_PHYSICAL_ADDRESS Memory,
1314 IN UINTN NumberOfPages,
1315 IN BOOLEAN AddRegion
1316 );
1317
1323VOID
1325 VOID
1326 );
1327
1342 IN EFI_PHYSICAL_ADDRESS Memory,
1343 IN UINTN NumberOfPages,
1344 IN BOOLEAN AddRegion
1345 );
1346
1350VOID
1352 VOID
1353 );
1354
1355#endif
UINT64 UINTN
#define CONST
Definition: Base.h:259
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
PROTOCOL_INTERFACE * SmmFindProtocolInterface(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
Definition: Handle.c:122
VOID CoreFreeMemoryMapStack(VOID)
Definition: Page.c:314
EFI_STATUS EFIAPI SmmInstallConfigurationTable(IN CONST EFI_SMM_SYSTEM_TABLE2 *SystemTable, IN CONST EFI_GUID *Guid, IN VOID *Table, IN UINTN TableSize)
VOID SmramProfileReadyToLock(VOID)
VOID SmmDisplayDiscoveredNotDispatched(VOID)
Definition: Dispatcher.c:1526
EFI_STATUS EFIAPI SmmFreePages(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages)
Definition: Page.c:934
EFI_STATUS EFIAPI SmiManage(IN CONST EFI_GUID *HandlerType, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: Smi.c:137
VOID SmramProfileInstallProtocol(VOID)
EFI_STATUS EFIAPI SmmUninstallProtocolInterface(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, IN VOID *Interface)
Definition: Handle.c:366
VOID SmmCoreInitializeSmiHandlerProfile(VOID)
EFI_STATUS EFIAPI SmmS3SmmInitDoneHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:510
EFI_STATUS UnregisterSmramProfileImage(IN EFI_SMM_DRIVER_ENTRY *DriverEntry, IN BOOLEAN UnregisterToDxe)
EFI_STATUS EFIAPI SmmInternalFreePool(IN VOID *Buffer)
Definition: Pool.c:372
EFI_STATUS EFIAPI SmmLocateProtocol(IN EFI_GUID *Protocol, IN VOID *Registration OPTIONAL, OUT VOID **Interface)
Definition: Locate.c:194
UINTN InternalAllocPagesOnOneNode(IN OUT FREE_PAGE_LIST *Pages, IN UINTN NumberOfPages, IN UINTN MaxAddress)
Definition: Page.c:463
VOID SmmNotifyProtocol(IN PROTOCOL_INTERFACE *Prot)
Definition: Notify.c:18
EFI_STATUS EFIAPI SmmHandleProtocol(IN EFI_HANDLE UserHandle, IN EFI_GUID *Protocol, OUT VOID **Interface)
Definition: Handle.c:491
EFI_STATUS SmmInternalFreePagesEx(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages, IN BOOLEAN AddRegion)
Definition: Page.c:797
EFI_STATUS EFIAPI SmiHandlerUnRegister(IN EFI_HANDLE DispatchHandle)
Definition: Smi.c:394
VOID ConvertSmmMemoryMapEntry(IN EFI_MEMORY_TYPE Type, IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages, IN BOOLEAN AddRegion)
Definition: Page.c:256
EFI_STATUS EFIAPI SmmInternalAllocatePool(IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)
Definition: Pool.c:235
EFI_STATUS EFIAPI SmmFreePool(IN VOID *Buffer)
Definition: Pool.c:445
EFI_STATUS EFIAPI SmiHandlerProfileRegisterHandler(IN SMI_HANDLER_PROFILE_PROTOCOL *This, IN EFI_GUID *HandlerGuid, IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, IN PHYSICAL_ADDRESS CallerAddress, IN VOID *Context OPTIONAL, IN UINTN ContextSize OPTIONAL)
EFI_STATUS EFIAPI SmmAllocatePool(IN EFI_MEMORY_TYPE PoolType, IN UINTN Size, OUT VOID **Buffer)
Definition: Pool.c:338
EFI_STATUS EFIAPI SmmInstallProtocolInterface(IN OUT EFI_HANDLE *UserHandle, IN EFI_GUID *Protocol, IN EFI_INTERFACE_TYPE InterfaceType, IN VOID *Interface)
Definition: Handle.c:174
EFI_STATUS SmmInstallProtocolInterfaceNotify(IN OUT EFI_HANDLE *UserHandle, IN EFI_GUID *Protocol, IN EFI_INTERFACE_TYPE InterfaceType, IN VOID *Interface, IN BOOLEAN Notify)
Definition: Handle.c:208
VOID RegisterSmramProfileHandler(VOID)
EFI_STATUS EFIAPI SmmInternalAllocatePages(IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN NumberOfPages, OUT EFI_PHYSICAL_ADDRESS *Memory, IN BOOLEAN NeedGuard)
Definition: Page.c:687
EFI_STATUS EFIAPI SmmAllocatePages(IN EFI_ALLOCATE_TYPE Type, IN EFI_MEMORY_TYPE MemoryType, IN UINTN NumberOfPages, OUT EFI_PHYSICAL_ADDRESS *Memory)
Definition: Page.c:723
EFI_STATUS EFIAPI SmmEndOfS3ResumeHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:569
PROTOCOL_INTERFACE * SmmRemoveInterfaceFromProtocol(IN IHANDLE *Handle, IN EFI_GUID *Protocol, IN VOID *Interface)
Definition: Notify.c:44
EFI_STATUS EFIAPI SmmLocateHandle(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *BufferSize, OUT EFI_HANDLE *Buffer)
Definition: Locate.c:271
EFI_STATUS EFIAPI SmmReadyToLockHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:346
EFI_STATUS EFIAPI SmmEfiNotAvailableYetArg5(UINTN Arg1, UINTN Arg2, UINTN Arg3, UINTN Arg4, UINTN Arg5)
Definition: PiSmmCore.c:125
EFI_STATUS EFIAPI SmmLocateHandleBuffer(IN EFI_LOCATE_SEARCH_TYPE SearchType, IN EFI_GUID *Protocol OPTIONAL, IN VOID *SearchKey OPTIONAL, IN OUT UINTN *NumberHandles, OUT EFI_HANDLE **Buffer)
Definition: Locate.c:435
EFI_STATUS EFIAPI SmmInternalFreePages(IN EFI_PHYSICAL_ADDRESS Memory, IN UINTN NumberOfPages, IN BOOLEAN IsGuarded)
Definition: Page.c:873
BOOLEAN SmmIsSchedulable(IN EFI_SMM_DRIVER_ENTRY *DriverEntry)
Definition: Dependency.c:168
VOID SmramProfileInit(VOID)
VOID SmmAddMemoryRegion(IN EFI_PHYSICAL_ADDRESS MemBase, IN UINT64 MemLength, IN EFI_MEMORY_TYPE Type, IN UINT64 Attributes)
Definition: Page.c:972
VOID EFIAPI SmmCoreInitializeMemoryAttributesTable(VOID)
EFI_STATUS EFIAPI SmmDriverDispatchHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: Dispatcher.c:1284
EFI_STATUS EFIAPI SmiHandlerProfileUnregisterHandler(IN SMI_HANDLER_PROFILE_PROTOCOL *This, IN EFI_GUID *HandlerGuid, IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, IN VOID *Context OPTIONAL, IN UINTN ContextSize OPTIONAL)
EFI_STATUS EFIAPI SmiHandlerRegister(IN EFI_SMM_HANDLER_ENTRY_POINT2 Handler, IN CONST EFI_GUID *HandlerType OPTIONAL, OUT EFI_HANDLE *DispatchHandle)
Definition: Smi.c:334
PROTOCOL_ENTRY * SmmFindProtocolEntry(IN EFI_GUID *Protocol, IN BOOLEAN Create)
Definition: Handle.c:56
EFI_STATUS EFIAPI SmmCoreUpdateProfile(IN PHYSICAL_ADDRESS CallerAddress, IN MEMORY_PROFILE_ACTION Action, IN EFI_MEMORY_TYPE MemoryType, IN UINTN Size, IN VOID *Buffer, IN CHAR8 *ActionString OPTIONAL)
VOID SmmEntryPointMemoryManagementHook(VOID)
Definition: HeapGuard.c:1218
EFI_STATUS EFIAPI SmmEndOfDxeHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:436
EFI_STATUS EFIAPI SmmExitBootServicesHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:214
EFI_STATUS EFIAPI SmmReadyToBootHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:298
EFI_STATUS EFIAPI SmmLegacyBootHandler(IN EFI_HANDLE DispatchHandle, IN CONST VOID *Context OPTIONAL, IN OUT VOID *CommBuffer OPTIONAL, IN OUT UINTN *CommBufferSize OPTIONAL)
Definition: PiSmmCore.c:159
EFI_STATUS EFIAPI SmmRegisterProtocolNotify(IN CONST EFI_GUID *Protocol, IN EFI_SMM_NOTIFY_FN Function, OUT VOID **Registration)
Definition: Notify.c:96
VOID SmmInitializeMemoryServices(IN UINTN SmramRangeCount, IN EFI_SMRAM_DESCRIPTOR *SmramRanges)
Definition: Pool.c:49
EFI_STATUS EFIAPI SmmCoreGetMemoryMap(IN OUT UINTN *MemoryMapSize, IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion)
Definition: Page.c:1042
EFI_STATUS RegisterSmramProfileImage(IN EFI_SMM_DRIVER_ENTRY *DriverEntry, IN BOOLEAN RegisterToDxe)
EFI_STATUS EFIAPI DriverEntry(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
Definition: TdTcg2Dxe.c:2427
UINT64 EFI_PHYSICAL_ADDRESS
Definition: UefiBaseType.h:50
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_HANDLE
Definition: UefiBaseType.h:33
EFI_MEMORY_TYPE
EFI_INTERFACE_TYPE
Definition: UefiSpec.h:1189
EFI_LOCATE_SEARCH_TYPE
Definition: UefiSpec.h:1505
@ ByProtocol
Definition: UefiSpec.h:1518
@ AllHandles
Definition: UefiSpec.h:1509
EFI_ALLOCATE_TYPE
Definition: UefiSpec.h:29
Definition: Base.h:213
Definition: Handle.h:17
Definition: Pool.c:35
EFI_SMM_NOTIFY_FN Function
Notification function.
Definition: PiSmmCore.h:211