]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
Remove IntelFrameworkModulePkg
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / RuntimeDxe / SerialStatusCodeWorker.c
diff --git a/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c b/IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/SerialStatusCodeWorker.c
deleted file mode 100644 (file)
index 2045fc8..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/** @file\r
-  Serial I/O status code reporting 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
-/**\r
-  Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\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
-  @param  CallerId         This optional parameter may be used to identify the caller.\r
-                           This parameter allows the status code driver to apply different rules to\r
-                           different callers.\r
-  @param  Data             This optional parameter may be used to pass additional data.\r
-\r
-  @retval EFI_SUCCESS      Status code reported to serial I/O successfully.\r
-  @retval EFI_DEVICE_ERROR EFI serial device cannot work after ExitBootService() is called.\r
-  @retval EFI_DEVICE_ERROR EFI serial device cannot work with TPL higher than TPL_CALLBACK.\r
-\r
-**/\r
-EFI_STATUS\r
-SerialStatusCodeReportWorker (\r
-  IN EFI_STATUS_CODE_TYPE     CodeType,\r
-  IN EFI_STATUS_CODE_VALUE    Value,\r
-  IN UINT32                   Instance,\r
-  IN EFI_GUID                 *CallerId,\r
-  IN EFI_STATUS_CODE_DATA     *Data OPTIONAL\r
-  )\r
-{\r
-  CHAR8           *Filename;\r
-  CHAR8           *Description;\r
-  CHAR8           *Format;\r
-  CHAR8           Buffer[EFI_STATUS_CODE_DATA_MAX_SIZE];\r
-  UINT32          ErrorLevel;\r
-  UINT32          LineNumber;\r
-  UINTN           CharCount;\r
-  BASE_LIST       Marker;\r
-\r
-  Buffer[0] = '\0';\r
-\r
-  if (Data != NULL &&\r
-      ReportStatusCodeExtractAssertInfo (CodeType, Value, Data, &Filename, &Description, &LineNumber)) {\r
-    //\r
-    // Print ASSERT() information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "\n\rDXE_ASSERT!: %a (%d): %a\n\r",\r
-                  Filename,\r
-                  LineNumber,\r
-                  Description\r
-                  );\r
-  } else if (Data != NULL &&\r
-             ReportStatusCodeExtractDebugInfo (Data, &ErrorLevel, &Marker, &Format)) {\r
-    //\r
-    // Print DEBUG() information into output buffer.\r
-    //\r
-    CharCount = AsciiBSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  Format,\r
-                  Marker\r
-                  );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) {\r
-    //\r
-    // Print ERROR information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "ERROR: C%08x:V%08x I%x",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-\r
-    if (CallerId != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %g",\r
-                     CallerId\r
-                     );\r
-    }\r
-\r
-    if (Data != NULL) {\r
-      CharCount += AsciiSPrint (\r
-                     &Buffer[CharCount],\r
-                     (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                     " %x",\r
-                     Data\r
-                     );\r
-    }\r
-\r
-    CharCount += AsciiSPrint (\r
-                   &Buffer[CharCount],\r
-                   (sizeof (Buffer) - (sizeof (Buffer[0]) * CharCount)),\r
-                   "\n\r"\r
-                   );\r
-  } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) {\r
-    //\r
-    // Print PROGRESS information into output buffer.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "PROGRESS CODE: V%08x I%x\n\r",\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  } else if (Data != NULL &&\r
-             CompareGuid (&Data->Type, &gEfiStatusCodeDataTypeStringGuid) &&\r
-             ((EFI_STATUS_CODE_STRING_DATA *) Data)->StringType == EfiStringAscii) {\r
-    //\r
-    // EFI_STATUS_CODE_STRING_DATA\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "%a\n\r",\r
-                  ((EFI_STATUS_CODE_STRING_DATA *) Data)->String.Ascii\r
-                  );\r
-  } else {\r
-    //\r
-    // Code type is not defined.\r
-    //\r
-    CharCount = AsciiSPrint (\r
-                  Buffer,\r
-                  sizeof (Buffer),\r
-                  "Undefined: C%08x:V%08x I%x\n\r",\r
-                  CodeType,\r
-                  Value,\r
-                  Instance\r
-                  );\r
-  }\r
-\r
-  //\r
-  // Call SerialPort Lib function to do print.\r
-  //\r
-  SerialPortWrite ((UINT8 *) Buffer, CharCount);\r
-\r
-  return EFI_SUCCESS;\r
-}\r
-\r