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