Report Status Code Router Driver which produces SMM Report Stataus Code Handler Protocol\r
and SMM Status Code Protocol.\r
\r
- Copyright (c) 2009, Intel Corporation\r
+ Copyright (c) 2009 -2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN EFI_SMM_RSC_HANDLER_CALLBACK Callback\r
)\r
{\r
- EFI_STATUS Status;\r
- LIST_ENTRY *Link;\r
- SMM_RSC_HANDLER_CALLBACK_ENTRY *CallbackEntry;\r
+ LIST_ENTRY *Link;\r
+ SMM_RSC_HANDLER_CALLBACK_ENTRY *CallbackEntry;\r
\r
if (Callback == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
}\r
\r
- Status = gSmst->SmmAllocatePool (\r
- EfiRuntimeServicesData,\r
- sizeof (SMM_RSC_HANDLER_CALLBACK_ENTRY),\r
- (VOID**)&CallbackEntry\r
- );\r
-\r
- ASSERT_EFI_ERROR(Status);\r
+ CallbackEntry = (SMM_RSC_HANDLER_CALLBACK_ENTRY *)AllocatePool (sizeof (SMM_RSC_HANDLER_CALLBACK_ENTRY));\r
ASSERT (CallbackEntry != NULL);\r
\r
CallbackEntry->Signature = SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE;\r
// If the function is found in list, delete it and return.\r
//\r
RemoveEntryList (&CallbackEntry->Node);\r
- gSmst->SmmFreePool (CallbackEntry);\r
+ FreePool (CallbackEntry);\r
return EFI_SUCCESS;\r
}\r
}\r
/** @file\r
Internal include file for Report Status Code Router Driver.\r
\r
- Copyright (c) 2009, Intel Corporation\r
+ Copyright (c) 2009 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Library/PcdLib.h>\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/SmmServicesTableLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
\r
#define SMM_RSC_HANDLER_CALLBACK_ENTRY_SIGNATURE SIGNATURE_32 ('s', 'h', 'c', 'e')\r
\r
FILE_GUID = A6885402-D022-4b0e-A509-4711B90F2A39\r
MODULE_TYPE = DXE_SMM_DRIVER\r
PI_SPECIFICATION_VERSION = 0x0001000A\r
- \r
ENTRY_POINT = GenericStatusCodeSmmEntry\r
\r
#\r
# VALID_ARCHITECTURES = IA32 X64\r
#\r
\r
-[Sources.common]\r
+[Sources]\r
ReportStatusCodeRouterSmm.c\r
ReportStatusCodeRouterSmm.h\r
\r
-\r
[Packages]\r
MdePkg/MdePkg.dec\r
MdeModulePkg/MdeModulePkg.dec\r
DebugLib\r
BaseLib\r
SynchronizationLib\r
+ MemoryAllocationLib\r
\r
[Protocols]\r
gEfiSmmRscHandlerProtocolGuid ## PRODUCES\r
/** @file\r
Runtime memory status code worker.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation \r
+ Copyright (c) 2006 - 2010, Intel Corporation \r
All rights reserved. This program and the accompanying materials \r
are licensed and made available under the terms and conditions of the BSD License \r
which accompanies this distribution. The full text of the license may be found at \r
VOID\r
)\r
{\r
- EFI_STATUS Status;\r
//\r
// Allocate SMM memory status code pool.\r
//\r
- Status = gSmst->SmmAllocatePool (\r
- EfiRuntimeServicesData,\r
- sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatusCodeMemorySize) * 1024,\r
- (VOID**)&mSmmMemoryStatusCodeTable\r
- );\r
-\r
- ASSERT_EFI_ERROR(Status);\r
+ mSmmMemoryStatusCodeTable = (RUNTIME_MEMORY_STATUSCODE_HEADER *)AllocateZeroPool (sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) + PcdGet16 (PcdStatusCodeMemorySize) * 1024);\r
ASSERT (mSmmMemoryStatusCodeTable != NULL);\r
\r
- mSmmMemoryStatusCodeTable->RecordIndex = 0;\r
- mSmmMemoryStatusCodeTable->NumberOfRecords = 0;\r
- mSmmMemoryStatusCodeTable->MaxRecordsNumber = \r
- (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);\r
-\r
+ mSmmMemoryStatusCodeTable->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);\r
return EFI_SUCCESS;\r
}\r
\r
/** @file\r
Internal include file for Status Code Handler Driver.\r
\r
- Copyright (c) 2009, Intel Corporation\r
+ Copyright (c) 2009 - 2010, Intel Corporation\r
All rights reserved. This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
#include <Library/UefiDriverEntryPoint.h>\r
#include <Library/SmmServicesTableLib.h>\r
#include <Library/SerialPortLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
\r
//\r
// Runtime memory status code worker definition\r
# Status Code Handler Driver which produces general handlers and hook them\r
# onto the SMM status code router.\r
#\r
-# Copyright (c) 2009, Intel Corporation.\r
+# Copyright (c) 2009 - 2010, Intel Corporation.\r
#\r
# All rights reserved. This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
FILE_GUID = 79CD78D8-6EDC-4978-BD02-3299C387AB17\r
MODULE_TYPE = DXE_SMM_DRIVER\r
PI_SPECIFICATION_VERSION = 0x0001000A\r
- \r
ENTRY_POINT = StatusCodeHandlerSmmEntry\r
\r
#\r
# VALID_ARCHITECTURES = IA32 X64\r
#\r
\r
-[Sources.common]\r
+[Sources]\r
StatusCodeHandlerSmm.c\r
StatusCodeHandlerSmm.h\r
SerialStatusCodeWorker.c\r
ReportStatusCodeLib\r
DebugLib\r
SynchronizationLib\r
+ MemoryAllocationLib\r
\r
[Guids]\r
gMemoryStatusCodeRecordGuid ## CONSUMES ## HOB\r