summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
diff options
context:
space:
mode:
authormdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-16 07:04:58 +0300
committermdkinney <mdkinney@6f19259b-4bc3-4df7-8a09-765794883524>2010-02-16 07:04:58 +0300
commit300240b62bf138afba3b427d04111e75c01659c0 (patch)
tree9cc4afe32affabebbeb4e3909275acf99ba8c3d1 /MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
parent8e90dd6b5470bdf1016bf6dc2a8de0f9d5cdd1bf (diff)
downloadedk2-300240b62bf138afba3b427d04111e75c01659c0.tar.xz
Use Memory Allocation Library instance for modules of type DXE_SMM_DRIVER
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10013 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c')
-rw-r--r--MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
index 480cb6e500..aac19d4e6d 100644
--- a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
+++ b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c
@@ -1,7 +1,7 @@
/** @file
Report Status Code Library for SMM Phase.
- Copyright (c) 2009, Intel Corporation<BR>
+ Copyright (c) 2009 -2010, Intel Corporation<BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -18,6 +18,7 @@
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/PcdLib.h>
+#include <Library/MemoryAllocationLib.h>
#include <Guid/StatusCodeDataTypeId.h>
#include <Guid/StatusCodeDataTypeDebug.h>
@@ -436,15 +437,10 @@ ReportStatusCodeEx (
ASSERT (!((ExtendedData == NULL) && (ExtendedDataSize != 0)));
ASSERT (!((ExtendedData != NULL) && (ExtendedDataSize == 0)));
- if (gSmst == NULL || gSmst->SmmAllocatePool == NULL || gSmst->SmmFreePool == NULL) {
- return EFI_UNSUPPORTED;
- }
-
//
// Allocate space for the Status Code Header and its buffer
//
- StatusCodeData = NULL;
- gSmst->SmmAllocatePool (EfiRuntimeServicesData, sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize, (VOID **)&StatusCodeData);
+ StatusCodeData = AllocatePool (sizeof (EFI_STATUS_CODE_DATA) + ExtendedDataSize);
if (StatusCodeData == NULL) {
return EFI_OUT_OF_RESOURCES;
}
@@ -477,7 +473,7 @@ ReportStatusCodeEx (
//
// Free the allocated buffer
//
- gSmst->SmmFreePool (StatusCodeData);
+ FreePool (StatusCodeData);
return Status;
}