2 Internal include file for Datahub Status Code Handler Driver.
4 Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #ifndef __DATAHUB_STATUS_CODE_HANDLER_DXE_H__
16 #define __DATAHUB_STATUS_CODE_HANDLER_DXE_H__
18 #include <Protocol/ReportStatusCodeHandler.h>
19 #include <Protocol/DataHub.h>
20 #include <Protocol/StatusCode.h>
22 #include <Guid/StatusCodeDataTypeId.h>
23 #include <Guid/StatusCodeDataTypeDebug.h>
24 #include <Guid/DataHubStatusCodeRecord.h>
25 #include <Guid/EventGroup.h>
27 #include <Library/BaseLib.h>
28 #include <Library/SynchronizationLib.h>
29 #include <Library/BaseMemoryLib.h>
30 #include <Library/DebugLib.h>
31 #include <Library/ReportStatusCodeLib.h>
32 #include <Library/PrintLib.h>
33 #include <Library/PcdLib.h>
34 #include <Library/UefiDriverEntryPoint.h>
35 #include <Library/UefiBootServicesTableLib.h>
36 #include <Library/MemoryAllocationLib.h>
39 // Data hub worker definition
41 #define DATAHUB_STATUS_CODE_SIGNATURE SIGNATURE_32 ('B', 'D', 'H', 'S')
46 UINT8 Data
[sizeof(DATA_HUB_STATUS_CODE_DATA_RECORD
) + EFI_STATUS_CODE_DATA_MAX_SIZE
];
47 } DATAHUB_STATUSCODE_RECORD
;
50 Report status code into DataHub.
52 @param CodeType Indicates the type of status code being reported.
53 @param Value Describes the current status of a hardware or software entity.
54 This included information about the class and subclass that is used to
55 classify the entity as well as an operation.
56 @param Instance The enumeration of a hardware or software entity within
57 the system. Valid instance numbers start with 1.
58 @param CallerId This optional parameter may be used to identify the caller.
59 This parameter allows the status code driver to apply different rules to
61 @param Data This optional parameter may be used to pass additional data.
63 @retval EFI_SUCCESS The function completed successfully.
64 @retval EFI_DEVICE_ERROR Function is reentered.
65 @retval EFI_DEVICE_ERROR Function is called at runtime.
66 @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for free record buffer.
70 DataHubStatusCodeReportWorker (
71 IN EFI_STATUS_CODE_TYPE CodeType
,
72 IN EFI_STATUS_CODE_VALUE Value
,
74 IN EFI_GUID
*CallerId
,
75 IN EFI_STATUS_CODE_DATA
*Data OPTIONAL
79 Locate Data Hub Protocol and create event for logging data
80 as initialization for data hub status code worker.
82 @retval EFI_SUCCESS Initialization is successful.
86 DataHubStatusCodeInitializeWorker (