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