]>
Commit | Line | Data |
---|---|---|
e5516b49 | 1 | /** @file\r |
2 | Internal Header file of Report Status Code Library for RUNTIME\r | |
3 | DXE Phase.\r | |
4 | \r | |
5 | Copyright (c) 2006 - 2007, Intel Corporation<BR>\r | |
6 | All rights reserved. This program and the accompanying materials\r | |
7 | are licensed and made available under the terms and conditions of the BSD License\r | |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | #ifndef __REPORT_STATUS_CODE_LIB_INTERNAL__H\r | |
16 | #define __REPORT_STATUS_CODE_LIB_INTERNAL__H\r | |
17 | \r | |
18 | #include <FrameworkDxe.h>\r | |
19 | \r | |
20 | #include <Library/ReportStatusCodeLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
22 | #include <Library/UefiBootServicesTableLib.h>\r | |
23 | #include <Library/BaseLib.h>\r | |
24 | #include <Library/BaseMemoryLib.h>\r | |
25 | #include <Library/PcdLib.h>\r | |
26 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
2067710d | 27 | #include <Library/DevicePathLib.h>\r |
e5516b49 | 28 | \r |
29 | #include <Guid/StatusCodeDataTypeId.h>\r | |
30 | #include <Protocol/StatusCode.h>\r | |
31 | \r | |
32 | #include <FrameworkModuleBase.h>\r | |
33 | #include <DebugInfo.h>\r | |
34 | \r | |
35 | \r | |
36 | /**\r | |
ed7752ec | 37 | Locate he report status code service.\r |
e5516b49 | 38 | \r |
39 | @return EFI_REPORT_STATUS_CODE function point to\r | |
40 | ReportStatusCode.\r | |
41 | **/\r | |
42 | EFI_REPORT_STATUS_CODE\r | |
43 | InternalGetReportStatusCode (\r | |
44 | VOID\r | |
45 | );\r | |
46 | \r | |
47 | /**\r | |
48 | Internal worker function that reports a status code through the Status Code Protocol\r | |
49 | \r | |
50 | This function checks to see if a Status Code Protocol is present in the handle\r | |
51 | database. If a Status Code Protocol is not present, then EFI_UNSUPPORTED is\r | |
52 | returned. If a Status Code Protocol is present, then it is cached in gStatusCode,\r | |
53 | and the ReportStatusCode() service of the Status Code Protocol is called passing in\r | |
54 | Type, Value, Instance, CallerId, and Data. The result of this call is returned.\r | |
55 | \r | |
56 | @param Type Status code type.\r | |
57 | @param Value Status code value.\r | |
58 | @param Instance Status code instance number.\r | |
59 | @param CallerId Pointer to a GUID that identifies the caller of this\r | |
60 | function. This is an optional parameter that may be\r | |
61 | NULL.\r | |
62 | @param Data Pointer to the extended data buffer. This is an\r | |
63 | optional parameter that may be NULL.\r | |
64 | \r | |
65 | @retval EFI_SUCCESS The status code was reported.\r | |
66 | @retval EFI_OUT_OF_RESOURCES There were not enough resources to report the status code.\r | |
67 | @retval EFI_UNSUPPORTED Status Code Protocol is not available.\r | |
68 | \r | |
69 | **/\r | |
70 | EFI_STATUS\r | |
71 | InternalReportStatusCode (\r | |
72 | IN EFI_STATUS_CODE_TYPE Type,\r | |
73 | IN EFI_STATUS_CODE_VALUE Value,\r | |
74 | IN UINT32 Instance,\r | |
75 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
76 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
77 | );\r | |
78 | \r | |
79 | /**\r | |
80 | Reports a status code with full parameters.\r | |
81 | \r | |
82 | The function reports a status code. If ExtendedData is NULL and ExtendedDataSize\r | |
83 | is 0, then an extended data buffer is not reported. If ExtendedData is not\r | |
84 | NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.\r | |
85 | ExtendedData is assumed not have the standard status code header, so this function\r | |
86 | is responsible for allocating a buffer large enough for the standard header and\r | |
87 | the extended data passed into this function. The standard header is filled in\r | |
88 | with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a\r | |
89 | GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with\r | |
90 | an instance specified by Instance and a caller ID specified by CallerId. If\r | |
91 | CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r | |
92 | \r | |
93 | ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx()\r | |
94 | is called while processing another any other Report Status Code Library function,\r | |
95 | then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r | |
96 | \r | |
97 | If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r | |
98 | If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r | |
99 | \r | |
100 | @param Type Status code type.\r | |
101 | @param Value Status code value.\r | |
102 | @param Instance Status code instance number.\r | |
103 | @param CallerId Pointer to a GUID that identifies the caller of this\r | |
104 | function. If this parameter is NULL, then a caller\r | |
105 | ID of gEfiCallerIdGuid is used.\r | |
106 | @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.\r | |
107 | If this parameter is NULL, then a the status code\r | |
108 | standard header is filled in with\r | |
109 | gEfiStatusCodeSpecificDataGuid.\r | |
110 | @param ExtendedData Pointer to the extended data buffer. This is an\r | |
111 | optional parameter that may be NULL.\r | |
112 | @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r | |
113 | \r | |
114 | @retval EFI_SUCCESS The status code was reported.\r | |
115 | @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate\r | |
116 | the extended data section if it was specified.\r | |
117 | @retval EFI_UNSUPPORTED Report status code is not supported\r | |
118 | \r | |
119 | **/\r | |
120 | EFI_STATUS\r | |
121 | EFIAPI\r | |
122 | InternalReportStatusCodeEx (\r | |
123 | IN EFI_STATUS_CODE_TYPE Type,\r | |
124 | IN EFI_STATUS_CODE_VALUE Value,\r | |
125 | IN UINT32 Instance,\r | |
126 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
127 | IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r | |
128 | IN CONST VOID *ExtendedData OPTIONAL,\r | |
129 | IN UINTN ExtendedDataSize\r | |
130 | );\r | |
131 | \r | |
132 | extern EFI_REPORT_STATUS_CODE mReportStatusCode;\r | |
133 | \r | |
134 | #endif // __REPORT_STATUS_CODE_LIB_INTERNAL__H\r | |
135 | \r |