]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / StatusCodeHandler / Smm / MemoryStatusCodeWorker.c
index 5672ebcd0ca4cd25ac96e95b4308c24ab4c65adb..78d908b16e8338734dce00843903f803ff5b65fa 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Runtime memory status code worker.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation                                                         \r
-  All rights reserved. This program and the accompanying materials                          \r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  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
   http://opensource.org/licenses/bsd-license.php                                            \r
@@ -27,24 +27,13 @@ MemoryStatusCodeInitializeWorker (
   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
@@ -68,6 +57,7 @@ MemoryStatusCodeInitializeWorker (
 \r
 **/\r
 EFI_STATUS\r
+EFIAPI\r
 MemoryStatusCodeReportWorker (\r
   IN EFI_STATUS_CODE_TYPE               CodeType,\r
   IN EFI_STATUS_CODE_VALUE              Value,\r