]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/Metronome/LegacyMetronome.h
Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
[mirror_edk2.git] / Vlv2TbltDevicePkg / Metronome / LegacyMetronome.h
1 /*++
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
9
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.
12
13
14 Module Name:
15
16 LegacyMetronome.h
17
18 Abstract:
19
20 Driver implementing the EFI 2.0 metronome protocol using the legacy PORT 61
21 timer.
22
23 --*/
24
25 #ifndef _LEGACY_METRONOME_H
26 #define _LEGACY_METRONOME_H
27
28 //
29 // Statements that include other files
30 //
31 #include "Protocol/Metronome.h"
32 #include "Protocol/CpuIo.h"
33 #include "Library/DebugLib.h"
34 #include "Library/UefiBootServicesTableLib.h"
35
36
37 //
38 // Private definitions
39 //
40 #define TICK_PERIOD 300
41 #define REFRESH_PORT 0x61
42 #define REFRESH_ON 0x10
43 #define REFRESH_OFF 0x00
44 #define TIMER1_CONTROL_PORT 0x43
45 #define TIMER1_COUNT_PORT 0x41
46 #define LOAD_COUNTER1_LSB 0x54
47 #define COUNTER1_COUNT 0x12
48
49 //
50 // Function Prototypes
51 //
52 /**
53 Waits for the TickNumber of ticks from a known platform time source.
54
55 @param This Pointer to the protocol instance.
56 @param TickNumber Tick Number to be waited
57
58 @retval EFI_SUCCESS If number of ticks occurred.
59 @retval EFI_NOT_FOUND Could not locate CPU IO protocol
60
61 **/
62 EFI_STATUS
63 EFIAPI
64 WaitForTick (
65 IN EFI_METRONOME_ARCH_PROTOCOL *This,
66 IN UINT32 TickNumber
67 );
68
69 #endif