]>
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 | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __DATAHUB_STATUS_CODE_HANDLER_DXE_H__\r | |
16 | #define __DATAHUB_STATUS_CODE_HANDLER_DXE_H__\r | |
17 | \r | |
18 | #include <Protocol/ReportStatusCodeHandler.h>\r | |
19 | #include <Protocol/DataHub.h>\r | |
20 | #include <Protocol/StatusCode.h>\r | |
21 | \r | |
22 | #include <Guid/StatusCodeDataTypeId.h>\r | |
23 | #include <Guid/StatusCodeDataTypeDebug.h>\r | |
24 | #include <Guid/DataHubStatusCodeRecord.h>\r | |
25 | #include <Guid/EventGroup.h>\r | |
26 | \r | |
27 | #include <Library/BaseLib.h>\r | |
28 | #include <Library/SynchronizationLib.h>\r | |
29 | #include <Library/BaseMemoryLib.h>\r | |
30 | #include <Library/DebugLib.h>\r | |
31 | #include <Library/ReportStatusCodeLib.h>\r | |
32 | #include <Library/PrintLib.h>\r | |
33 | #include <Library/PcdLib.h>\r | |
34 | #include <Library/UefiDriverEntryPoint.h>\r | |
35 | #include <Library/UefiBootServicesTableLib.h>\r | |
36 | #include <Library/MemoryAllocationLib.h>\r | |
37 | \r | |
38 | //\r | |
39 | // Data hub worker definition\r | |
40 | //\r | |
41 | #define DATAHUB_STATUS_CODE_SIGNATURE SIGNATURE_32 ('B', 'D', 'H', 'S')\r | |
42 | \r | |
43 | typedef struct {\r | |
44 | UINTN Signature;\r | |
45 | LIST_ENTRY Node;\r | |
46 | UINT8 Data[sizeof(DATA_HUB_STATUS_CODE_DATA_RECORD) + EFI_STATUS_CODE_DATA_MAX_SIZE];\r | |
47 | } DATAHUB_STATUSCODE_RECORD;\r | |
48 | \r | |
49 | /**\r | |
50 | Report status code into DataHub.\r | |
51 | \r | |
52 | @param CodeType Indicates the type of status code being reported.\r | |
53 | @param Value Describes the current status of a hardware or software entity.\r | |
54 | This included information about the class and subclass that is used to\r | |
55 | classify the entity as well as an operation.\r | |
56 | @param Instance The enumeration of a hardware or software entity within\r | |
57 | the system. Valid instance numbers start with 1.\r | |
58 | @param CallerId This optional parameter may be used to identify the caller.\r | |
59 | This parameter allows the status code driver to apply different rules to\r | |
60 | different callers.\r | |
61 | @param Data This optional parameter may be used to pass additional data.\r | |
62 | \r | |
63 | @retval EFI_SUCCESS The function completed successfully.\r | |
64 | @retval EFI_DEVICE_ERROR Function is reentered.\r | |
65 | @retval EFI_DEVICE_ERROR Function is called at runtime.\r | |
66 | @retval EFI_OUT_OF_RESOURCES Fail to allocate memory for free record buffer.\r | |
67 | \r | |
68 | **/\r | |
69 | EFI_STATUS\r | |
b61bb3b3 | 70 | EFIAPI\r |
28a94112 | 71 | DataHubStatusCodeReportWorker (\r |
72 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
73 | IN EFI_STATUS_CODE_VALUE Value,\r | |
74 | IN UINT32 Instance,\r | |
75 | IN EFI_GUID *CallerId,\r | |
76 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
77 | );\r | |
78 | \r | |
79 | /**\r | |
80 | Locate Data Hub Protocol and create event for logging data\r | |
81 | as initialization for data hub status code worker.\r | |
82 | \r | |
83 | @retval EFI_SUCCESS Initialization is successful.\r | |
84 | \r | |
85 | **/\r | |
86 | EFI_STATUS\r | |
87 | DataHubStatusCodeInitializeWorker (\r | |
88 | VOID\r | |
89 | );\r | |
90 | \r | |
91 | #endif\r |