]> git.proxmox.com Git - mirror_edk2.git/blob - EmulatorPkg/TimerDxe/Timer.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / EmulatorPkg / TimerDxe / Timer.h
1 /*++ @file
2 Emu Emulation Architectural Protocol Driver as defined in UEFI/PI.
3 This Timer module uses an UNIX Thread to simulate the timer-tick driven
4 timer service.
5
6 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
7 Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.
8 SPDX-License-Identifier: BSD-2-Clause-Patent
9
10
11 **/
12
13 #ifndef _TIMER_H_
14 #define _TIMER_H_
15
16 //
17 // Legal timer value range in 100 ns units
18 //
19 #define TIMER_MINIMUM_VALUE 0
20 #define TIMER_MAXIMUM_VALUE (0x100000000ULL - 1)
21
22 //
23 // Default timer value in 100 ns units (50 ms)
24 //
25 #define DEFAULT_TIMER_TICK_DURATION 500000
26
27 //
28 // Function Prototypes
29 //
30 EFI_STATUS
31 EFIAPI
32 EmuTimerDriverInitialize (
33 IN EFI_HANDLE ImageHandle,
34 IN EFI_SYSTEM_TABLE *SystemTable
35 );
36
37 EFI_STATUS
38 EFIAPI
39 EmuTimerDriverRegisterHandler (
40 IN EFI_TIMER_ARCH_PROTOCOL *This,
41 IN EFI_TIMER_NOTIFY NotifyFunction
42 );
43
44 EFI_STATUS
45 EFIAPI
46 EmuTimerDriverSetTimerPeriod (
47 IN EFI_TIMER_ARCH_PROTOCOL *This,
48 IN UINT64 TimerPeriod
49 );
50
51 EFI_STATUS
52 EFIAPI
53 EmuTimerDriverGetTimerPeriod (
54 IN EFI_TIMER_ARCH_PROTOCOL *This,
55 OUT UINT64 *TimerPeriod
56 );
57
58 EFI_STATUS
59 EFIAPI
60 EmuTimerDriverGenerateSoftInterrupt (
61 IN EFI_TIMER_ARCH_PROTOCOL *This
62 );
63
64 #endif