]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Universal / TimestampDxe / TimestampDxe.c
index a318ae00b5e85dc10a0e509c2bbcca517c0b2118..c6ac0392195c957c371f794ddfb73d01dfd8fc67 100644 (file)
@@ -17,17 +17,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
 //\r
 // The StartValue in TimerLib\r
 //\r
-UINT64 mTimerLibStartValue = 0;\r
+UINT64  mTimerLibStartValue = 0;\r
 \r
 //\r
 // The EndValue in TimerLib\r
 //\r
-UINT64 mTimerLibEndValue = 0;\r
+UINT64  mTimerLibEndValue = 0;\r
 \r
 //\r
 // The properties of timestamp\r
 //\r
-EFI_TIMESTAMP_PROPERTIES mTimestampProperties = {\r
+EFI_TIMESTAMP_PROPERTIES  mTimestampProperties = {\r
   0,\r
   0\r
 };\r
@@ -56,15 +56,16 @@ TimestampDriverGetTimestamp (
   // The timestamp of Timestamp Protocol\r
   //\r
   UINT64  TimestampValue;\r
+\r
   TimestampValue = 0;\r
 \r
   //\r
   // Get the timestamp\r
   //\r
   if (mTimerLibStartValue > mTimerLibEndValue) {\r
-    TimestampValue = mTimerLibStartValue - GetPerformanceCounter();\r
+    TimestampValue = mTimerLibStartValue - GetPerformanceCounter ();\r
   } else {\r
-    TimestampValue = GetPerformanceCounter() - mTimerLibStartValue;\r
+    TimestampValue = GetPerformanceCounter () - mTimerLibStartValue;\r
   }\r
 \r
   return TimestampValue;\r
@@ -83,8 +84,8 @@ TimestampDriverGetTimestamp (
 **/\r
 EFI_STATUS\r
 EFIAPI\r
-TimestampDriverGetProperties(\r
-  OUT   EFI_TIMESTAMP_PROPERTIES       *Properties\r
+TimestampDriverGetProperties (\r
+  OUT   EFI_TIMESTAMP_PROPERTIES  *Properties\r
   )\r
 {\r
   if (Properties == NULL) {\r
@@ -94,7 +95,7 @@ TimestampDriverGetProperties(
   //\r
   // Get timestamp properties\r
   //\r
-  CopyMem((VOID *) Properties, (VOID *) &mTimestampProperties, sizeof (mTimestampProperties));\r
+  CopyMem ((VOID *)Properties, (VOID *)&mTimestampProperties, sizeof (mTimestampProperties));\r
 \r
   return EFI_SUCCESS;\r
 }\r
@@ -126,12 +127,13 @@ TimestampDriverInitialize (
   EFI_STATUS  Status;\r
 \r
   EFI_HANDLE  TimestampHandle;\r
+\r
   TimestampHandle = NULL;\r
 \r
   //\r
   // Get the start value, end value and frequency in Timerlib\r
   //\r
-  mTimestampProperties.Frequency = GetPerformanceCounterProperties(&mTimerLibStartValue, &mTimerLibEndValue);\r
+  mTimestampProperties.Frequency = GetPerformanceCounterProperties (&mTimerLibStartValue, &mTimerLibEndValue);\r
 \r
   //\r
   // Set the EndValue\r