]> git.proxmox.com Git - mirror_edk2.git/blame - EdkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.h
Initial import.
[mirror_edk2.git] / EdkModulePkg / Universal / DataHub / DataHub / Dxe / DataHub.h
CommitLineData
878ddf1f 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
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 This code supports a the private implementation \r
18 of the Data Hub protocol\r
19\r
20--*/\r
21\r
22#ifndef _DATA_HUB_H_\r
23#define _DATA_HUB_H_\r
24\r
25\r
26#define DATA_HUB_INSTANCE_SIGNATURE EFI_SIGNATURE_32 ('D', 'H', 'u', 'b')\r
27typedef struct {\r
28 UINT32 Signature;\r
29\r
30 EFI_HANDLE Handle;\r
31\r
32 //\r
33 // Produced protocol(s)\r
34 //\r
35 EFI_DATA_HUB_PROTOCOL DataHub;\r
36\r
37 //\r
38 // Private Data\r
39 //\r
40 //\r
41 // Updates to GlobalMonotonicCount, LogListHead, and FilterDriverListHead\r
42 // must be locked.\r
43 //\r
44 EFI_LOCK DataLock;\r
45\r
46 //\r
47 // Runing Monotonic Count to use for each error record.\r
48 // Increment AFTER use in an error record.\r
49 //\r
50 UINT64 GlobalMonotonicCount;\r
51\r
52 //\r
53 // List of EFI_DATA_ENTRY structures. This is the data log! The list\r
54 // must be in assending order of LogMonotonicCount.\r
55 //\r
56 LIST_ENTRY DataListHead;\r
57\r
58 //\r
59 // List of EFI_DATA_HUB_FILTER_DRIVER structures. Represents all\r
60 // the registered filter drivers.\r
61 //\r
62 LIST_ENTRY FilterDriverListHead;\r
63\r
64} DATA_HUB_INSTANCE;\r
65\r
66#define DATA_HUB_INSTANCE_FROM_THIS(this) CR (this, DATA_HUB_INSTANCE, DataHub, DATA_HUB_INSTANCE_SIGNATURE)\r
67\r
68//\r
69// Private data structure to contain the data log. One record per\r
70// structure. Head pointer to the list is the Log member of\r
71// EFI_DATA_ENTRY. Record is a copy of the data passed in.\r
72//\r
73#define EFI_DATA_ENTRY_SIGNATURE EFI_SIGNATURE_32 ('D', 'r', 'e', 'c')\r
74typedef struct {\r
75 UINT32 Signature;\r
76 LIST_ENTRY Link;\r
77\r
78 EFI_DATA_RECORD_HEADER *Record;\r
79\r
80 UINTN RecordSize;\r
81\r
82} EFI_DATA_ENTRY;\r
83\r
84#define DATA_ENTRY_FROM_LINK(link) CR (link, EFI_DATA_ENTRY, Link, EFI_DATA_ENTRY_SIGNATURE)\r
85\r
86//\r
87// Private data to contain the filter driver Event and it's\r
88// associated EFI_TPL.\r
89//\r
90#define EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('D', 'h', 'F', 'd')\r
91\r
92typedef struct {\r
93 UINT32 Signature;\r
94 LIST_ENTRY Link;\r
95\r
96 //\r
97 // Store Filter Driver Event and Tpl level it can be Signaled at.\r
98 //\r
99 EFI_EVENT Event;\r
100 EFI_TPL Tpl;\r
101\r
102 //\r
103 // Monotonic count on the get next operation for Event.\r
104 // Zero indicates get next has not been called for this event yet.\r
105 //\r
106 UINT64 GetNextMonotonicCount;\r
107\r
108 //\r
109 // Filter driver will register what class filter should be used.\r
110 //\r
111 UINT64 ClassFilter;\r
112\r
113 //\r
114 // Filter driver will register what record guid filter should be used.\r
115 //\r
116 EFI_GUID FilterDataRecordGuid;\r
117\r
118} DATA_HUB_FILTER_DRIVER;\r
119\r
120#define FILTER_ENTRY_FROM_LINK(link) CR (link, DATA_HUB_FILTER_DRIVER, Link, EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE)\r
121\r
122#endif\r