]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/RtMemoryStatusCodeWorker.c
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / RuntimeDxe / RtMemoryStatusCodeWorker.c
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/RtMemoryStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/RtMemoryStatusCodeWorker.c
deleted file mode 100644 (file)
index 170b4d5..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/** @file\r
-  Runtime memory status code worker.\r
-\r
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
-  SPDX-License-Identifier: BSD-2-Clause-Patent\r
-\r
-**/\r
-\r
-#include "StatusCodeRuntimeDxe.h"\r
-\r
-RUNTIME_MEMORY_STATUSCODE_HEADER  *mRtMemoryStatusCodeTable;\r
-\r
-/**\r
-  Initialize runtime memory status code table as initialization for runtime memory status code worker\r
-\r
-  @retval EFI_SUCCESS  Runtime memory status code table successfully initialized.\r
-\r
-**/\r
-EFI_STATUS\r
-RtMemoryStatusCodeInitializeWorker (\r
-  VOID\r
-  )\r
-{\r
-  //\r
-  // Allocate runtime memory status code pool.\r
-  //\r
-  mRtMemoryStatusCodeTable = AllocateRuntimePool (\r
-                               sizeof (RUNTIME_MEMORY_STATUSCODE_HEADER) +\r
-                               PcdGet16 (PcdStatusCodeMemorySize) * 1024\r
-                               );\r
-  ASSERT (mRtMemoryStatusCodeTable != NULL);\r
-\r
-  mRtMemoryStatusCodeTable->RecordIndex      = 0;\r
-  mRtMemoryStatusCodeTable->NumberOfRecords  = 0;\r
-  mRtMemoryStatusCodeTable->MaxRecordsNumber =\r
-    (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-/**\r
-  Report status code into runtime memory. If the runtime pool is full, roll back to the\r
-  first record and overwrite it.\r
-\r
-  @param  CodeType                Indicates the type of status code being reported.\r
-  @param  Value                   Describes the current status of a hardware or software entity.\r
-                                  This included information about the class and subclass that is used to\r
-                                  classify the entity as well as an operation.\r
-  @param  Instance                The enumeration of a hardware or software entity within\r
-                                  the system. Valid instance numbers start with 1.\r
-\r
-  @retval EFI_SUCCESS             Status code successfully recorded in runtime memory status code table.\r
-\r
-**/\r
-EFI_STATUS\r
-RtMemoryStatusCodeReportWorker (\r
-  IN EFI_STATUS_CODE_TYPE               CodeType,\r
-  IN EFI_STATUS_CODE_VALUE              Value,\r
-  IN UINT32                             Instance\r
-  )\r
-{\r
-  MEMORY_STATUSCODE_RECORD              *Record;\r
-\r
-  //\r
-  // Locate current record buffer.\r
-  //\r
-  Record = (MEMORY_STATUSCODE_RECORD *) (mRtMemoryStatusCodeTable + 1);\r
-  Record = &Record[mRtMemoryStatusCodeTable->RecordIndex++];\r
-\r
-  //\r
-  // Save status code.\r
-  //\r
-  Record->CodeType = CodeType;\r
-  Record->Value    = Value;\r
-  Record->Instance = Instance;\r
-\r
-  //\r
-  // If record index equals to max record number, then wrap around record index to zero.\r
-  //\r
-  // The reader of status code should compare the number of records with max records number,\r
-  // If it is equal to or larger than the max number, then the wrap-around had happened,\r
-  // so the first record is pointed by record index.\r
-  // If it is less then max number, index of the first record is zero.\r
-  //\r
-  mRtMemoryStatusCodeTable->NumberOfRecords++;\r
-  if (mRtMemoryStatusCodeTable->RecordIndex == mRtMemoryStatusCodeTable->MaxRecordsNumber) {\r
-    //\r
-    // Wrap around record index.\r
-    //\r
-    mRtMemoryStatusCodeTable->RecordIndex = 0;\r
-  }\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r
-\r
-\r