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