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