55 Status =
gBS->LocateProtocol (
56 &gEdkiiMemoryProfileGuid,
58 (VOID **)&mLibProfileProtocol
60 if (EFI_ERROR (Status)) {
61 mLibProfileProtocol =
NULL;
64 Status =
gSmst->SmmLocateProtocol (
65 &gEdkiiSmmMemoryProfileGuid,
67 (VOID **)&mLibSmmProfileProtocol
69 if (EFI_ERROR (Status)) {
70 mLibSmmProfileProtocol =
NULL;
101 IN PHYSICAL_ADDRESS CallerAddress,
102 IN MEMORY_PROFILE_ACTION Action,
106 IN CHAR8 *ActionString OPTIONAL
110 if (mLibSmmProfileProtocol ==
NULL) {
111 return EFI_UNSUPPORTED;
114 return mLibSmmProfileProtocol->Record (
115 mLibSmmProfileProtocol,
124 if (mLibProfileProtocol ==
NULL) {
125 return EFI_UNSUPPORTED;
128 return mLibProfileProtocol->Record (
EFI_SMM_SYSTEM_TABLE2 * gSmst
BOOLEAN EFIAPI BufferInSmram(IN VOID *Buffer)
EFI_STATUS EFIAPI SmmMemoryProfileLibConstructor(IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
EFI_STATUS EFIAPI MemoryProfileLibRecord(IN PHYSICAL_ADDRESS CallerAddress, IN MEMORY_PROFILE_ACTION Action, IN EFI_MEMORY_TYPE MemoryType, IN VOID *Buffer, IN UINTN Size, IN CHAR8 *ActionString OPTIONAL)