]> git.proxmox.com Git - mirror_edk2.git/blame - DuetPkg/Library/DxeCoreReportStatusCodeLibFromHob/ReportStatusCodeLibInternal.h
Update the copyright notice format
[mirror_edk2.git] / DuetPkg / Library / DxeCoreReportStatusCodeLibFromHob / ReportStatusCodeLibInternal.h
CommitLineData
6dacb8cd 1/** @file\r
2 Internal Header file of Report Status Code Library.\r
3\r
b1f700a8
HT
4 Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
6dacb8cd 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#ifndef __REPORT_STATUS_CODE_LIB_INTERNAL_H__\r
15#define __REPORT_STATUS_CODE_LIB_INTERNAL_H__\r
16\r
6dacb8cd 17#include <Library/ReportStatusCodeLib.h>\r
18#include <Library/DebugLib.h>\r
19#include <Library/UefiBootServicesTableLib.h>\r
20#include <Library/BaseLib.h>\r
21#include <Library/BaseMemoryLib.h>\r
22#include <Library/PcdLib.h>\r
23#include <Library/DevicePathLib.h>\r
24#include <Library/HobLib.h>\r
25\r
26#include <Guid/StatusCodeDataTypeId.h>\r
fd894392 27#include <Guid/StatusCodeDataTypeDebug.h>\r
6dacb8cd 28#include <Protocol/StatusCode.h>\r
29\r
6dacb8cd 30/**\r
31 Internal worker function that reports a status code through the Status Code Protocol\r
32\r
33 This function checks to see if a Status Code Protocol is present in the handle\r
34 database. If a Status Code Protocol is not present, then EFI_UNSUPPORTED is\r
35 returned. If a Status Code Protocol is present, then it is cached in gStatusCode,\r
36 and the ReportStatusCode() service of the Status Code Protocol is called passing in\r
37 Type, Value, Instance, CallerId, and Data. The result of this call is returned.\r
38\r
39 @param Type Status code type.\r
40 @param Value Status code value.\r
41 @param Instance Status code instance number.\r
42 @param CallerId Pointer to a GUID that identifies the caller of this\r
43 function. This is an optional parameter that may be\r
44 NULL.\r
45 @param Data Pointer to the extended data buffer. This is an\r
46 optional parameter that may be NULL.\r
47\r
48 @retval EFI_SUCCESS The status code was reported.\r
49 @retval EFI_OUT_OF_RESOURCES There were not enough resources to report the status code.\r
50 @retval EFI_UNSUPPORTED Status Code Protocol is not available.\r
51\r
52**/\r
53EFI_STATUS\r
54InternalReportStatusCode (\r
55 IN EFI_STATUS_CODE_TYPE Type,\r
56 IN EFI_STATUS_CODE_VALUE Value,\r
57 IN UINT32 Instance,\r
58 IN CONST EFI_GUID *CallerId OPTIONAL,\r
59 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
60 );\r
61\r
62/**\r
63 Reports a status code with full parameters.\r
64\r
65 The function reports a status code. If ExtendedData is NULL and ExtendedDataSize\r
66 is 0, then an extended data buffer is not reported. If ExtendedData is not\r
67 NULL and ExtendedDataSize is not 0, then an extended data buffer is allocated.\r
68 ExtendedData is assumed not have the standard status code header, so this function\r
69 is responsible for allocating a buffer large enough for the standard header and\r
70 the extended data passed into this function. The standard header is filled in\r
71 with a GUID specified by ExtendedDataGuid. If ExtendedDataGuid is NULL, then a\r
72 GUID of gEfiStatusCodeSpecificDatauid is used. The status code is reported with\r
73 an instance specified by Instance and a caller ID specified by CallerId. If\r
74 CallerId is NULL, then a caller ID of gEfiCallerIdGuid is used.\r
75\r
76 ReportStatusCodeEx()must actively prevent recursion. If ReportStatusCodeEx()\r
77 is called while processing another any other Report Status Code Library function,\r
78 then ReportStatusCodeEx() must return EFI_DEVICE_ERROR immediately.\r
79\r
80 If ExtendedData is NULL and ExtendedDataSize is not zero, then ASSERT().\r
81 If ExtendedData is not NULL and ExtendedDataSize is zero, then ASSERT().\r
82\r
83 @param Type Status code type.\r
84 @param Value Status code value.\r
85 @param Instance Status code instance number.\r
86 @param CallerId Pointer to a GUID that identifies the caller of this\r
87 function. If this parameter is NULL, then a caller\r
88 ID of gEfiCallerIdGuid is used.\r
89 @param ExtendedDataGuid Pointer to the GUID for the extended data buffer.\r
90 If this parameter is NULL, then a the status code\r
91 standard header is filled in with\r
92 gEfiStatusCodeSpecificDataGuid.\r
93 @param ExtendedData Pointer to the extended data buffer. This is an\r
94 optional parameter that may be NULL.\r
95 @param ExtendedDataSize The size, in bytes, of the extended data buffer.\r
96\r
97 @retval EFI_SUCCESS The status code was reported.\r
98 @retval EFI_OUT_OF_RESOURCES There were not enough resources to allocate\r
99 the extended data section if it was specified.\r
100 @retval EFI_UNSUPPORTED Report status code is not supported\r
101\r
102**/\r
103EFI_STATUS\r
104EFIAPI\r
105InternalReportStatusCodeEx (\r
106 IN EFI_STATUS_CODE_TYPE Type,\r
107 IN EFI_STATUS_CODE_VALUE Value,\r
108 IN UINT32 Instance,\r
109 IN CONST EFI_GUID *CallerId OPTIONAL,\r
110 IN CONST EFI_GUID *ExtendedDataGuid OPTIONAL,\r
111 IN CONST VOID *ExtendedData OPTIONAL,\r
112 IN UINTN ExtendedDataSize\r
113 );\r
114\r
115extern EFI_STATUS_CODE_PROTOCOL mStatusProtocol;\r
116\r
117#endif // __REPORT_STATUS_CODE_LIB_INTERNAL__H\r
118\r