Changeset 58466 in vbox for trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/TimestampDxe
- Timestamp:
- Oct 29, 2015 4:30:44 AM (9 years ago)
- Location:
- trunk/src/VBox/Devices/EFI/Firmware
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/Firmware
- Property svn:mergeinfo changed
/vendor/edk2/current merged: 103769-103776
- Property svn:mergeinfo changed
-
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c
r58464 r58466 1 1 /** @file 2 2 Implementation of Timestamp Protocol using UEFI APIs. 3 3 4 4 Copyright (c) 2013, Intel Corporation. All rights reserved.<BR> 5 5 This program and the accompanying materials … … 46 46 The caller should be prepared for the function to return the same value twice across successive calls. 47 47 The counter value will not go backwards other than when wrapping, as defined by EndValue in GetProperties(). 48 The frequency of the returned timestamp counter value must remain constant. Power management operations that 49 affect clocking must not change the returned counter frequency. The quantization of counter value updates may 50 vary as long as the value reflecting time passed remains consistent. 48 The frequency of the returned timestamp counter value must remain constant. Power management operations that 49 affect clocking must not change the returned counter frequency. The quantization of counter value updates may 50 vary as long as the value reflecting time passed remains consistent. 51 51 52 52 @retval The current value of the free running timestamp counter. … … 64 64 UINT64 TimestampValue; 65 65 TimestampValue = 0; 66 66 67 67 // 68 68 // Get the timestamp … … 73 73 TimestampValue = GetPerformanceCounter() - mTimerLibStartValue; 74 74 } 75 75 76 76 return TimestampValue; 77 77 } … … 82 82 @param[out] Properties The properties of the timestamp counter. 83 83 84 @retval EFI_SUCCESS The properties were successfully retrieved. 85 @retval EFI_DEVICE_ERROR An error occurred trying to retrieve the properties of the timestamp 86 counter subsystem. Properties is not pedated. 84 @retval EFI_SUCCESS The properties were successfully retrieved. 85 @retval EFI_DEVICE_ERROR An error occurred trying to retrieve the properties of the timestamp 86 counter subsystem. Properties is not pedated. 87 87 @retval EFI_INVALID_PARAMETER Properties is NULL. 88 88 … … 97 97 return EFI_INVALID_PARAMETER; 98 98 } 99 99 100 100 // 101 101 // Get timestamp properties 102 102 // 103 103 CopyMem((VOID *) Properties, (VOID *) &mTimestampProperties, sizeof (mTimestampProperties)); 104 104 105 105 return EFI_SUCCESS; 106 106 } … … 131 131 { 132 132 EFI_STATUS Status; 133 133 134 134 EFI_HANDLE TimestampHandle; 135 135 TimestampHandle = NULL; 136 136 137 137 // 138 138 // Get the start value, end value and frequency in Timerlib 139 139 // 140 140 mTimestampProperties.Frequency = GetPerformanceCounterProperties(&mTimerLibStartValue, &mTimerLibEndValue); 141 141 142 142 // 143 // Set the EndValue 143 // Set the EndValue 144 144 // 145 145 if (mTimerLibEndValue > mTimerLibStartValue) { … … 148 148 mTimestampProperties.EndValue = mTimerLibStartValue - mTimerLibEndValue; 149 149 } 150 150 151 151 DEBUG ((EFI_D_INFO, "TimerFrequency:0x%lx, TimerLibStartTime:0x%lx, TimerLibEndtime:0x%lx\n", mTimestampProperties.Frequency, mTimerLibStartValue, mTimerLibEndValue)); 152 152 153 153 // 154 154 // Install the Timestamp Protocol onto a new handle … … 160 160 NULL 161 161 ); 162 162 163 163 ASSERT_EFI_ERROR (Status); 164 164 -
trunk/src/VBox/Devices/EFI/Firmware/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf
r58464 r58466 33 33 34 34 [Sources] 35 TimestampDxe.c 35 TimestampDxe.c 36 36 37 37 [LibraryClasses]
Note:
See TracChangeset
for help on using the changeset viewer.