]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Library/SmmRuntimeDxeReportStatusCodeLibFramework/ReportStatusCodeLibInternal.h
Code scrub for SmmRuntimeDxeReportStatusCodeLibFramework.
[mirror_edk2.git] / IntelFrameworkModulePkg / Library / SmmRuntimeDxeReportStatusCodeLibFramework / ReportStatusCodeLibInternal.h
1 /** @file
2 Internal Header file of Report Status Code Library for RUNTIME
3 DXE Phase.
4
5 Copyright (c) 2006 - 2009, Intel Corporation<BR>
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15 #ifndef __REPORT_STATUS_CODE_LIB_INTERNAL__H__
16 #define __REPORT_STATUS_CODE_LIB_INTERNAL__H__
17
18 #include <FrameworkDxe.h>
19
20 #include <Library/ReportStatusCodeLib.h>
21 #include <Library/DebugLib.h>
22 #include <Library/BaseLib.h>
23 #include <Library/BaseMemoryLib.h>
24 #include <Library/PcdLib.h>
25 #include <Library/UefiRuntimeServicesTableLib.h>
26 #include <Library/UefiBootServicesTableLib.h>
27 #include <Library/DevicePathLib.h>
28 #include <Library/OemHookStatusCodeLib.h>
29 #include <Library/MemoryAllocationLib.h>
30
31 #include <Guid/StatusCodeDataTypeId.h>
32 #include <Guid/StatusCodeDataTypeDebug.h>
33 #include <Guid/EventGroup.h>
34
35 #include <Protocol/StatusCode.h>
36 #include <Protocol/SmmBase.h>
37
38
39 extern EFI_STATUS_CODE_DATA *mStatusCodeData;
40
41 /**
42 Locate the report status code service.
43
44 In SMM, it retrieves OemHookStatusCodeReport() from customized OEM Hook Status Code Lib.
45 Otherwise, it first tries to retrieve ReportStatusCode() in Runtime Services Table.
46 If not found, it then tries to retrieve ReportStatusCode() API of Report Status Code Protocol.
47
48 @return Function pointer to the report status code service.
49 NULL is returned if no status code service is available.
50
51 **/
52 EFI_REPORT_STATUS_CODE
53 InternalGetReportStatusCode (
54 VOID
55 );
56
57 /**
58 Internal worker function that reports a status code through the status code service.
59
60 If status code service is not cached, then this function checks if status code service is
61 available in system. If status code service is not available, then EFI_UNSUPPORTED is
62 returned. If status code service is present, then it is cached in mReportStatusCode.
63 Finally this function reports status code through the status code service.
64
65 @param Type Status code type.
66 @param Value Status code value.
67 @param Instance Status code instance number.
68 @param CallerId Pointer to a GUID that identifies the caller of this
69 function. This is an optional parameter that may be
70 NULL.
71 @param Data Pointer to the extended data buffer. This is an
72 optional parameter that may be NULL.
73
74 @retval EFI_SUCCESS The status code was reported.
75 @retval EFI_UNSUPPORTED Status code service is not available.
76 @retval EFI_UNSUPPORTED Status code type is not supported.
77
78 **/
79 EFI_STATUS
80 InternalReportStatusCode (
81 IN EFI_STATUS_CODE_TYPE Type,
82 IN EFI_STATUS_CODE_VALUE Value,
83 IN UINT32 Instance,
84 IN CONST EFI_GUID *CallerId OPTIONAL,
85 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
86 );
87
88 #endif
89