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