Changeset 99404 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
- Timestamp:
- Apr 14, 2023 3:17:44 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 156854
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776,129194-145445 /vendor/edk2/current 103735-103757,103769-103776,129194-156846
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/OvmfPkg/Library/AcpiTimerLib/AcpiTimerLib.c
r80721 r99404 31 31 VOID 32 32 InternalAcpiDelay ( 33 IN UINT32 34 ) 35 { 36 UINT32 37 UINT32 38 39 Times 40 Delay 33 IN UINT32 Delay 34 ) 35 { 36 UINT32 Ticks; 37 UINT32 Times; 38 39 Times = Delay >> 22; 40 Delay &= BIT22 - 1; 41 41 do { 42 42 // 43 43 // The target timer count is calculated here 44 44 // 45 Ticks 46 Delay 45 Ticks = InternalAcpiGetTimerTick () + Delay; 46 Delay = BIT22; 47 47 // 48 48 // Wait until time out … … 69 69 EFIAPI 70 70 MicroSecondDelay ( 71 IN UINTN 71 IN UINTN MicroSeconds 72 72 ) 73 73 { … … 97 97 EFIAPI 98 98 NanoSecondDelay ( 99 IN UINTN 99 IN UINTN NanoSeconds 100 100 ) 101 101 { … … 159 159 EFIAPI 160 160 GetPerformanceCounterProperties ( 161 OUT UINT64 *StartValue, OPTIONAL162 OUT UINT64 161 OUT UINT64 *StartValue OPTIONAL, 162 OUT UINT64 *EndValue OPTIONAL 163 163 ) 164 164 { … … 188 188 EFIAPI 189 189 GetTimeInNanoSecond ( 190 IN UINT64 190 IN UINT64 Ticks 191 191 ) 192 192 { … … 205 205 // will not overflow 64-bit. 206 206 // 207 NanoSeconds += DivU64x32 (MultU64x32 ((UINT64) 207 NanoSeconds += DivU64x32 (MultU64x32 ((UINT64)Remainder, 1000000000u), ACPI_TIMER_FREQUENCY); 208 208 209 209 return NanoSeconds;
Note:
See TracChangeset
for help on using the changeset viewer.