]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Sample/Platform/Generic/RuntimeDxe/StatusCode/Lib/BsDataHubStatusCode/BsDataHubStatusCode.h
Update the copyright notice format
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Platform / Generic / RuntimeDxe / StatusCode / Lib / BsDataHubStatusCode / BsDataHubStatusCode.h
CommitLineData
b38907a6 1/*++\r
2\r
4b1e1121
HT
3Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>\r
4This program and the accompanying materials \r
b38907a6 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 BsDataHubStatusCode.h\r
15\r
16Abstract:\r
17\r
18 Header for the status code data hub logging component\r
19\r
20--*/\r
21\r
22#ifndef _EFI_BS_DATA_HUB_STATUS_CODE_H_\r
23#define _EFI_BS_DATA_HUB_STATUS_CODE_H_\r
24\r
25\r
26// Statements that include other files.\r
27//\r
28#include "Tiano.h"\r
29#include "EfiCommonLib.h"\r
30#include "EfiRuntimeLib.h"\r
31#include "EfiPrintLib.h"\r
32#include "EfiStatusCode.h"\r
33\r
34//\r
35// Dependent protocols\r
36//\r
37#include EFI_PROTOCOL_DEPENDENCY (DataHub)\r
38\r
39//\r
40// Consumed protocols\r
41//\r
42#include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)\r
43\r
44//\r
45// GUID definitions\r
46//\r
47#include EFI_GUID_DEFINITION (StatusCode)\r
48#include EFI_GUID_DEFINITION (StatusCodeCallerId)\r
49#include EFI_GUID_DEFINITION (StatusCodeDataTypeId)\r
50\r
51//\r
52// Private data declarations\r
53//\r
54#define MAX_RECORD_NUM 1000\r
b38907a6 55#define BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE\r
56#define BYTES_PER_BUFFER (BYTES_PER_RECORD * sizeof (UINT8))\r
57\r
58#define BS_DATA_HUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')\r
59\r
60typedef struct {\r
61 UINTN Signature;\r
95d675b5 62 EFI_LIST_ENTRY Node;\r
63 UINT8 Data[BYTES_PER_RECORD];\r
64} DATAHUB_STATUSCODE_RECORD;\r
b38907a6 65\r
66//\r
67// Function prototypes\r
68//\r
95d675b5 69EFI_STATUS\r
70EFIAPI\r
71BsDataHubInitializeStatusCode (\r
72 IN EFI_HANDLE ImageHandle,\r
73 IN EFI_SYSTEM_TABLE *SystemTable\r
b38907a6 74 );\r
75/*++\r
76\r
77Routine Description:\r
78\r
95d675b5 79 Install a data hub listener.\r
b38907a6 80\r
81Arguments:\r
82\r
95d675b5 83 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)\r
b38907a6 84\r
85Returns:\r
86\r
95d675b5 87 EFI_SUCCESS - Logging Hub protocol installed\r
88 Other - No protocol installed, unload driver.\r
b38907a6 89\r
90--*/\r
91\r
92EFI_STATUS\r
95d675b5 93EFIAPI\r
94BsDataHubReportStatusCode (\r
95 IN EFI_STATUS_CODE_TYPE CodeType,\r
96 IN EFI_STATUS_CODE_VALUE Value,\r
97 IN UINT32 Instance,\r
98 IN EFI_GUID * CallerId,\r
99 IN EFI_STATUS_CODE_DATA * Data OPTIONAL\r
b38907a6 100 );\r
101/*++\r
102\r
103Routine Description:\r
104\r
95d675b5 105 Boot service report status code listener. This function logs the status code\r
106 into the data hub.\r
107\r
b38907a6 108Arguments:\r
109\r
95d675b5 110 Same as gRT->ReportStatusCode (See Tiano Runtime Specification)\r
b38907a6 111\r
112Returns:\r
113\r
95d675b5 114 None\r
b38907a6 115\r
116--*/\r
117\r
95d675b5 118VOID\r
b38907a6 119EFIAPI\r
120LogDataHubEventHandler (\r
121 IN EFI_EVENT Event,\r
122 IN VOID *Context\r
123 );\r
124/*++\r
125\r
126Routine Description:\r
127\r
128 The Event handler which will be notified to log data in Data Hub.\r
129\r
130Arguments:\r
131\r
132 Event - Instance of the EFI_EVENT to signal whenever data is\r
133 available to be logged in the system.\r
134 Context - Context of the event.\r
135\r
136Returns:\r
137\r
138 None.\r
139\r
140--*/\r
b4e547b6 141#endif\r