]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Include/Protocol/Metronome.h
Updated headers to follow coding standard
[mirror_edk2.git] / MdePkg / Include / Protocol / Metronome.h
1 /** @file
2 Metronome Architectural Protocol as defined in DXE CIS
3
4 This code abstracts the DXE core to provide delay services.
5
6 Copyright (c) 2006, Intel Corporation
7 All rights reserved. This program and the accompanying materials
8 are licensed and made available under the terms and conditions of the BSD License
9 which accompanies this distribution. The full text of the license may be found at
10 http://opensource.org/licenses/bsd-license.php
11
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14
15 @par Revision Reference:
16 Version 0.91B.
17
18 **/
19
20 #ifndef __ARCH_PROTOCOL_METRONOME_H__
21 #define __ARCH_PROTOCOL_METRONOME_H__
22
23 //
24 // Global ID for the Metronome Architectural Protocol
25 //
26 #define EFI_METRONOME_ARCH_PROTOCOL_GUID \
27 { 0x26baccb2, 0x6f42, 0x11d4, {0xbc, 0xe7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81 } }
28
29 //
30 // Declare forward reference for the Metronome Architectural Protocol
31 //
32 typedef struct _EFI_METRONOME_ARCH_PROTOCOL EFI_METRONOME_ARCH_PROTOCOL;
33
34 /**
35 The WaitForTick() function waits for the number of ticks specified by
36 TickNumber from a known time source in the platform. If TickNumber of
37 ticks are detected, then EFI_SUCCESS is returned. The actual time passed
38 between entry of this function and the first tick is between 0 and
39 TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod
40 time has elapsed, wait for two ticks. This function waits for a hardware
41 event to determine when a tick occurs. It is possible for interrupt
42 processing, or exception processing to interrupt the execution of the
43 WaitForTick() function. Depending on the hardware source for the ticks, it
44 is possible for a tick to be missed. This function cannot guarantee that
45 ticks will not be missed. If a timeout occurs waiting for the specified
46 number of ticks, then EFI_TIMEOUT is returned.
47
48 @param This The EFI_METRONOME_ARCH_PROTOCOL instance.
49 @param TickNumber Number of ticks to wait.
50
51 @retval EFI_SUCCESS The wait for the number of ticks specified by TickNumber
52 succeeded.
53 @retval EFI_TIMEOUT A timeout occurred waiting for the specified number of ticks.
54
55 **/
56 typedef
57 EFI_STATUS
58 (EFIAPI *EFI_METRONOME_WAIT_FOR_TICK) (
59 IN EFI_METRONOME_ARCH_PROTOCOL *This,
60 IN UINT32 TickNumber
61 );
62
63 //
64 //
65
66 /**
67 Interface stucture for the Metronome Architectural Protocol.
68
69 @par Protocol Description:
70 This protocol provides access to a known time source in the platform to the
71 core. The core uses this known time source to produce core services that
72 require calibrated delays.
73
74 @param WaitForTick
75 Waits for a specified number of ticks from a known time source
76 in the platform. The actual time passed between entry of this
77 function and the first tick is between 0 and TickPeriod 100 nS
78 units. If you want to guarantee that at least TickPeriod time
79 has elapsed, wait for two ticks.
80
81 @param TickPeriod
82 The period of platform's known time source in 100 nS units.
83 This value on any platform must be at least 10 uS, and must not
84 exceed 200 uS. The value in this field is a constant that must
85 not be modified after the Metronome architectural protocol is
86 installed. All consumers must treat this as a read-only field.
87
88 **/
89 struct _EFI_METRONOME_ARCH_PROTOCOL {
90 EFI_METRONOME_WAIT_FOR_TICK WaitForTick;
91 UINT32 TickPeriod;
92 };
93
94 extern EFI_GUID gEfiMetronomeArchProtocolGuid;
95
96 #endif