OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
DataHub.h
Go to the documentation of this file.
1
10#ifndef _DATA_HUB_H_
11#define _DATA_HUB_H_
12
13#include <Uefi.h>
14
15#include <Protocol/DataHub.h>
16
17#include <Library/DebugLib.h>
18#include <Library/UefiDriverEntryPoint.h>
19#include <Library/UefiLib.h>
20#include <Library/BaseLib.h>
21#include <Library/BaseMemoryLib.h>
22#include <Library/MemoryAllocationLib.h>
23#include <Library/UefiBootServicesTableLib.h>
24#include <Library/UefiRuntimeServicesTableLib.h>
25
26#define DATA_HUB_INSTANCE_SIGNATURE SIGNATURE_32 ('D', 'H', 'u', 'b')
27typedef struct {
28 UINT32 Signature;
29
30 EFI_HANDLE Handle;
31
32 //
33 // Produced protocol(s)
34 //
36
37 //
38 // Private Data
39 //
40 //
41 // Updates to GlobalMonotonicCount, LogListHead, and FilterDriverListHead
42 // must be locked.
43 //
44 EFI_LOCK DataLock;
45
46 //
47 // Runing Monotonic Count to use for each error record.
48 // Increment AFTER use in an error record.
49 //
51
52 //
53 // List of EFI_DATA_ENTRY structures. This is the data log! The list
54 // must be in assending order of LogMonotonicCount.
55 //
56 LIST_ENTRY DataListHead;
57
58 //
59 // List of EFI_DATA_HUB_FILTER_DRIVER structures. Represents all
60 // the registered filter drivers.
61 //
64
65#define DATA_HUB_INSTANCE_FROM_THIS(this) CR (this, DATA_HUB_INSTANCE, DataHub, DATA_HUB_INSTANCE_SIGNATURE)
66
67//
68// Private data structure to contain the data log. One record per
69// structure. Head pointer to the list is the Log member of
70// EFI_DATA_ENTRY. Record is a copy of the data passed in.
71//
72#define EFI_DATA_ENTRY_SIGNATURE SIGNATURE_32 ('D', 'r', 'e', 'c')
73typedef struct {
74 UINT32 Signature;
75 LIST_ENTRY Link;
76
78
81
82#define DATA_ENTRY_FROM_LINK(link) CR (link, EFI_DATA_ENTRY, Link, EFI_DATA_ENTRY_SIGNATURE)
83
84//
85// Private data to contain the filter driver Event and its
86// associated EFI_TPL.
87//
88#define EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE SIGNATURE_32 ('D', 'h', 'F', 'd')
89
90typedef struct {
91 UINT32 Signature;
92 LIST_ENTRY Link;
93
94 //
95 // Store Filter Driver Event and Tpl level it can be Signaled at.
96 //
97 EFI_EVENT Event;
98 EFI_TPL Tpl;
99
100 //
101 // Monotonic count on the get next operation for Event.
102 // Zero indicates get next has not been called for this event yet.
103 //
105
106 //
107 // Filter driver will register what class filter should be used.
108 //
110
111 //
112 // Filter driver will register what record guid filter should be used.
113 //
116
117#define FILTER_ENTRY_FROM_LINK(link) CR (link, DATA_HUB_FILTER_DRIVER, Link, EFI_DATA_HUB_FILTER_DRIVER_SIGNATURE)
118
119#endif
EFI_GUID FilterDataRecordGuid
Definition DataHub.h:114
UINT64 GetNextMonotonicCount
Definition DataHub.h:104
EFI_DATA_HUB_PROTOCOL DataHub
Definition DataHub.h:35
EFI_HANDLE Handle
Definition DataHub.h:30
UINT64 GlobalMonotonicCount
Definition DataHub.h:50
LIST_ENTRY FilterDriverListHead
Definition DataHub.h:62
LIST_ENTRY DataListHead
Definition DataHub.h:56
EFI_LOCK DataLock
Definition DataHub.h:44
UINT32 Signature
Definition DataHub.h:28
UINTN RecordSize
Definition DataHub.h:79
EFI_DATA_RECORD_HEADER * Record
Definition DataHub.h:77
LIST_ENTRY Link
Definition DataHub.h:75
UINT32 Signature
Definition DataHub.h:74