]> git.proxmox.com Git - mirror_edk2.git/blame - IntelFrameworkModulePkg/Universal/DataHub/DataHub/Dxe/DataHub.h
Rename Protocol/FrameworkHii.h to Protocol/HiiFramework.h to follow the naming conven...
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / DataHub / DataHub / Dxe / DataHub.h
CommitLineData
83f6d1a0 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// The package level header files this module uses\r
27//\r
28#include <PiDxe.h>\r
29//\r
30// The protocols, PPI and GUID defintions for this module\r
31//\r
32#include <Protocol/DataHub.h>\r
33//\r
34// The Library classes this module consumes\r
35//\r
36#include <Library/DebugLib.h>\r
37#include <Library/UefiDriverEntryPoint.h>\r
38#include <Library/UefiLib.h>\r
39#include <Library/BaseLib.h>\r
40#include <Library/BaseMemoryLib.h>\r
41#include <Library/MemoryAllocationLib.h>\r
42#include <Library/UefiBootServicesTableLib.h>\r
43#include <Library/UefiRuntimeServicesTableLib.h>\r
44\r
45#define DATA_HUB_INSTANCE_SIGNATURE EFI_SIGNATURE_32 ('D', 'H', 'u', 'b')\r
46typedef struct {\r
47 UINT32 Signature;\r
48\r
49 EFI_HANDLE Handle;\r
50\r
51 //\r
52 // Produced protocol(s)\r
53 //\r
54 EFI_DATA_HUB_PROTOCOL DataHub;\r
55\r
56 //\r
57 // Private Data\r
58 //\r
59 //\r
60 // Updates to GlobalMonotonicCount, LogListHead, and FilterDriverListHead\r
61 // must be locked.\r
62 //\r
63 EFI_LOCK DataLock;\r
64\r
65 //\r
66 // Runing Monotonic Count to use for each error record.\r
67 // Increment AFTER use in an error record.\r
68 //\r
69 UINT64 GlobalMonotonicCount;\r
70\r
71 //\r
72 // List of EFI_DATA_ENTRY structures. This is the data log! The list\r
73 // must be in assending order of LogMonotonicCount.\r
74 //\r
75 LIST_ENTRY DataListHead;\r
76\r
77 //\r
78 // List of EFI_DATA_HUB_FILTER_DRIVER structures. Represents all\r
79 // the registered filter drivers.\r
80 //\r
81 LIST_ENTRY FilterDriverListHead;\r
82\r
83} DATA_HUB_INSTANCE;\r
84\r
85#define DATA_HUB_INSTANCE_FROM_THIS(this) CR (this, DATA_HUB_INSTANCE, DataHub, DATA_HUB_INSTANCE_SIGNATURE)\r
86\r
87//\r
88// Private data structure to contain the data log. One record per\r
89// structure. Head pointer to the list is the Log member of\r
90// EFI_DATA_ENTRY. Record is a copy of the data passed in.\r
91//\r
92#define EFI_DATA_ENTRY_SIGNATURE EFI_SIGNATURE_32 ('D', 'r', 'e', 'c')\r
93typedef struct {\r
94 UINT32 Signature;\r
95 LIST_ENTRY Link;\r
96\r
97 EFI_DATA_RECORD_HEADER *Record;\r
98\r
99 UINTN RecordSize;\r
100\r
101} EFI_DATA_ENTRY;\r
102\r
103#define DATA_ENTRY_FROM_LINK(link) CR (link, EFI_DATA_ENTRY, Link, EFI_DATA_ENTRY_SIGNATURE)\r
104\r
105//\r
106// Private data to contain the filter driver Event and it's\r
107// associated EFI_TPL.\r
108//\r
109#define EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE EFI_SIGNATURE_32 ('D', 'h', 'F', 'd')\r
110\r
111typedef struct {\r
112 UINT32 Signature;\r
113 LIST_ENTRY Link;\r
114\r
115 //\r
116 // Store Filter Driver Event and Tpl level it can be Signaled at.\r
117 //\r
118 EFI_EVENT Event;\r
119 EFI_TPL Tpl;\r
120\r
121 //\r
122 // Monotonic count on the get next operation for Event.\r
123 // Zero indicates get next has not been called for this event yet.\r
124 //\r
125 UINT64 GetNextMonotonicCount;\r
126\r
127 //\r
128 // Filter driver will register what class filter should be used.\r
129 //\r
130 UINT64 ClassFilter;\r
131\r
132 //\r
133 // Filter driver will register what record guid filter should be used.\r
134 //\r
135 EFI_GUID FilterDataRecordGuid;\r
136\r
137} DATA_HUB_FILTER_DRIVER;\r
138\r
139#define FILTER_ENTRY_FROM_LINK(link) CR (link, DATA_HUB_FILTER_DRIVER, Link, EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE)\r
140\r
141#endif\r