VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/VBoxPkg/VBoxAppleSim/DataHub.h@ 84509

最後變更 在這個檔案從84509是 82968,由 vboxsync 提交於 5 年 前

Copyright year updates by scm.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 4.2 KB
 
1/* $Id: DataHub.h 82968 2020-02-04 10:35:17Z vboxsync $ */
2/** @file
3 * DataHub.h
4 */
5
6/*
7 * Copyright (C) 2019-2020 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 *
17 * The contents of this file may alternatively be used under the terms
18 * of the Common Development and Distribution License Version 1.0
19 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
20 * VirtualBox OSE distribution, in which case the provisions of the
21 * CDDL are applicable instead of those of the GPL.
22 *
23 * You may elect to license modified versions of this file under the
24 * terms and conditions of either the GPL or the CDDL or both.
25 */
26
27#ifndef __DATA_HUB_H__
28#define __DATA_HUB_H__
29
30#define EFI_DATA_HUB_PROTOCOL_GUID \
31 { 0xae80d021, 0x618e, 0x11d4, {0xbc, 0xd7, 0x00, 0x80, 0xc7, 0x3c, 0x88, 0x81} }
32
33typedef struct _EFI_DATA_HUB_PROTOCOL EFI_DATA_HUB_PROTOCOL;
34
35
36#define EFI_DATA_RECORD_HEADER_VERSION 0x0100
37
38#define EFI_DATA_CLASS_DEBUG 0x1ULL
39#define EFI_DATA_CLASS_ERROR 0x2ULL
40#define EFI_DATA_CLASS_DATA 0x4ULL
41#define EFI_DATA_CLASS_PROGRESS_CODE 0x8ULL
42
43typedef struct {
44 UINT16 Version;
45 UINT16 HeaderSize;
46 UINT32 RecordSize;
47 EFI_GUID DataRecordGuid;
48 EFI_GUID ProducerName;
49 UINT64 DataRecordClass;
50 EFI_TIME LogTime;
51 UINT64 LogMonotonicCount;
52} EFI_DATA_RECORD_HEADER;
53
54typedef
55EFI_STATUS
56(EFIAPI *EFI_DATA_HUB_LOG_DATA) (
57 IN EFI_DATA_HUB_PROTOCOL *This,
58 IN EFI_GUID *DataRecordGuid,
59 IN EFI_GUID *ProducerName,
60 IN UINT64 DataRecordClass,
61 IN VOID *RawData,
62 IN UINT32 RawDataSize
63 )
64/*++
65
66 Routine Description:
67 Logs a data record to the system event log.
68
69 Arguments:
70 This - Protocol instance pointer.
71
72
73 Returns:
74 EFI_SUCCESS - Data was logged.
75
76--*/
77;
78
79
80typedef
81EFI_STATUS
82(EFIAPI *EFI_DATA_HUB_GET_NEXT_DATA_RECORD) (
83 IN EFI_DATA_HUB_PROTOCOL *This,
84 IN OUT UINT64 *MonotonicCount,
85 IN EFI_EVENT *FilterDriver OPTIONAL,
86 OUT EFI_DATA_RECORD_HEADER **Record
87 )
88/*++
89
90 Routine Description:
91 Allows the system data log to be searched.
92
93 Arguments:
94 This - Protocol instance pointer.
95
96
97 Returns:
98 EFI_SUCCESS - Data was logged.
99
100--*/
101;
102
103
104typedef
105EFI_STATUS
106(EFIAPI *EFI_DATA_HUB_REGISTER_DATA_FILTER_DRIVER) (
107 IN EFI_DATA_HUB_PROTOCOL *This,
108 IN EFI_EVENT FilterEvent,
109 IN EFI_TPL FilterTpl,
110 IN UINT64 FilterClass,
111 IN EFI_GUID *FilterDataRecordGui OPTIONAL
112 )
113/*++
114
115 Routine Description:
116 Registers an event to be signaled evey time a data record is logged in the system.
117
118 Arguments:
119 This - Protocol instance pointer.
120
121
122 Returns:
123 EFI_SUCCESS - The filter driver event was registered.
124
125--*/
126;
127
128
129typedef
130EFI_STATUS
131(EFIAPI *EFI_DATA_HUB_UNREGISTER_DATA_FILTER_DRIVER) (
132 IN EFI_DATA_HUB_PROTOCOL *This,
133 IN EFI_EVENT FilterEvent
134 )
135/*++
136
137 Routine Description:
138 Stops a filter driver from being notified when data records are logged.
139
140 Arguments:
141 This - Protocol instance pointer.
142
143
144 Returns:
145 EFI_SUCCESS - The filter driver represented by FilterEvent was shut off.
146
147--*/
148;
149
150
151struct _EFI_DATA_HUB_PROTOCOL {
152 EFI_DATA_HUB_LOG_DATA LogData;
153 EFI_DATA_HUB_GET_NEXT_DATA_RECORD GetNextDataRecord;
154 EFI_DATA_HUB_REGISTER_DATA_FILTER_DRIVER RegisterFilterDriver;
155 EFI_DATA_HUB_UNREGISTER_DATA_FILTER_DRIVER UnregisterFilterDriver;
156};
157
158extern EFI_GUID gEfiDataHubProtocolGuid;
159
160
161EFI_STATUS
162EFIAPI
163InitializeDataHub (
164 IN EFI_HANDLE ImageHandle,
165 IN EFI_SYSTEM_TABLE *SystemTable
166 );
167
168#endif
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette