]>
git.proxmox.com Git - mirror_edk2.git/blob - PcAtChipsetPkg/Library/AcpiTimerLib/BaseAcpiTimerLib.c
21fdb79908b89baedc235c283f6ea63bcf45e29f
2 ACPI Timer implements one instance of Timer Library.
4 Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #include <Library/TimerLib.h>
17 #include <Library/BaseLib.h>
20 Internal function to retrieves the 64-bit frequency in Hz.
22 Internal function to retrieves the 64-bit frequency in Hz.
24 @return The frequency in Hz.
28 InternalGetPerformanceCounterFrequency (
32 BOOLEAN InterruptState
;
36 InterruptState
= SaveAndDisableInterrupts ();
37 Count
= GetPerformanceCounter ();
38 MicroSecondDelay (100);
39 Frequency
= MultU64x32 (GetPerformanceCounter () - Count
, 10000);
40 SetInterruptState (InterruptState
);