]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.c
IntelFrameworkModulePkg: Clean up source files
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / DataHubDxe / DataHub.c
index 9a193d5ff0eb8e38c9f2c7bb11b06e0833372392..b7d2f75ba24cd06ba16e01680ec68672c173bb91 100644 (file)
@@ -1,15 +1,15 @@
 /** @file\r
   This code produces the Data Hub protocol. It preloads the data hub\r
   with status information copied in from PEI HOBs.\r
-  \r
-Copyright (c) 2006 - 2016, 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
-                                                                                          \r
-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
+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
+\r
+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
 **/\r
 \r
@@ -32,7 +32,7 @@ DATA_HUB_INSTANCE mPrivateData;
   @param RawDataSize            Size of Data Log data in bytes\r
 \r
   @retval EFI_SUCCESS           If data was logged\r
-  @retval EFI_OUT_OF_RESOURCES  If data was not logged due to lack of system \r
+  @retval EFI_OUT_OF_RESOURCES  If data was not logged due to lack of system\r
                                 resources.\r
 **/\r
 EFI_STATUS\r
@@ -68,7 +68,7 @@ DataHubLogData (
   //\r
   RecordSize  = sizeof (EFI_DATA_RECORD_HEADER) + RawDataSize;\r
   TotalSize   = sizeof (EFI_DATA_ENTRY) + RecordSize;\r
-  \r
+\r
   //\r
   // First try to get log time at TPL level <= TPL_CALLBACK.\r
   //\r
@@ -149,7 +149,7 @@ DataHubLogData (
 }\r
 \r
 /**\r
-  Search the Head doubly linked list for the passed in MTC. Return the \r
+  Search the Head doubly linked list for the passed in MTC. Return the\r
   matching element in Head and the MTC on the next entry.\r
 \r
   @param Head             Head of Data Log linked list.\r
@@ -157,7 +157,7 @@ DataHubLogData (
                           ClassFilter.\r
   @param PtrCurrentMTC    On IN contians MTC to search for. On OUT contians next\r
                           MTC in the data log list or zero if at end of the list.\r
-  \r
+\r
   @retval EFI_DATA_LOG_ENTRY  Return pointer to data log data from Head list.\r
   @retval NULL                If no data record exists.\r
 \r
@@ -257,20 +257,20 @@ FindFilterDriverByEvent (
   Get a previously logged data record and the MonotonicCount for the next\r
   available Record. This allows all records or all records later\r
   than a give MonotonicCount to be returned. If an optional FilterDriverEvent\r
-  is passed in with a MonotonicCout of zero return the first record \r
-  not yet read by the filter driver. If FilterDriverEvent is NULL and \r
+  is passed in with a MonotonicCout of zero return the first record\r
+  not yet read by the filter driver. If FilterDriverEvent is NULL and\r
   MonotonicCount is zero return the first data record.\r
 \r
   @param This                     Pointer to the EFI_DATA_HUB_PROTOCOL instance.\r
   @param MonotonicCount           Specifies the Record to return. On input, zero means\r
                                   return the first record. On output, contains the next\r
                                   record to available. Zero indicates no more records.\r
-  @param FilterDriverEvent        If FilterDriverEvent is not passed in a MonotonicCount \r
-                                  of zero, it means to return the first data record. \r
-                                  If FilterDriverEvent is passed in, then a MonotonicCount \r
-                                  of zero means to return the first data not yet read by \r
+  @param FilterDriverEvent        If FilterDriverEvent is not passed in a MonotonicCount\r
+                                  of zero, it means to return the first data record.\r
+                                  If FilterDriverEvent is passed in, then a MonotonicCount\r
+                                  of zero means to return the first data not yet read by\r
                                   FilterDriverEvent.\r
-  @param Record                   Returns a dynamically allocated memory buffer with a data \r
+  @param Record                   Returns a dynamically allocated memory buffer with a data\r
                                   record that matches MonotonicCount.\r
 \r
   @retval EFI_SUCCESS             Data was returned in Record.\r
@@ -312,7 +312,7 @@ DataHubGetNextRecord (
     }\r
     return EFI_SUCCESS;\r
   }\r
-    \r
+\r
   //\r
   // For events the beginning is the last unread record. This info is\r
   // stored in the instance structure, so we must look up the event\r
@@ -332,16 +332,16 @@ DataHubGetNextRecord (
 \r
   //\r
   // Retrieve the next record or the first record.\r
-  //   \r
-  if (*MonotonicCount != 0 || FilterDriver->GetNextMonotonicCount == 0) { \r
+  //\r
+  if (*MonotonicCount != 0 || FilterDriver->GetNextMonotonicCount == 0) {\r
     *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, MonotonicCount);\r
     if (*Record == NULL) {\r
       return EFI_NOT_FOUND;\r
     }\r
-    \r
+\r
     if (*MonotonicCount != 0) {\r
       //\r
-      // If this was not the last record then update the count associated with the filter \r
+      // If this was not the last record then update the count associated with the filter\r
       //\r
       FilterDriver->GetNextMonotonicCount = *MonotonicCount;\r
     } else {\r
@@ -352,13 +352,13 @@ DataHubGetNextRecord (
     }\r
     return EFI_SUCCESS;\r
   }\r
-  \r
+\r
   //\r
-  // This is a request to read the first record that has not been read yet.  \r
+  // This is a request to read the first record that has not been read yet.\r
   // Set MonotoicCount to the last record successfuly read\r
   //\r
   *MonotonicCount = FilterDriver->GetNextMonotonicCount;\r
-  \r
+\r
   //\r
   // Retrieve the last record successfuly read again, but do not return it since\r
   // it has already been returned before.\r
@@ -367,51 +367,51 @@ DataHubGetNextRecord (
   if (*Record == NULL) {\r
     return EFI_NOT_FOUND;\r
   }\r
-  \r
+\r
   if (*MonotonicCount != 0) {\r
     //\r
-    // Update the count associated with the filter \r
+    // Update the count associated with the filter\r
     //\r
     FilterDriver->GetNextMonotonicCount = *MonotonicCount;\r
 \r
     //\r
-    // Retrieve the record after the last record successfuly read \r
-    //  \r
+    // Retrieve the record after the last record successfuly read\r
+    //\r
     *Record = GetNextDataRecord (&Private->DataListHead, ClassFilter, MonotonicCount);\r
     if (*Record == NULL) {\r
       return EFI_NOT_FOUND;\r
     }\r
   }\r
-  \r
+\r
   return EFI_SUCCESS;\r
 }\r
 \r
 /**\r
-  This function registers the data hub filter driver that is represented \r
+  This function registers the data hub filter driver that is represented\r
   by FilterEvent. Only one instance of each FilterEvent can be registered.\r
-  After the FilterEvent is registered, it will be signaled so it can sync \r
-  with data records that have been recorded prior to the FilterEvent being \r
+  After the FilterEvent is registered, it will be signaled so it can sync\r
+  with data records that have been recorded prior to the FilterEvent being\r
   registered.\r
-    \r
+\r
   @param This                   Pointer to  The EFI_DATA_HUB_PROTOCOL instance.\r
-  @param FilterEvent            The EFI_EVENT to signal whenever data that matches \r
+  @param FilterEvent            The EFI_EVENT to signal whenever data that matches\r
                                 FilterClass is logged in the system.\r
-  @param FilterTpl              The maximum EFI_TPL at which FilterEvent can be \r
-                                signaled. It is strongly recommended that you use the \r
+  @param FilterTpl              The maximum EFI_TPL at which FilterEvent can be\r
+                                signaled. It is strongly recommended that you use the\r
                                 lowest EFI_TPL possible.\r
-  @param FilterClass            FilterEvent will be signaled whenever a bit in \r
-                                EFI_DATA_RECORD_HEADER.DataRecordClass is also set in \r
-                                FilterClass. If FilterClass is zero, no class-based \r
+  @param FilterClass            FilterEvent will be signaled whenever a bit in\r
+                                EFI_DATA_RECORD_HEADER.DataRecordClass is also set in\r
+                                FilterClass. If FilterClass is zero, no class-based\r
                                 filtering will be performed.\r
-  @param FilterDataRecordGuid   FilterEvent will be signaled whenever FilterDataRecordGuid \r
-                                matches EFI_DATA_RECORD_HEADER.DataRecordGuid. If \r
-                                FilterDataRecordGuid is NULL, then no GUID-based filtering \r
-                                will be performed.              \r
+  @param FilterDataRecordGuid   FilterEvent will be signaled whenever FilterDataRecordGuid\r
+                                matches EFI_DATA_RECORD_HEADER.DataRecordGuid. If\r
+                                FilterDataRecordGuid is NULL, then no GUID-based filtering\r
+                                will be performed.\r
 \r
   @retval EFI_SUCCESS           The filter driver event was registered.\r
-  @retval EFI_ALREADY_STARTED   FilterEvent was previously registered and cannot be \r
+  @retval EFI_ALREADY_STARTED   FilterEvent was previously registered and cannot be\r
                                 registered again.\r
-  @retval EFI_OUT_OF_RESOURCES  The filter driver event was not registered due to lack of \r
+  @retval EFI_OUT_OF_RESOURCES  The filter driver event was not registered due to lack of\r
                                 system resources.\r
 \r
 **/\r
@@ -480,12 +480,12 @@ DataHubRegisterFilterDriver (
 }\r
 \r
 /**\r
-  Remove a Filter Driver, so it no longer gets called when data \r
+  Remove a Filter Driver, so it no longer gets called when data\r
    information is logged.\r
 \r
   @param This           Protocol instance structure\r
 \r
-  @param FilterEvent    Event that represents a filter driver that is to be \r
+  @param FilterEvent    Event that represents a filter driver that is to be\r
                         Unregistered.\r
 \r
   @retval EFI_SUCCESS   If FilterEvent was unregistered\r
@@ -526,7 +526,7 @@ DataHubUnregisterFilterDriver (
 \r
 \r
 /**\r
-  Driver's Entry point routine that install Driver to produce Data Hub protocol. \r
+  Driver's Entry point routine that install Driver to produce Data Hub protocol.\r
 \r
   @param ImageHandle    Module's image handle\r
   @param SystemTable    Pointer of EFI_SYSTEM_TABLE\r