]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/StatusCode/RuntimeDxe/StatusCodeRuntimeDxe.c
Update the copyright notice format
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / StatusCode / RuntimeDxe / StatusCodeRuntimeDxe.c
index 12651153f5c71591aea6f991606d775d2f3b4c81..cb2c271124469dd2d45ad68e0fe0223eadcbe825 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Status code driver for IA32/X64/EBC architecture.\r
 \r
-  Copyright (c) 2006 - 2009, Intel Corporation\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2009, 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
@@ -119,7 +119,7 @@ ReportDispatcher (
     return EFI_DEVICE_ERROR;\r
   }\r
 \r
-  if (FeaturePcdGet (PcdStatusCodeUseEfiSerial) || FeaturePcdGet (PcdStatusCodeUseHardSerial)) {\r
+  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
     SerialStatusCodeReportWorker (\r
       CodeType,\r
       Value,\r
@@ -128,7 +128,7 @@ ReportDispatcher (
       Data\r
       );\r
   }\r
-  if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {\r
+  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
     RtMemoryStatusCodeReportWorker (\r
       CodeType,\r
       Value,\r
@@ -214,18 +214,14 @@ InitializationDispatcherWorker (
   // if enable UseRuntimeMemory, then initialize runtime memory status code worker.\r
   // if enable UseDataHub, then initialize data hub status code worker.\r
   //\r
-  if (FeaturePcdGet (PcdStatusCodeUseEfiSerial)) {\r
-    Status = EfiSerialStatusCodeInitializeWorker ();\r
-    ASSERT_EFI_ERROR (Status);\r
-  }\r
-  if (FeaturePcdGet (PcdStatusCodeUseHardSerial)) {\r
+  if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
     //\r
     // Call Serial Port Lib API to initialize serial port.\r
     //\r
     Status = SerialPortInitialize ();\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
-  if (FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {\r
+  if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
     Status = RtMemoryStatusCodeInitializeWorker ();\r
     ASSERT_EFI_ERROR (Status);\r
   }\r
@@ -244,82 +240,78 @@ InitializationDispatcherWorker (
   //\r
   // Replay Status code which saved in GUID'ed HOB to all supported devices. \r
   //\r
-\r
-  // \r
-  // Journal GUID'ed HOBs to find all record entry, if found, \r
-  // then output record to support replay device.\r
-  //\r
-  ExpectedPacketIndex = 0;\r
-  Hob.Raw   = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);\r
-  HobStart  = Hob.Raw;\r
-  while (Hob.Raw != NULL) {\r
-    PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);\r
-    if (PacketHeader->PacketIndex == ExpectedPacketIndex) {\r
-      Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);\r
-      for (Index = 0; Index < PacketHeader->RecordIndex; Index++) {\r
-        //\r
-        // Dispatch records to devices based on feature flag.\r
-        //\r
-        if (FeaturePcdGet (PcdStatusCodeReplayInSerial) && \r
-            (FeaturePcdGet (PcdStatusCodeUseHardSerial) ||\r
-             FeaturePcdGet (PcdStatusCodeUseEfiSerial))) {\r
-          SerialStatusCodeReportWorker (\r
-            Record[Index].CodeType,\r
-            Record[Index].Value,\r
-            Record[Index].Instance,\r
-            NULL,\r
-            NULL\r
-            );\r
-        }\r
-        if (FeaturePcdGet (PcdStatusCodeReplayInRuntimeMemory) &&\r
-            FeaturePcdGet (PcdStatusCodeUseRuntimeMemory)) {\r
-          RtMemoryStatusCodeReportWorker (\r
-            Record[Index].CodeType,\r
-            Record[Index].Value,\r
-            Record[Index].Instance\r
-            );\r
-        }\r
-        if (FeaturePcdGet (PcdStatusCodeReplayInDataHub) &&\r
-            FeaturePcdGet (PcdStatusCodeUseDataHub)) {\r
-          DataHubStatusCodeReportWorker (\r
-            Record[Index].CodeType,\r
-            Record[Index].Value,\r
-            Record[Index].Instance,\r
-            NULL,\r
-            NULL\r
-            );\r
-        }\r
-        if (FeaturePcdGet (PcdStatusCodeReplayInOEM) &&\r
-            FeaturePcdGet (PcdStatusCodeUseOEM)) {\r
+  if (FeaturePcdGet (PcdStatusCodeReplayIn)) {\r
+    // \r
+    // Journal GUID'ed HOBs to find all record entry, if found, \r
+    // then output record to support replay device.\r
+    //\r
+    ExpectedPacketIndex = 0;\r
+    Hob.Raw   = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid);\r
+    HobStart  = Hob.Raw;\r
+    while (Hob.Raw != NULL) {\r
+      PacketHeader = (MEMORY_STATUSCODE_PACKET_HEADER *) GET_GUID_HOB_DATA (Hob.Guid);\r
+      if (PacketHeader->PacketIndex == ExpectedPacketIndex) {\r
+        Record = (MEMORY_STATUSCODE_RECORD *) (PacketHeader + 1);\r
+        for (Index = 0; Index < PacketHeader->RecordIndex; Index++) {\r
           //\r
-          // Call OEM hook status code library API to report status code to OEM device\r
+          // Dispatch records to devices based on feature flag.\r
           //\r
-          OemHookStatusCodeReport (\r
-            Record[Index].CodeType,\r
-            Record[Index].Value,\r
-            Record[Index].Instance,\r
-            NULL,\r
-            NULL\r
-            );\r
+          if (FeaturePcdGet (PcdStatusCodeUseSerial)) {\r
+            SerialStatusCodeReportWorker (\r
+              Record[Index].CodeType,\r
+              Record[Index].Value,\r
+              Record[Index].Instance,\r
+              NULL,\r
+              NULL\r
+              );\r
+          }\r
+          if (FeaturePcdGet (PcdStatusCodeUseMemory)) {\r
+            RtMemoryStatusCodeReportWorker (\r
+              Record[Index].CodeType,\r
+              Record[Index].Value,\r
+              Record[Index].Instance\r
+              );\r
+          }\r
+          if (FeaturePcdGet (PcdStatusCodeUseDataHub)) {\r
+            DataHubStatusCodeReportWorker (\r
+              Record[Index].CodeType,\r
+              Record[Index].Value,\r
+              Record[Index].Instance,\r
+              NULL,\r
+              NULL\r
+              );\r
+          }\r
+          if (FeaturePcdGet (PcdStatusCodeUseOEM)) {\r
+            //\r
+            // Call OEM hook status code library API to report status code to OEM device\r
+            //\r
+            OemHookStatusCodeReport (\r
+              Record[Index].CodeType,\r
+              Record[Index].Value,\r
+              Record[Index].Instance,\r
+              NULL,\r
+              NULL\r
+              );\r
+          }\r
         }\r
+        ExpectedPacketIndex++;\r
+  \r
+        //\r
+        // See whether there is gap of packet or not\r
+        //\r
+        if (HobStart != NULL) {\r
+          HobStart  = NULL;\r
+          Hob.Raw   = HobStart;\r
+          continue;\r
+        }\r
+      } else if (HobStart != NULL) {\r
+        //\r
+        // Cache the found packet for improve the performance\r
+        //\r
+        HobStart = Hob.Raw;\r
       }\r
-      ExpectedPacketIndex++;\r
-\r
-      //\r
-      // See whether there is gap of packet or not\r
-      //\r
-      if (HobStart != NULL) {\r
-        HobStart  = NULL;\r
-        Hob.Raw   = HobStart;\r
-        continue;\r
-      }\r
-    } else if (HobStart != NULL) {\r
-      //\r
-      // Cache the found packet for improve the performance\r
-      //\r
-      HobStart = Hob.Raw;\r
+  \r
+      Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);\r
     }\r
-\r
-    Hob.Raw = GetNextGuidHob (&gMemoryStatusCodeRecordGuid, Hob.Raw);\r
   }\r
 }\r