]>
Commit | Line | Data |
---|---|---|
28a94112 | 1 | /** @file\r |
2 | Internal include file for Datahub Status Code Handler Driver.\r | |
3 | \r | |
4 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r | |
c0a00b14 | 5 | SPDX-License-Identifier: BSD-2-Clause-Patent\r |
28a94112 | 6 | \r |
7 | **/\r | |
8 | \r | |
9 | #ifndef __DATAHUB_STATUS_CODE_HANDLER_DXE_H__\r | |
10 | #define __DATAHUB_STATUS_CODE_HANDLER_DXE_H__\r | |
11 | \r | |
12 | #include <Protocol/ReportStatusCodeHandler.h>\r | |
13 | #include <Protocol/DataHub.h>\r | |
14 | #include <Protocol/StatusCode.h>\r | |
15 | \r | |
16 | #include <Guid/StatusCodeDataTypeId.h>\r | |
17 | #include <Guid/StatusCodeDataTypeDebug.h>\r | |
18 | #include <Guid/DataHubStatusCodeRecord.h>\r | |
19 | #include <Guid/EventGroup.h>\r | |
20 | \r | |
21 | #include <Library/BaseLib.h>\r | |
22 | #include <Library/SynchronizationLib.h>\r | |
23 | #include <Library/BaseMemoryLib.h>\r | |
24 | #include <Library/DebugLib.h>\r | |
25 | #include <Library/ReportStatusCodeLib.h>\r | |
26 | #include <Library/PrintLib.h>\r | |
27 | #include <Library/PcdLib.h>\r | |
28 | #include <Library/UefiDriverEntryPoint.h>\r | |
29 | #include <Library/UefiBootServicesTableLib.h>\r | |
30 | #include <Library/MemoryAllocationLib.h>\r | |
31 | \r | |
32 | //\r | |
33 | // Data hub worker definition\r | |
34 | //\r | |
35 | #define DATAHUB_STATUS_CODE_SIGNATURE SIGNATURE_32 ('B', 'D', 'H', 'S')\r | |
36 | \r | |
37 | typedef struct {\r | |
38 | UINTN Signature;\r | |
39 | LIST_ENTRY Node;\r | |
40 | UINT8 Data[sizeof(DATA_HUB_STATUS_CODE_DATA_RECORD) + EFI_STATUS_CODE_DATA_MAX_SIZE];\r | |
41 | } DATAHUB_STATUSCODE_RECORD;\r | |
42 | \r | |
43 | /**\r | |
44 | Report status code into DataHub.\r | |
45 | \r | |
46 | @param CodeType Indicates the type of status code being reported.\r | |
47 | @param Value Describes the current status of a hardware or software entity.\r | |
48 | This included information about the class and subclass that is used to\r | |
49 | classify the entity as well as an operation.\r | |
50 | @param Instance The enumeration of a hardware or software entity within\r | |
51 | the system. Valid instance numbers start with 1.\r | |
52 | @param CallerId This optional parameter may be used to identify the caller.\r | |
53 | This parameter allows the status code driver to apply different rules to\r | |
54 | different callers.\r | |
55 | @param Data This optional parameter may be used to pass additional data.\r | |
56 | \r | |
57 | @retval EFI_SUCCESS The function completed successfully.\r | |
58 | @retval EFI_DEVICE_ERROR Function is reentered.\r | |
59 | @retval EFI_DEVICE_ERROR Function is called at runtime.\r | |
60 | @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for free record buffer.\r | |
61 | \r | |
62 | **/\r | |
63 | EFI_STATUS\r | |
b61bb3b3 | 64 | EFIAPI\r |
28a94112 | 65 | DataHubStatusCodeReportWorker (\r |
66 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
67 | IN EFI_STATUS_CODE_VALUE Value,\r | |
68 | IN UINT32 Instance,\r | |
69 | IN EFI_GUID *CallerId,\r | |
70 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
71 | );\r | |
72 | \r | |
73 | /**\r | |
74 | Locate Data Hub Protocol and create event for logging data\r | |
75 | as initialization for data hub status code worker.\r | |
76 | \r | |
77 | @retval EFI_SUCCESS Initialization is successful.\r | |
78 | \r | |
79 | **/\r | |
80 | EFI_STATUS\r | |
81 | DataHubStatusCodeInitializeWorker (\r | |
82 | VOID\r | |
83 | );\r | |
84 | \r | |
85 | #endif\r |