]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/DataHubDxe/DataHub.h
Remove extra #includes where possible to make build more efficient
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / DataHubDxe / DataHub.h
CommitLineData
8b7a3578 1/** @file\r
3db51098 2 This code supports a the private implementation \r
3 of the Data Hub protocol\r
4 \r
83f6d1a0 5Copyright (c) 2006, Intel Corporation \r
6All rights reserved. This program and the accompanying materials \r
7are licensed and made available under the terms and conditions of the BSD License \r
8which accompanies this distribution. The full text of the license may be found at \r
9http://opensource.org/licenses/bsd-license.php \r
10 \r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
13\r
3db51098 14**/\r
83f6d1a0 15\r
16#ifndef _DATA_HUB_H_\r
17#define _DATA_HUB_H_\r
18\r
ed7748fe 19\r
79bc7a89 20#include <FrameworkDxe.h>\r
ed7748fe 21\r
83f6d1a0 22#include <Protocol/DataHub.h>\r
ed7748fe 23\r
83f6d1a0 24#include <Library/DebugLib.h>\r
25#include <Library/UefiDriverEntryPoint.h>\r
26#include <Library/UefiLib.h>\r
27#include <Library/BaseLib.h>\r
28#include <Library/BaseMemoryLib.h>\r
29#include <Library/MemoryAllocationLib.h>\r
30#include <Library/UefiBootServicesTableLib.h>\r
31#include <Library/UefiRuntimeServicesTableLib.h>\r
32\r
f02bd376 33#define DATA_HUB_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'H', 'u', 'b')\r
83f6d1a0 34typedef struct {\r
35 UINT32 Signature;\r
36\r
37 EFI_HANDLE Handle;\r
38\r
39 //\r
40 // Produced protocol(s)\r
41 //\r
42 EFI_DATA_HUB_PROTOCOL DataHub;\r
43\r
44 //\r
45 // Private Data\r
46 //\r
47 //\r
48 // Updates to GlobalMonotonicCount, LogListHead, and FilterDriverListHead\r
49 // must be locked.\r
50 //\r
51 EFI_LOCK DataLock;\r
52\r
53 //\r
54 // Runing Monotonic Count to use for each error record.\r
55 // Increment AFTER use in an error record.\r
56 //\r
57 UINT64 GlobalMonotonicCount;\r
58\r
59 //\r
60 // List of EFI_DATA_ENTRY structures. This is the data log! The list\r
61 // must be in assending order of LogMonotonicCount.\r
62 //\r
63 LIST_ENTRY DataListHead;\r
64\r
65 //\r
66 // List of EFI_DATA_HUB_FILTER_DRIVER structures. Represents all\r
67 // the registered filter drivers.\r
68 //\r
69 LIST_ENTRY FilterDriverListHead;\r
70\r
71} DATA_HUB_INSTANCE;\r
72\r
73#define DATA_HUB_INSTANCE_FROM_THIS(this) CR (this, DATA_HUB_INSTANCE, DataHub, DATA_HUB_INSTANCE_SIGNATURE)\r
74\r
75//\r
76// Private data structure to contain the data log. One record per\r
77// structure. Head pointer to the list is the Log member of\r
78// EFI_DATA_ENTRY. Record is a copy of the data passed in.\r
79//\r
f02bd376 80#define EFI_DATA_ENTRY_SIGNATURE SIGNATURE_32 ('D', 'r', 'e', 'c')\r
83f6d1a0 81typedef struct {\r
82 UINT32 Signature;\r
83 LIST_ENTRY Link;\r
84\r
85 EFI_DATA_RECORD_HEADER *Record;\r
86\r
87 UINTN RecordSize;\r
88\r
89} EFI_DATA_ENTRY;\r
90\r
91#define DATA_ENTRY_FROM_LINK(link) CR (link, EFI_DATA_ENTRY, Link, EFI_DATA_ENTRY_SIGNATURE)\r
92\r
93//\r
94// Private data to contain the filter driver Event and it's\r
95// associated EFI_TPL.\r
96//\r
f02bd376 97#define EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE SIGNATURE_32 ('D', 'h', 'F', 'd')\r
83f6d1a0 98\r
99typedef struct {\r
100 UINT32 Signature;\r
101 LIST_ENTRY Link;\r
102\r
103 //\r
104 // Store Filter Driver Event and Tpl level it can be Signaled at.\r
105 //\r
106 EFI_EVENT Event;\r
107 EFI_TPL Tpl;\r
108\r
109 //\r
110 // Monotonic count on the get next operation for Event.\r
111 // Zero indicates get next has not been called for this event yet.\r
112 //\r
113 UINT64 GetNextMonotonicCount;\r
114\r
115 //\r
116 // Filter driver will register what class filter should be used.\r
117 //\r
118 UINT64 ClassFilter;\r
119\r
120 //\r
121 // Filter driver will register what record guid filter should be used.\r
122 //\r
123 EFI_GUID FilterDataRecordGuid;\r
124\r
125} DATA_HUB_FILTER_DRIVER;\r
126\r
127#define FILTER_ENTRY_FROM_LINK(link) CR (link, DATA_HUB_FILTER_DRIVER, Link, EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE)\r
128\r
129#endif\r