]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/DataHubStdErrDxe/DataHubStdErr.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / DataHubStdErrDxe / DataHubStdErr.c
index 52edef600c41268713878a258581e31eb33bd9a5..d400cda00784698694b2e4f7611473d77c94d406 100644 (file)
@@ -1,7 +1,9 @@
-/*++\r
+/** @file\r
+  Data Hub filter driver that takes DEBUG () info from Data Hub and writes it\r
+  to StdErr if it exists.\r
 \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2006 - 2018, 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
@@ -9,23 +11,12 @@ http://opensource.org/licenses/bsd-license.php
 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-Module Name:\r
-\r
-  DataHubStdErr.c\r
-\r
-Abstract:\r
-\r
-  Data Hub filter driver that takes DEBUG () info from Data Hub and writes it\r
-  to StdErr if it exists.\r
-\r
---*/\r
-\r
+**/\r
 \r
 #include <FrameworkDxe.h>\r
-\r
-\r
 #include <Guid/DataHubStatusCodeRecord.h>\r
 #include <Guid/StatusCodeDataTypeId.h>\r
+#include <Guid/StatusCodeDataTypeDebug.h>\r
 #include <Protocol/DataHub.h>\r
 #include <Protocol/SimpleTextOut.h>\r
 \r
@@ -38,27 +29,19 @@ EFI_DATA_HUB_PROTOCOL *mDataHub = NULL;
 \r
 EFI_EVENT             mDataHubStdErrEvent;\r
 \r
-STATIC\r
+/**\r
+  Event handler registered with the Data Hub to parse EFI_DEBUG_CODE. This\r
+  handler reads the Data Hub and sends any DEBUG info to StdErr.\r
+\r
+  @param Event      The event that occured, not used\r
+  @param Context    DataHub Protocol Pointer\r
+**/\r
 VOID\r
 EFIAPI\r
 DataHubStdErrEventHandler (\r
   IN EFI_EVENT Event,\r
   IN VOID      *Context\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-  Event handler registered with the Data Hub to parse EFI_DEBUG_CODE. This\r
-  handler reads the Data Hub and sends any DEBUG info to StdErr.\r
-\r
-Arguments:\r
-  Event    - The event that occured, not used\r
-  Context  - DataHub Protocol Pointer\r
-\r
-Returns:\r
-  None.\r
-\r
---*/\r
 {\r
   EFI_STATUS                           Status;\r
   EFI_DATA_HUB_PROTOCOL                *DataHub;\r
@@ -73,7 +56,7 @@ Returns:
   //\r
   // If StdErr is not yet initialized just return a DEBUG print in the BDS\r
   // after consoles are connect will make sure data gets flushed properly\r
-  // when StdErr is availible.\r
+  // when StdErr is available.\r
   //\r
   if (gST == NULL) {\r
     return ;\r
@@ -82,6 +65,7 @@ Returns:
   if (gST->StdErr == NULL) {\r
     return ;\r
   }\r
+\r
   //\r
   // Mtc of zero means return the next record that has not been read by the\r
   // event handler.\r
@@ -110,31 +94,22 @@ Returns:
   } while ((Mtc != 0) && !EFI_ERROR (Status));\r
 }\r
 \r
+/**\r
+  Register an event handler with the Data Hub to parse EFI_DEBUG_CODE. This\r
+  handler reads the Data Hub and sends any DEBUG info to StdErr.\r
+\r
+  @param ImageHandle                Image handle of this driver.\r
+  @param SystemTable                Pointer to EFI system table.\r
+\r
+  @retval EFI_SUCCESS               The event handler was registered.\r
+  @retval EFI_OUT_OF_RESOURCES      The event hadler was not registered due to lack of system resources.\r
+**/\r
 EFI_STATUS\r
 EFIAPI\r
 DataHubStdErrInitialize (\r
   IN EFI_HANDLE         ImageHandle,\r
   IN EFI_SYSTEM_TABLE   *SystemTable\r
   )\r
-/*++\r
-\r
-Routine Description:\r
-\r
-  Register an event handler with the Data Hub to parse EFI_DEBUG_CODE. This\r
-  handler reads the Data Hub and sends any DEBUG info to StdErr.\r
-\r
-Arguments:\r
-\r
-  ImageHandle - Image handle of this driver.\r
-  SystemTable - Pointer to EFI system table.\r
-\r
-Returns:\r
-\r
-  EFI_SUCCESS             - The event handler was registered.\r
-  EFI_OUT_OF_RESOURCES    - The event hadler was not registered due to lack of\r
-                            system resources.\r
-\r
---*/\r
 {\r
   EFI_STATUS  Status;\r
   UINT64      DataClass;\r
@@ -173,3 +148,4 @@ Returns:
 \r
   return Status;\r
 }\r
+\r