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