diff options
Diffstat (limited to 'MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c')
-rw-r--r-- | MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c index a318ae00b5..c6ac039219 100644 --- a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c +++ b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c @@ -17,17 +17,17 @@ SPDX-License-Identifier: BSD-2-Clause-Patent //
// The StartValue in TimerLib
//
-UINT64 mTimerLibStartValue = 0;
+UINT64 mTimerLibStartValue = 0;
//
// The EndValue in TimerLib
//
-UINT64 mTimerLibEndValue = 0;
+UINT64 mTimerLibEndValue = 0;
//
// The properties of timestamp
//
-EFI_TIMESTAMP_PROPERTIES mTimestampProperties = {
+EFI_TIMESTAMP_PROPERTIES mTimestampProperties = {
0,
0
};
@@ -56,15 +56,16 @@ TimestampDriverGetTimestamp ( // The timestamp of Timestamp Protocol
//
UINT64 TimestampValue;
+
TimestampValue = 0;
//
// Get the timestamp
//
if (mTimerLibStartValue > mTimerLibEndValue) {
- TimestampValue = mTimerLibStartValue - GetPerformanceCounter();
+ TimestampValue = mTimerLibStartValue - GetPerformanceCounter ();
} else {
- TimestampValue = GetPerformanceCounter() - mTimerLibStartValue;
+ TimestampValue = GetPerformanceCounter () - mTimerLibStartValue;
}
return TimestampValue;
@@ -83,8 +84,8 @@ TimestampDriverGetTimestamp ( **/
EFI_STATUS
EFIAPI
-TimestampDriverGetProperties(
- OUT EFI_TIMESTAMP_PROPERTIES *Properties
+TimestampDriverGetProperties (
+ OUT EFI_TIMESTAMP_PROPERTIES *Properties
)
{
if (Properties == NULL) {
@@ -94,7 +95,7 @@ TimestampDriverGetProperties( //
// Get timestamp properties
//
- CopyMem((VOID *) Properties, (VOID *) &mTimestampProperties, sizeof (mTimestampProperties));
+ CopyMem ((VOID *)Properties, (VOID *)&mTimestampProperties, sizeof (mTimestampProperties));
return EFI_SUCCESS;
}
@@ -126,12 +127,13 @@ TimestampDriverInitialize ( EFI_STATUS Status;
EFI_HANDLE TimestampHandle;
+
TimestampHandle = NULL;
//
// Get the start value, end value and frequency in Timerlib
//
- mTimestampProperties.Frequency = GetPerformanceCounterProperties(&mTimerLibStartValue, &mTimerLibEndValue);
+ mTimestampProperties.Frequency = GetPerformanceCounterProperties (&mTimerLibStartValue, &mTimerLibEndValue);
//
// Set the EndValue
|