]> git.proxmox.com Git - mirror_edk2.git/blame - EmulatorPkg/TimerDxe/Timer.h
EmulatorPkg: Fix Visual Studio build for IA32 & X64
[mirror_edk2.git] / EmulatorPkg / TimerDxe / Timer.h
CommitLineData
949f388f 1/*++ @file\r
2 Emu Emulation Architectural Protocol Driver as defined in UEFI/PI.\r
3 This Timer module uses an UNIX Thread to simulate the timer-tick driven\r
4 timer service.\r
5\r
6Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>\r
7Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.\r
d18d8a1d 8This program and the accompanying materials\r
9are licensed and made available under the terms and conditions of the BSD License\r
10which accompanies this distribution. The full text of the license may be found at\r
11http://opensource.org/licenses/bsd-license.php\r
12\r
13THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
14WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
949f388f 15\r
16\r
17**/\r
18\r
19#ifndef _TIMER_H_\r
20#define _TIMER_H_\r
21\r
22\r
23\r
24\r
25//\r
26// Legal timer value range in 100 ns units\r
27//\r
28#define TIMER_MINIMUM_VALUE 0\r
29#define TIMER_MAXIMUM_VALUE (0x100000000ULL - 1)\r
30\r
31//\r
32// Default timer value in 100 ns units (50 ms)\r
33//\r
34#define DEFAULT_TIMER_TICK_DURATION 500000\r
35\r
36//\r
37// Function Prototypes\r
38//\r
39EFI_STATUS\r
40EFIAPI\r
41EmuTimerDriverInitialize (\r
42 IN EFI_HANDLE ImageHandle,\r
43 IN EFI_SYSTEM_TABLE *SystemTable\r
44 );\r
45\r
46EFI_STATUS\r
47EFIAPI\r
48EmuTimerDriverRegisterHandler (\r
49 IN EFI_TIMER_ARCH_PROTOCOL *This,\r
50 IN EFI_TIMER_NOTIFY NotifyFunction\r
51 );\r
52\r
53EFI_STATUS\r
54EFIAPI\r
55EmuTimerDriverSetTimerPeriod (\r
56 IN EFI_TIMER_ARCH_PROTOCOL *This,\r
57 IN UINT64 TimerPeriod\r
58 );\r
59\r
60EFI_STATUS\r
61EFIAPI\r
62EmuTimerDriverGetTimerPeriod (\r
63 IN EFI_TIMER_ARCH_PROTOCOL *This,\r
64 OUT UINT64 *TimerPeriod\r
65 );\r
66\r
67EFI_STATUS\r
68EFIAPI\r
69EmuTimerDriverGenerateSoftInterrupt (\r
70 IN EFI_TIMER_ARCH_PROTOCOL *This\r
71 );\r
72\r
73#endif\r