]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Refine code to make code follow the coding style.
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Nov 2010 05:28:01 +0000 (05:28 +0000)
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 8 Nov 2010 05:28:01 +0000 (05:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11011 6f19259b-4bc3-4df7-8a09-765794883524

PerformancePkg/Dp_App/Dp.c
PerformancePkg/Dp_App/DpInternal.h
PerformancePkg/Dp_App/DpProfile.c
PerformancePkg/Dp_App/DpTrace.c
PerformancePkg/Dp_App/DpUtilities.c
PerformancePkg/Include/Ich/GenericIch.h
PerformancePkg/Library/TscTimerLib/TscTimerLib.c

index 39eba4134c1c674f4f7142cc3aca97badcdb9f22..3237138b22f6e0d6373b5bfc2116bad12d925ae1 100644 (file)
@@ -42,7 +42,7 @@
 \r
 //\r
 /// Module-Global Variables\r
 \r
 //\r
 /// Module-Global Variables\r
-/// @{\r
+///@{\r
 EFI_HII_HANDLE   gHiiHandle;\r
 CHAR16           *mPrintTokenBuffer = NULL;\r
 CHAR16           mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
 EFI_HII_HANDLE   gHiiHandle;\r
 CHAR16           *mPrintTokenBuffer = NULL;\r
 CHAR16           mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
@@ -83,9 +83,11 @@ SHELL_PARAM_ITEM  DpParamList[] = {
   {NULL, TypeMax}\r
   };\r
 \r
   {NULL, TypeMax}\r
   };\r
 \r
-/// @}\r
+///@}\r
 \r
 \r
-/// Display Usage and Help information.\r
+/**\r
+   Display Usage and Help information.\r
+**/\r
 VOID\r
 ShowHelp( void )\r
 {\r
 VOID\r
 ShowHelp( void )\r
 {\r
@@ -111,7 +113,9 @@ ShowHelp( void )
   Print(L"\n");\r
 }\r
 \r
   Print(L"\n");\r
 }\r
 \r
-/// Display the trailing Verbose information.\r
+/**\r
+   Display the trailing Verbose information.\r
+**/\r
 VOID\r
 DumpStatistics( void )\r
 {\r
 VOID\r
 DumpStatistics( void )\r
 {\r
@@ -132,15 +136,16 @@ DumpStatistics( void )
 #endif // PROFILING_IMPLEMENTED\r
 }\r
 \r
 #endif // PROFILING_IMPLEMENTED\r
 }\r
 \r
-/** Dump performance data.\r
-  *\r
-  * @param[in]  ImageHandle     The image handle.\r
-  * @param[in]  SystemTable     The system table.\r
-  *\r
-  * @retval EFI_SUCCESS            Command completed successfully.\r
-  * @retval EFI_INVALID_PARAMETER  Command usage error.\r
-  * @retval value                  Unknown error.\r
-  *\r
+/** \r
+  Dump performance data.\r
+  \r
+  @param[in]  ImageHandle     The image handle.\r
+  @param[in]  SystemTable     The system table.\r
+  \r
+  @retval EFI_SUCCESS            Command completed successfully.\r
+  @retval EFI_INVALID_PARAMETER  Command usage error.\r
+  @retval value                  Unknown error.\r
+  \r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
 **/\r
 EFI_STATUS\r
 EFIAPI\r
@@ -158,15 +163,21 @@ InitializeDp (
   UINTN                     Number2Display;\r
 \r
   EFI_STATUS                Status;\r
   UINTN                     Number2Display;\r
 \r
   EFI_STATUS                Status;\r
-  BOOLEAN                   SummaryMode     = FALSE;\r
-  BOOLEAN                   VerboseMode     = FALSE;\r
-  BOOLEAN                   AllMode         = FALSE;\r
-  BOOLEAN                   RawMode         = FALSE;\r
-  BOOLEAN                   TraceMode       = FALSE;\r
-  BOOLEAN                   ProfileMode     = FALSE;\r
-  BOOLEAN                   ExcludeMode     = FALSE;\r
-\r
+  BOOLEAN                   SummaryMode;\r
+  BOOLEAN                   VerboseMode;\r
+  BOOLEAN                   AllMode;\r
+  BOOLEAN                   RawMode;\r
+  BOOLEAN                   TraceMode;\r
+  BOOLEAN                   ProfileMode;\r
+  BOOLEAN                   ExcludeMode;\r
 \r
 \r
+  SummaryMode     = FALSE;\r
+  VerboseMode     = FALSE;\r
+  AllMode         = FALSE;\r
+  RawMode         = FALSE;\r
+  TraceMode       = FALSE;\r
+  ProfileMode     = FALSE;\r
+  ExcludeMode     = FALSE;\r
   // Get DP's entry time as soon as possible.\r
   // This is used as the Shell-Phase end time.\r
   //\r
   // Get DP's entry time as soon as possible.\r
   // This is used as the Shell-Phase end time.\r
   //\r
index 8a4ce885cc8c4a245638b15253ec3cdac58e7752..f382d425b2a40f35e830d2baa0aadf46ef114df8 100644 (file)
   * 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
   * 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
+#ifndef _DP_INTELNAL_H_\r
+#define _DP_INTELNAL_H_\r
 //\r
 /// Module-Global Variables\r
 //\r
 /// Module-Global Variables\r
-/// @{\r
+///@{\r
 extern EFI_HII_HANDLE     gHiiHandle;\r
 extern CHAR16             *mPrintTokenBuffer;\r
 extern CHAR16             mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
 extern EFI_HII_HANDLE     gHiiHandle;\r
 extern CHAR16             *mPrintTokenBuffer;\r
 extern CHAR16             mGaugeString[DXE_PERFORMANCE_STRING_SIZE];\r
@@ -36,7 +37,7 @@ extern PERF_CUM_DATA      CumData[];
 /// Number of items for which we are gathering cumulative statistics.\r
 extern UINT32 const       NumCum;\r
 \r
 /// Number of items for which we are gathering cumulative statistics.\r
 extern UINT32 const       NumCum;\r
 \r
-/// @}\r
+///@}\r
 \r
 /** Calculate an event's duration in timer ticks.\r
   *\r
 \r
 /** Calculate an event's duration in timer ticks.\r
   *\r
@@ -287,3 +288,4 @@ DumpRawProfile(
   IN UINTN          Limit,\r
   IN BOOLEAN        ExcludeFlag\r
 );\r
   IN UINTN          Limit,\r
   IN BOOLEAN        ExcludeFlag\r
 );\r
+#endif\r
index 037c6fa064c1b28209f3100c3792cb81ca8062b8..b0e0eba509a9594a9b1920ab1f0d3625267335a5 100644 (file)
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
-/** Gather and print ALL Profiling Records.\r
-  *\r
-  * Displays all "interesting" Profile measurements in order.\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *         The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
-  *         They must not be in use by a calling function.\r
-  *\r
-  * @param[in]    Limit         The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print ALL Profiling Records.\r
+  \r
+  Displays all "interesting" Profile measurements in order.\r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+           The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
+           They must not be in use by a calling function.\r
+  \r
+  @param[in]    Limit         The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpAllProfile(\r
 **/\r
 VOID\r
 DumpAllProfile(\r
@@ -60,22 +61,23 @@ DumpAllProfile(
   return;\r
 }\r
 \r
   return;\r
 }\r
 \r
-/** Gather and print Raw Profile Records.\r
-  *\r
-  * All Profile measurements with a duration greater than or equal to\r
-  * mInterestThreshold are printed without interpretation.\r
-  *\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *\r
-  * @param[in]    Limit         The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print Raw Profile Records.\r
+  \r
+  All Profile measurements with a duration greater than or equal to\r
+  mInterestThreshold are printed without interpretation.\r
+  \r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+  \r
+  @param[in]    Limit         The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpRawProfile(\r
 **/\r
 VOID\r
 DumpRawProfile(\r
index ca71b625176ad7bc5130873a1497a0c1b031c0fd..2b9016f38dc5a147261e85c24aa8a2eee199a6b4 100644 (file)
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
-/** Collect verbose statistics about the logged performance measurements.\r
-  *\r
-  * General Summary information for all Trace measurements is gathered and\r
-  * stored within the SummaryData structure.  This information is both\r
-  * used internally by subsequent reporting functions, and displayed\r
-  * at the end of verbose reports.\r
-  *\r
-  * @pre  The SummaryData and CumData structures must be initialized\r
-  *       prior to calling this function.\r
-  *\r
-  * @post The SummaryData and CumData structures contain statistics for the\r
-  *       current performance logs.\r
+/** \r
+  Collect verbose statistics about the logged performance measurements.\r
+  \r
+  General Summary information for all Trace measurements is gathered and\r
+  stored within the SummaryData structure.  This information is both\r
+  used internally by subsequent reporting functions, and displayed\r
+  at the end of verbose reports.\r
+  \r
+  @pre  The SummaryData and CumData structures must be initialized\r
+        prior to calling this function.\r
+  \r
+  @post The SummaryData and CumData structures contain statistics for the\r
+        current performance logs.\r
 **/\r
 VOID\r
 GatherStatistics(\r
 **/\r
 VOID\r
 GatherStatistics(\r
@@ -99,22 +100,23 @@ GatherStatistics(
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Gather and print ALL Trace Records.\r
-  *\r
-  * Displays all "interesting" Trace measurements in order.<BR>\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *         The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
-  *         They must not be in use by a calling function.\r
-  *\r
-  * @param[in]    Limit       The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print ALL Trace Records.\r
+  \r
+  Displays all "interesting" Trace measurements in order.<BR>\r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+           The mGaugeString and mUnicodeToken global arrays are used for temporary string storage.\r
+           They must not be in use by a calling function.\r
+  \r
+  @param[in]    Limit       The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpAllTrace(\r
 **/\r
 VOID\r
 DumpAllTrace(\r
@@ -230,22 +232,23 @@ DumpAllTrace(
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Gather and print Raw Trace Records.\r
-  *\r
-  * All Trace measurements with a duration greater than or equal to\r
-  * mInterestThreshold are printed without interpretation.\r
-  *\r
-  * The number of records displayed is controlled by:\r
-  *   - records with a duration less than mInterestThreshold microseconds are not displayed.\r
-  *   - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
-  *   - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
-  *     displayed.\r
-  *\r
-  * @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
-  *\r
-  * @param[in]    Limit       The number of records to print.  Zero is ALL.\r
-  * @param[in]    ExcludeFlag TRUE to exclude individual Cumulative items from display.\r
-  *\r
+/** \r
+  Gather and print Raw Trace Records.\r
+  \r
+  All Trace measurements with a duration greater than or equal to\r
+  mInterestThreshold are printed without interpretation.\r
+  \r
+  The number of records displayed is controlled by:\r
+     - records with a duration less than mInterestThreshold microseconds are not displayed.\r
+     - No more than Limit records are displayed.  A Limit of zero will not limit the output.\r
+     - If the ExcludeFlag is TRUE, records matching entries in the CumData array are not\r
+       displayed.\r
+  \r
+  @pre    The mInterestThreshold global variable is set to the shortest duration to be printed.\r
+  \r
+  @param[in]    Limit       The number of records to print.  Zero is ALL.\r
+  @param[in]    ExcludeFlag TRUE to exclude individual Cumulative items from display.\r
+  \r
 **/\r
 VOID\r
 DumpRawTrace(\r
 **/\r
 VOID\r
 DumpRawTrace(\r
@@ -305,10 +308,11 @@ DumpRawTrace(
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Gather and print Major Phase metrics.\r
-  *\r
-  * @param[in]    Ticker      The timer value for the END of Shell phase\r
-  *\r
+/** \r
+  Gather and print Major Phase metrics.\r
+  \r
+  @param[in]    Ticker      The timer value for the END of Shell phase\r
+  \r
 **/\r
 VOID\r
 ProcessPhases(\r
 **/\r
 VOID\r
 ProcessPhases(\r
@@ -316,18 +320,24 @@ ProcessPhases(
   )\r
 {\r
   MEASUREMENT_RECORD        Measurement;\r
   )\r
 {\r
   MEASUREMENT_RECORD        Measurement;\r
-  UINT64                    BdsTimeoutValue = 0;\r
-  UINT64                    SecTime         = 0;\r
-  UINT64                    PeiTime         = 0;\r
-  UINT64                    DxeTime         = 0;\r
-  UINT64                    BdsTime         = 0;\r
-  UINT64                    ShellTime       = 0;\r
+  UINT64                    BdsTimeoutValue;\r
+  UINT64                    SecTime;\r
+  UINT64                    PeiTime;\r
+  UINT64                    DxeTime;\r
+  UINT64                    BdsTime;\r
+  UINT64                    ShellTime;\r
   UINT64                    ElapsedTime;\r
   UINT64                    Duration;\r
   UINT64                    Total;\r
   EFI_STRING                StringPtr;\r
   UINTN                     LogEntryKey;\r
 \r
   UINT64                    ElapsedTime;\r
   UINT64                    Duration;\r
   UINT64                    Total;\r
   EFI_STRING                StringPtr;\r
   UINTN                     LogEntryKey;\r
 \r
+  BdsTimeoutValue = 0;\r
+  SecTime         = 0;\r
+  PeiTime         = 0;\r
+  DxeTime         = 0;\r
+  BdsTime         = 0;\r
+  ShellTime       = 0;   \r
   //\r
   // Get Execution Phase Statistics\r
   //\r
   //\r
   // Get Execution Phase Statistics\r
   //\r
@@ -434,11 +444,12 @@ ProcessPhases(
   PrintToken (STRING_TOKEN (STR_DP_TOTAL_DURATION), Total);\r
 }\r
 \r
   PrintToken (STRING_TOKEN (STR_DP_TOTAL_DURATION), Total);\r
 }\r
 \r
-/** Gather and print Handle data.\r
-  *\r
-  * @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
-  *\r
-  * @return       Status from a call to gBS->LocateHandle().\r
+/** \r
+  Gather and print Handle data.\r
+  \r
+  @param[in]    ExcludeFlag   TRUE to exclude individual Cumulative items from display.\r
+  \r
+  @return       Status from a call to gBS->LocateHandle().\r
 **/\r
 EFI_STATUS\r
 ProcessHandles(\r
 **/\r
 EFI_STATUS\r
 ProcessHandles(\r
@@ -534,10 +545,11 @@ ProcessHandles(
   return Status;\r
 }\r
 \r
   return Status;\r
 }\r
 \r
-/** Gather and print PEIM data.\r
-  *\r
-  * Only prints complete PEIM records\r
-  *\r
+/** \r
+  Gather and print PEIM data.\r
+  \r
+  Only prints complete PEIM records\r
+  \r
 **/\r
 VOID\r
 ProcessPeims(\r
 **/\r
 VOID\r
 ProcessPeims(\r
@@ -589,14 +601,14 @@ ProcessPeims(
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Gather and print global data.\r
-  *\r
-  * Strips out incomplete or "Execution Phase" records\r
-  * Only prints records where Handle is NULL\r
-  * Increment TIndex for every record, even skipped ones, so that we have an\r
-  * indication of every measurement record taken.\r
-  *\r
-  *\r
+/** \r
+  Gather and print global data.\r
+  \r
+  Strips out incomplete or "Execution Phase" records\r
+  Only prints records where Handle is NULL\r
+  Increment TIndex for every record, even skipped ones, so that we have an\r
+  indication of every measurement record taken.\r
+  \r
 **/\r
 VOID\r
 ProcessGlobal(\r
 **/\r
 VOID\r
 ProcessGlobal(\r
@@ -651,20 +663,21 @@ ProcessGlobal(
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Gather and print cumulative data.\r
-  *\r
-  * Traverse the measurement records and:<BR>\r
-  * For each record with a Token listed in the CumData array:<BR>\r
-  *   - Update the instance count and the total, minimum, and maximum durations.\r
-  * Finally, print the gathered cumulative statistics.\r
-  *\r
+/** \r
+  Gather and print cumulative data.\r
+  \r
+  Traverse the measurement records and:<BR>\r
+  For each record with a Token listed in the CumData array:<BR>\r
+     - Update the instance count and the total, minimum, and maximum durations.\r
+  Finally, print the gathered cumulative statistics.\r
+  \r
 **/\r
 VOID\r
 ProcessCumulative(\r
   VOID\r
 )\r
 {\r
 **/\r
 VOID\r
 ProcessCumulative(\r
   VOID\r
 )\r
 {\r
-  UINT64                    avgval;         // the computed average duration\r
+  UINT64                    Avgval;         // the computed average duration\r
   EFI_STRING                StringPtr;\r
   UINTN                     TIndex;\r
 \r
   EFI_STRING                StringPtr;\r
   UINTN                     TIndex;\r
 \r
@@ -678,12 +691,12 @@ ProcessCumulative(
   PrintToken (STRING_TOKEN (STR_DP_DASHES));\r
 \r
   for ( TIndex = 0; TIndex < NumCum; ++TIndex) {\r
   PrintToken (STRING_TOKEN (STR_DP_DASHES));\r
 \r
   for ( TIndex = 0; TIndex < NumCum; ++TIndex) {\r
-    avgval = DivU64x32 (CumData[TIndex].Duration, CumData[TIndex].Count);\r
+    Avgval = DivU64x32 (CumData[TIndex].Duration, CumData[TIndex].Count);\r
     PrintToken (STRING_TOKEN (STR_DP_CUMULATIVE_STATS),\r
                 CumData[TIndex].Name,\r
                 CumData[TIndex].Count,\r
                 DurationInMicroSeconds(CumData[TIndex].Duration),\r
     PrintToken (STRING_TOKEN (STR_DP_CUMULATIVE_STATS),\r
                 CumData[TIndex].Name,\r
                 CumData[TIndex].Count,\r
                 DurationInMicroSeconds(CumData[TIndex].Duration),\r
-                DurationInMicroSeconds(avgval),\r
+                DurationInMicroSeconds(Avgval),\r
                 DurationInMicroSeconds(CumData[TIndex].MinDur),\r
                 DurationInMicroSeconds(CumData[TIndex].MaxDur)\r
                );\r
                 DurationInMicroSeconds(CumData[TIndex].MinDur),\r
                 DurationInMicroSeconds(CumData[TIndex].MaxDur)\r
                );\r
index 1d48e1430a112e956a457e41bf1f8b0ca3a416c9..1c40e8395040e92ff4ceb5c3c6cd8957f3f0ff4e 100644 (file)
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
 #include "Literals.h"\r
 #include "DpInternal.h"\r
 \r
-/** Calculate an event's duration in timer ticks.\r
-  *\r
-  * Given the count direction and the event's start and end timer values,\r
-  * calculate the duration of the event in timer ticks.  Information for\r
-  * the current measurement is pointed to by the parameter.\r
-  *\r
-  * If the measurement's start time is 1, it indicates that the developer\r
-  * is indicating that the measurement began at the release of reset.\r
-  * The start time is adjusted to the timer's starting count before performing\r
-  * the elapsed time calculation.\r
-  *\r
-  * The calculated duration, in ticks, is the absolute difference between\r
-  * the measurement's ending and starting counts.\r
-  *\r
-  * @pre  The global TimerInfo structure must have already been initialized\r
-  *       before this function is called.\r
-  *\r
-  * @param[in,out]    Measurement   Pointer to a MEASUREMENT_RECORD structure containing\r
-  *                   data for the current measurement.\r
-  *\r
-  * @return       The 64-bit duration of the event.\r
+/** \r
+  Calculate an event's duration in timer ticks.\r
+  \r
+  Given the count direction and the event's start and end timer values,\r
+  calculate the duration of the event in timer ticks.  Information for\r
+  the current measurement is pointed to by the parameter.\r
+  \r
+  If the measurement's start time is 1, it indicates that the developer\r
+  is indicating that the measurement began at the release of reset.\r
+  The start time is adjusted to the timer's starting count before performing\r
+  the elapsed time calculation.\r
+  \r
+  The calculated duration, in ticks, is the absolute difference between\r
+  the measurement's ending and starting counts.\r
+  \r
+  @param Measurement   Pointer to a MEASUREMENT_RECORD structure containing\r
+                       data for the current measurement.\r
+  \r
+  @return              The 64-bit duration of the event.\r
 **/\r
 UINT64\r
 GetDuration (\r
 **/\r
 UINT64\r
 GetDuration (\r
@@ -85,15 +83,16 @@ GetDuration (
   return Duration;\r
 }\r
 \r
   return Duration;\r
 }\r
 \r
-/** Determine whether the Measurement record is for an EFI Phase.\r
-  *\r
-  * The Token and Module members of the measurement record are checked.\r
-  * Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.\r
-  *\r
-  * @param[in]  Measurement A pointer to the Measurement record to test.\r
-  *\r
-  * @retval     TRUE        The measurement record is for an EFI Phase.\r
-  * @retval     FALSE       The measurement record is NOT for an EFI Phase.\r
+/** \r
+  Determine whether the Measurement record is for an EFI Phase.\r
+  \r
+  The Token and Module members of the measurement record are checked.\r
+  Module must be empty and Token must be one of SEC, PEI, DXE, BDS, or SHELL.\r
+  \r
+  @param[in]  Measurement A pointer to the Measurement record to test.\r
+  \r
+  @retval     TRUE        The measurement record is for an EFI Phase.\r
+  @retval     FALSE       The measurement record is NOT for an EFI Phase.\r
 **/\r
 BOOLEAN\r
 IsPhase(\r
 **/\r
 BOOLEAN\r
 IsPhase(\r
@@ -111,16 +110,17 @@ IsPhase(
   return RetVal;\r
 }\r
 \r
   return RetVal;\r
 }\r
 \r
-/** Get the file name portion of the Pdb File Name.\r
-  *\r
-  * The portion of the Pdb File Name between the last backslash and\r
-  * either a following period or the end of the string is converted\r
-  * to Unicode and copied into UnicodeBuffer.  The name is truncated,\r
-  * if necessary, to ensure that UnicodeBuffer is not overrun.\r
-  *\r
-  * @param[in]  PdbFileName     Pdb file name.\r
-  * @param[out] UnicodeBuffer   The resultant Unicode File Name.\r
-  *\r
+/** \r
+  Get the file name portion of the Pdb File Name.\r
+  \r
+  The portion of the Pdb File Name between the last backslash and\r
+  either a following period or the end of the string is converted\r
+  to Unicode and copied into UnicodeBuffer.  The name is truncated,\r
+  if necessary, to ensure that UnicodeBuffer is not overrun.\r
+  \r
+  @param[in]  PdbFileName     Pdb file name.\r
+  @param[out] UnicodeBuffer   The resultant Unicode File Name.\r
+  \r
 **/\r
 VOID\r
 GetShortPdbFileName (\r
 **/\r
 VOID\r
 GetShortPdbFileName (\r
@@ -163,13 +163,14 @@ GetShortPdbFileName (
   }\r
 }\r
 \r
   }\r
 }\r
 \r
-/** Get a human readable name for an image handle.\r
-  *\r
-  * @param[in]    Handle\r
-  *\r
-  * @post   The resulting Unicode name string is stored in the\r
-  *         mGaugeString global array.\r
-  *\r
+/** \r
+  Get a human readable name for an image handle.\r
+  \r
+  @param[in]    Handle\r
+  \r
+  @post   The resulting Unicode name string is stored in the\r
+          mGaugeString global array.\r
+  \r
 **/\r
 VOID\r
 GetNameFromHandle (\r
 **/\r
 VOID\r
 GetNameFromHandle (\r
@@ -227,17 +228,18 @@ GetNameFromHandle (
   return ;\r
 }\r
 \r
   return ;\r
 }\r
 \r
-/** Calculate the Duration in microseconds.\r
-  *\r
-  * Duration is multiplied by 1000, instead of Frequency being divided by 1000 or\r
-  * multiplying the result by 1000, in order to maintain precision.  Since Duration is\r
-  * a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.\r
-  *\r
-  * The time is calculated as (Duration * 1000) / Timer_Frequency.\r
-  *\r
-  * @param[in]  Duration   The event duration in timer ticks.\r
-  *\r
-  * @return     A 64-bit value which is the Elapsed time in microseconds.\r
+/** \r
+  Calculate the Duration in microseconds.\r
+  \r
+  Duration is multiplied by 1000, instead of Frequency being divided by 1000 or\r
+  multiplying the result by 1000, in order to maintain precision.  Since Duration is\r
+  a 64-bit value, multiplying it by 1000 is unlikely to produce an overflow.\r
+  \r
+  The time is calculated as (Duration * 1000) / Timer_Frequency.\r
+  \r
+  @param[in]  Duration   The event duration in timer ticks.\r
+  \r
+  @return     A 64-bit value which is the Elapsed time in microseconds.\r
 **/\r
 UINT64\r
 DurationInMicroSeconds (\r
 **/\r
 UINT64\r
 DurationInMicroSeconds (\r
@@ -250,12 +252,14 @@ DurationInMicroSeconds (
   return DivU64x32 (Temp, TimerInfo.Frequency);\r
 }\r
 \r
   return DivU64x32 (Temp, TimerInfo.Frequency);\r
 }\r
 \r
-/** Formatted Print using a Hii Token to reference the localized format string.\r
-  *\r
-  * @param[in]  Token   A HII token associated with a localized Unicode string.\r
-  *\r
-  * @return             The number of characters converted by UnicodeVSPrint().\r
-  *\r
+/** \r
+  Formatted Print using a Hii Token to reference the localized format string.\r
+  \r
+  @param[in]  Token   A HII token associated with a localized Unicode string.\r
+  @param[in]  ...     The variable argument list.\r
+  \r
+  @return             The number of characters converted by UnicodeVSPrint().\r
+  \r
 **/\r
 UINTN\r
 PrintToken (\r
 **/\r
 UINTN\r
 PrintToken (\r
@@ -288,17 +292,18 @@ PrintToken (
   return Return;\r
 }\r
 \r
   return Return;\r
 }\r
 \r
-/** Get index of Measurement Record's match in the CumData array.\r
-  *\r
-  * If the Measurement's Token value matches a Token in one of the CumData\r
-  * records, the index of the matching record is returned.  The returned\r
-  * index is a signed value so that negative values can indicate that\r
-  * the Measurement didn't match any entry in the CumData array.\r
-  *\r
-  * @param[in]  Measurement A pointer to a Measurement Record to match against the CumData array.\r
-  *\r
-  * @retval     <0    Token is not in the CumData array.\r
-  * @retval     >=0   Return value is the index into CumData where Token is found.\r
+/** \r
+  Get index of Measurement Record's match in the CumData array.\r
+  \r
+  If the Measurement's Token value matches a Token in one of the CumData\r
+  records, the index of the matching record is returned.  The returned\r
+  index is a signed value so that negative values can indicate that\r
+  the Measurement didn't match any entry in the CumData array.\r
+  \r
+  @param[in]  Measurement A pointer to a Measurement Record to match against the CumData array.\r
+  \r
+  @retval     <0    Token is not in the CumData array.\r
+  @retval     >=0   Return value is the index into CumData where Token is found.\r
 **/\r
 INTN\r
 GetCumulativeItem(\r
 **/\r
 INTN\r
 GetCumulativeItem(\r
index b9ba585937782e2d6241c63b18629a84c22de5f4..8df74e16260e0bd7d908463a12d367fc2319263e 100644 (file)
@@ -17,7 +17,7 @@
 #ifndef _GENERIC_ICH_H_\r
 #define _GENERIC_ICH_H_\r
 \r
 #ifndef _GENERIC_ICH_H_\r
 #define _GENERIC_ICH_H_\r
 \r
-/** @defgroup GenericIchDefs  Generic ICH Definitions.\r
+/** GenericIchDefs  Generic ICH Definitions.\r
 \r
 Definitions beginning with "R_" are registers.\r
 Definitions beginning with "B_" are bits within registers.\r
 \r
 Definitions beginning with "R_" are registers.\r
 Definitions beginning with "B_" are bits within registers.\r
@@ -25,21 +25,21 @@ Definitions beginning with "V_" are meaningful values of bits within the registe
 **/\r
 ///@{\r
 \r
 **/\r
 ///@{\r
 \r
-/// @defgroup IchPciAddressing  PCI Bus Address for ICH.\r
+/// IchPciAddressing  PCI Bus Address for ICH.\r
 ///@{\r
 #define PCI_BUS_NUMBER_ICH                0x00  ///< ICH is on PCI Bus 0.\r
 #define PCI_DEVICE_NUMBER_ICH_LPC           31  ///< ICH is Device 31.\r
 #define PCI_FUNCTION_NUMBER_ICH_LPC          0  ///< ICH is Function 0.\r
 ///@}\r
 \r
 ///@{\r
 #define PCI_BUS_NUMBER_ICH                0x00  ///< ICH is on PCI Bus 0.\r
 #define PCI_DEVICE_NUMBER_ICH_LPC           31  ///< ICH is Device 31.\r
 #define PCI_FUNCTION_NUMBER_ICH_LPC          0  ///< ICH is Function 0.\r
 ///@}\r
 \r
-/// @defgroup IchAcpiCntr   Control for the ICH's ACPI Counter.\r
+/// IchAcpiCntr   Control for the ICH's ACPI Counter.\r
 ///@{\r
 #define R_ICH_LPC_ACPI_BASE                   0x40\r
 #define R_ICH_LPC_ACPI_CNT                    0x44\r
 #define   B_ICH_LPC_ACPI_CNT_ACPI_EN              0x80\r
 ///@}\r
 \r
 ///@{\r
 #define R_ICH_LPC_ACPI_BASE                   0x40\r
 #define R_ICH_LPC_ACPI_CNT                    0x44\r
 #define   B_ICH_LPC_ACPI_CNT_ACPI_EN              0x80\r
 ///@}\r
 \r
-/// @defgroup IchAcpiTimer  The ICH's ACPI Timer.\r
+/// IchAcpiTimer  The ICH's ACPI Timer.\r
 ///@{\r
 #define R_ACPI_PM1_TMR                        0x08\r
 #define   V_ACPI_TMR_FREQUENCY                    3579545\r
 ///@{\r
 #define R_ACPI_PM1_TMR                        0x08\r
 #define   V_ACPI_TMR_FREQUENCY                    3579545\r
index 4af635607a0d24b11fa84e9f34a2eebaf4101d63..69d93ce5f3edf1672d34fc78eafa908c069e30f2 100644 (file)
 \r
 STATIC UINT64   mTscFrequency;\r
 \r
 \r
 STATIC UINT64   mTscFrequency;\r
 \r
-#ifndef R_ICH_ACPI_PM1_TMR\r
-#define R_ICH_ACPI_PM1_TMR  R_ACPI_PM1_TMR\r
-#endif\r
-\r
 /** The constructor function determines the actual TSC frequency.\r
 \r
   The TSC counting frequency is determined by comparing how far it counts\r
 /** The constructor function determines the actual TSC frequency.\r
 \r
   The TSC counting frequency is determined by comparing how far it counts\r
@@ -108,7 +104,6 @@ TscTimerLibConstructor (
   @param[in]  Delay     A period of time to delay in ticks.\r
 \r
 **/\r
   @param[in]  Delay     A period of time to delay in ticks.\r
 \r
 **/\r
-STATIC\r
 VOID\r
 InternalX86Delay (\r
   IN      UINT64                    Delay\r
 VOID\r
 InternalX86Delay (\r
   IN      UINT64                    Delay\r