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
6 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
7 Portions copyright (c) 2010 - 2011, Apple Inc. All rights reserved.
8 This program and the accompanying materials
9 are licensed and made available under the terms and conditions of the BSD License
10 which accompanies this distribution. The full text of the license may be found at
11 http://opensource.org/licenses/bsd-license.php
13 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
14 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
26 // Legal timer value range in 100 ns units
28 #define TIMER_MINIMUM_VALUE 0
29 #define TIMER_MAXIMUM_VALUE (0x100000000ULL - 1)
32 // Default timer value in 100 ns units (50 ms)
34 #define DEFAULT_TIMER_TICK_DURATION 500000
37 // Function Prototypes
41 EmuTimerDriverInitialize (
42 IN EFI_HANDLE ImageHandle
,
43 IN EFI_SYSTEM_TABLE
*SystemTable
48 EmuTimerDriverRegisterHandler (
49 IN EFI_TIMER_ARCH_PROTOCOL
*This
,
50 IN EFI_TIMER_NOTIFY NotifyFunction
55 EmuTimerDriverSetTimerPeriod (
56 IN EFI_TIMER_ARCH_PROTOCOL
*This
,
62 EmuTimerDriverGetTimerPeriod (
63 IN EFI_TIMER_ARCH_PROTOCOL
*This
,
64 OUT UINT64
*TimerPeriod
69 EmuTimerDriverGenerateSoftInterrupt (
70 IN EFI_TIMER_ARCH_PROTOCOL
*This