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