]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Handle gEfiStatusCodeDataTypeStringGuid in status code handler drivers.
authorxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 30 Jul 2010 05:35:19 +0000 (05:35 +0000)
committerxli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 30 Jul 2010 05:35:19 +0000 (05:35 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10716 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c
MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.h
MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf
MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c
MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h
MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf

index 098347fd982442f07330078d242b54626df3976e..a34fa48e4528b288ae72536f12d3ad1ef01ddb41 100644 (file)
@@ -129,6 +129,17 @@ SerialStatusCodeReportWorker (
                   Value,\r
                   Instance\r
                   );\r
+  } else if (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
index d4ac756cd06b6ee29edde8e40a853d83a274b61c..68991b4cea869bbcab9e32890f5c56fdb429d6c1 100644 (file)
@@ -30,6 +30,7 @@
 #include <Library/PcdLib.h>\r
 #include <Library/PeiServicesLib.h>\r
 #include <Library/PeimEntryPoint.h>\r
+#include <Library/BaseMemoryLib.h>\r
 \r
 /**\r
   Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
index fa9de498604dc18baaa24b29f5ab3080c9ebb342..8a0377e12a77975ada6d33ad224b12445f121c58 100644 (file)
   ReportStatusCodeLib\r
   PrintLib\r
   DebugLib\r
-\r
+  BaseMemoryLib\r
+  \r
 [Guids]\r
   gMemoryStatusCodeRecordGuid                   ## SOMETIMES_CONSUMES ## HOB\r
-\r
+  gEfiStatusCodeDataTypeStringGuid              ## CONSUMES\r
+  \r
 [Ppis]\r
   gEfiPeiRscHandlerPpiGuid                      ## CONSUMES\r
 \r
index 466b5ea88b69bafe51b1315806e610f410aabb0e..8024f2f5df283280381fa560428584c9a0338ad7 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Serial I/O status code reporting worker.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\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
@@ -125,6 +125,17 @@ SerialStatusCodeReportWorker (
                   Value, \r
                   Instance\r
                   );\r
+  } else if (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
index 1465dbbb3dfcac776c7eca01e10f57e6f479a2d2..510c5c6ee302a33f93b6ce0b46bb964b1ead231e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Internal include file for Status Code Handler Driver.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\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
@@ -23,6 +23,7 @@
 #include <Guid/EventGroup.h>\r
 \r
 #include <Library/SynchronizationLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
 #include <Library/DebugLib.h>\r
 #include <Library/ReportStatusCodeLib.h>\r
 #include <Library/PrintLib.h>\r
index 7ecd6355a4be7d4eac8bdf303d1ff35a7b07ea84..a5cede4e8763fcf9a1aa6789f065210801ce2d2b 100644 (file)
   ReportStatusCodeLib\r
   DebugLib\r
   SynchronizationLib\r
-\r
+  BaseMemoryLib\r
+  \r
 [Guids]\r
   gMemoryStatusCodeRecordGuid                   ## CONSUMES ## HOB\r
   gEfiEventVirtualAddressChangeGuid             ## CONSUMES ## Event\r
   gEfiEventExitBootServicesGuid                 ## CONSUMES ## Event\r
+  gEfiStatusCodeDataTypeStringGuid              ## CONSUMES\r
 \r
 [Protocols]\r
   gEfiRscHandlerProtocolGuid                    ## CONSUMES\r
index 9c6a5b153d34620b03a8b3e0dfd488097b36aee6..408511ef97b0f18e97b76632e4a90c3deb1acda1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Serial I/O status code reporting worker.\r
 \r
-  Copyright (c) 2009, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 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
@@ -125,6 +125,17 @@ SerialStatusCodeReportWorker (
                   Value, \r
                   Instance\r
                   );\r
+  } else if (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
index bf364c80dd465597cfba42feafedb7fcb9dd2568..0dd0060dabe3a5dc25407ac876fb2354a6263132 100644 (file)
@@ -30,6 +30,7 @@
 #include <Library/SmmServicesTableLib.h>\r
 #include <Library/SerialPortLib.h>\r
 #include <Library/MemoryAllocationLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
 \r
 //\r
 // Runtime memory status code worker definition\r
index 69f6099e55de99534e148672c8f6402cc7064aa3..e56106a81a42b2f5640f8bee6638f4cdc065bc6e 100644 (file)
   DebugLib\r
   SynchronizationLib\r
   MemoryAllocationLib\r
-\r
+  BaseMemoryLib\r
+  \r
 [Guids]\r
   gMemoryStatusCodeRecordGuid                   ## CONSUMES ## HOB\r
+  gEfiStatusCodeDataTypeStringGuid              ## CONSUMES\r
 \r
 [Protocols]\r
   gEfiSmmRscHandlerProtocolGuid                 ## CONSUMES\r