]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Framework/Protocol/DataHub/DataHub.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Framework / Protocol / DataHub / DataHub.h
CommitLineData
3eb9473e 1/*++\r
2\r
f57387d5
HT
3Copyright (c) 2004, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
3eb9473e 5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 DataHub.h\r
15\r
16Abstract:\r
17\r
18 The data hub protocol is used both by agents wishing to log\r
19 data and those wishing to be made aware of all information that\r
20 has been logged.\r
21\r
22 For more information please look at Intel Platform Innovation \r
23 Framework for EFI Data Hub Specification.\r
24\r
25--*/\r
26\r
27#ifndef __DATA_HUB_H__\r
28#define __DATA_HUB_H__\r
29\r
30#define EFI_DATA_HUB_PROTOCOL_GUID \\r
31 { \\r
7ccf38a3 32 0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x0, 0x80, 0xc7, 0x3c, 0x88, 0x81} \\r
3eb9473e 33 }\r
34\r
35//\r
36// EFI generic Data Hub Header\r
37//\r
38// A Data Record is an EFI_DATA_RECORD_HEADER followed by RecordSize bytes of\r
39// data. The format of the data is defined by the DataRecordGuid.\r
40//\r
41// If EFI_DATA_RECORD_HEADER is extended in the future the Version number must\r
42// change and the HeaderSize will change if the definition of\r
43// EFI_DATA_RECORD_HEADER is extended.\r
44//\r
45// The logger is responcible for initializing:\r
46// Version, HeaderSize, RecordSize, DataRecordGuid, DataRecordClass\r
47//\r
48// The Data Hub driver is responcible for initializing:\r
49// LogTime and LogMonotonicCount.\r
50//\r
51#define EFI_DATA_RECORD_HEADER_VERSION 0x0100\r
52typedef struct {\r
53 UINT16 Version;\r
54 UINT16 HeaderSize;\r
55 UINT32 RecordSize;\r
56 EFI_GUID DataRecordGuid;\r
57 EFI_GUID ProducerName;\r
58 UINT64 DataRecordClass;\r
59 EFI_TIME LogTime;\r
60 UINT64 LogMonotonicCount;\r
61} EFI_DATA_RECORD_HEADER;\r
62\r
63//\r
64// Definition of DataRecordClass. These are used to filter out class types\r
65// at a very high level. The DataRecordGuid still defines the format of\r
66// the data. See DateHub.doc for rules on what can and can not be a\r
67// new DataRecordClass\r
68//\r
69#define EFI_DATA_RECORD_CLASS_DEBUG 0x0000000000000001\r
70#define EFI_DATA_RECORD_CLASS_ERROR 0x0000000000000002\r
71#define EFI_DATA_RECORD_CLASS_DATA 0x0000000000000004\r
72#define EFI_DATA_RECORD_CLASS_PROGRESS_CODE 0x0000000000000008\r
73\r
74//\r
75// Forward reference for pure ANSI compatability\r
76//\r
77EFI_FORWARD_DECLARATION (EFI_DATA_HUB_PROTOCOL);\r
78\r
79typedef\r
80EFI_STATUS\r
81(EFIAPI *EFI_DATA_HUB_LOG_DATA) (\r
82 IN EFI_DATA_HUB_PROTOCOL * This,\r
83 IN EFI_GUID * DataRecordGuid,\r
84 IN EFI_GUID * ProducerName,\r
85 IN UINT64 DataRecordClass,\r
86 IN VOID *RawData,\r
87 IN UINT32 RawDataSize\r
88 );\r
89\r
90typedef\r
91EFI_STATUS\r
92(EFIAPI *EFI_DATA_HUB_GET_NEXT_RECORD) (\r
93 IN EFI_DATA_HUB_PROTOCOL * This,\r
94 IN OUT UINT64 *MonotonicCount,\r
95 IN EFI_EVENT * FilterDriver OPTIONAL,\r
96 OUT EFI_DATA_RECORD_HEADER **Record\r
97 );\r
98\r
99typedef\r
100EFI_STATUS\r
101(EFIAPI *EFI_DATA_HUB_REGISTER_FILTER_DRIVER) (\r
102 IN EFI_DATA_HUB_PROTOCOL * This,\r
103 IN EFI_EVENT FilterEvent,\r
104 IN EFI_TPL FilterTpl,\r
105 IN UINT64 FilterClass,\r
106 IN EFI_GUID * FilterDataRecordGuid OPTIONAL\r
107 );\r
108\r
109typedef\r
110EFI_STATUS\r
111(EFIAPI *EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER) (\r
112 IN EFI_DATA_HUB_PROTOCOL * This,\r
113 IN EFI_EVENT FilterEvent\r
114 );\r
115\r
5d46191d 116struct _EFI_DATA_HUB_PROTOCOL {\r
3eb9473e 117 EFI_DATA_HUB_LOG_DATA LogData;\r
118 EFI_DATA_HUB_GET_NEXT_RECORD GetNextRecord;\r
119 EFI_DATA_HUB_REGISTER_FILTER_DRIVER RegisterFilterDriver;\r
120 EFI_DATA_HUB_UNREGISTER_FILTER_DRIVER UnregisterFilterDriver;\r
5d46191d 121};\r
3eb9473e 122\r
123extern EFI_GUID gEfiDataHubProtocolGuid;\r
124\r
125#endif\r