3 Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.<BR>
4 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
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.
18 Header for the status code data hub logging component
22 #ifndef _EFI_BS_DATA_HUB_STATUS_CODE_H_
23 #define _EFI_BS_DATA_HUB_STATUS_CODE_H_
26 // Statements that include other files.
29 #include "EfiCommonLib.h"
30 #include "EfiRuntimeLib.h"
31 #include "EfiPrintLib.h"
32 #include "EfiStatusCode.h"
35 // Dependent protocols
37 #include EFI_PROTOCOL_DEPENDENCY (DataHub)
42 #include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)
47 #include EFI_GUID_DEFINITION (StatusCode)
48 #include EFI_GUID_DEFINITION (StatusCodeCallerId)
49 #include EFI_GUID_DEFINITION (StatusCodeDataTypeId)
52 // Private data declarations
54 #define MAX_RECORD_NUM 1000
55 #define BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
56 #define BYTES_PER_BUFFER (BYTES_PER_RECORD * sizeof (UINT8))
58 #define BS_DATA_HUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')
63 UINT8 Data
[BYTES_PER_RECORD
];
64 } DATAHUB_STATUSCODE_RECORD
;
67 // Function prototypes
71 BsDataHubInitializeStatusCode (
72 IN EFI_HANDLE ImageHandle
,
73 IN EFI_SYSTEM_TABLE
*SystemTable
79 Install a data hub listener.
83 (Standard EFI Image entry - EFI_IMAGE_ENTRY_POINT)
87 EFI_SUCCESS - Logging Hub protocol installed
88 Other - No protocol installed, unload driver.
94 BsDataHubReportStatusCode (
95 IN EFI_STATUS_CODE_TYPE CodeType
,
96 IN EFI_STATUS_CODE_VALUE Value
,
98 IN EFI_GUID
* CallerId
,
99 IN EFI_STATUS_CODE_DATA
* Data OPTIONAL
105 Boot service report status code listener. This function logs the status code
110 Same as gRT->ReportStatusCode (See Tiano Runtime Specification)
120 LogDataHubEventHandler (
128 The Event handler which will be notified to log data in Data Hub.
132 Event - Instance of the EFI_EVENT to signal whenever data is
133 available to be logged in the system.
134 Context - Context of the event.