]>
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 | |
29f766e4 | 5 | Copyright (c) 2006 - 2009, Intel Corporation<BR>\r |
e5516b49 | 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 | |
29f766e4 | 15 | #ifndef __REPORT_STATUS_CODE_LIB_INTERNAL__H__\r |
16 | #define __REPORT_STATUS_CODE_LIB_INTERNAL__H__\r | |
e5516b49 | 17 | \r |
55e1864e | 18 | #include <FrameworkSmm.h>\r |
e5516b49 | 19 | \r |
20 | #include <Library/ReportStatusCodeLib.h>\r | |
21 | #include <Library/DebugLib.h>\r | |
e5516b49 | 22 | #include <Library/BaseLib.h>\r |
23 | #include <Library/BaseMemoryLib.h>\r | |
24 | #include <Library/PcdLib.h>\r | |
25 | #include <Library/UefiRuntimeServicesTableLib.h>\r | |
9556741c | 26 | #include <Library/UefiBootServicesTableLib.h>\r |
2067710d | 27 | #include <Library/DevicePathLib.h>\r |
29f766e4 | 28 | #include <Library/OemHookStatusCodeLib.h>\r |
29 | #include <Library/MemoryAllocationLib.h>\r | |
e5516b49 | 30 | \r |
31 | #include <Guid/StatusCodeDataTypeId.h>\r | |
3a6064fa | 32 | #include <Guid/StatusCodeDataTypeDebug.h>\r |
6a27a4eb | 33 | #include <Guid/EventGroup.h>\r |
29f766e4 | 34 | \r |
e5516b49 | 35 | #include <Protocol/StatusCode.h>\r |
29f766e4 | 36 | #include <Protocol/SmmBase.h>\r |
37 | \r | |
e5516b49 | 38 | \r |
29f766e4 | 39 | extern EFI_STATUS_CODE_DATA *mStatusCodeData;\r |
9f6531d1 | 40 | \r |
e5516b49 | 41 | /**\r |
29f766e4 | 42 | Locate the report status code service.\r |
43 | \r | |
44 | In SMM, it retrieves OemHookStatusCodeReport() from customized OEM Hook Status Code Lib.\r | |
45 | Otherwise, it first tries to retrieve ReportStatusCode() in Runtime Services Table.\r | |
46 | If not found, it then tries to retrieve ReportStatusCode() API of Report Status Code Protocol.\r | |
47 | \r | |
48 | @return Function pointer to the report status code service.\r | |
49 | NULL is returned if no status code service is available.\r | |
e5516b49 | 50 | \r |
e5516b49 | 51 | **/\r |
52 | EFI_REPORT_STATUS_CODE\r | |
53 | InternalGetReportStatusCode (\r | |
54 | VOID\r | |
55 | );\r | |
56 | \r | |
57 | /**\r | |
29f766e4 | 58 | Internal worker function that reports a status code through the status code service.\r |
e5516b49 | 59 | \r |
29f766e4 | 60 | If status code service is not cached, then this function checks if status code service is\r |
61 | available in system. If status code service is not available, then EFI_UNSUPPORTED is\r | |
62 | returned. If status code service is present, then it is cached in mReportStatusCode.\r | |
63 | Finally this function reports status code through the status code service.\r | |
e5516b49 | 64 | \r |
65 | @param Type Status code type.\r | |
66 | @param Value Status code value.\r | |
67 | @param Instance Status code instance number.\r | |
68 | @param CallerId Pointer to a GUID that identifies the caller of this\r | |
69 | function. This is an optional parameter that may be\r | |
70 | NULL.\r | |
71 | @param Data Pointer to the extended data buffer. This is an\r | |
72 | optional parameter that may be NULL.\r | |
73 | \r | |
29f766e4 | 74 | @retval EFI_SUCCESS The status code was reported.\r |
75 | @retval EFI_UNSUPPORTED Status code service is not available.\r | |
76 | @retval EFI_UNSUPPORTED Status code type is not supported.\r | |
e5516b49 | 77 | \r |
78 | **/\r | |
79 | EFI_STATUS\r | |
80 | InternalReportStatusCode (\r | |
81 | IN EFI_STATUS_CODE_TYPE Type,\r | |
82 | IN EFI_STATUS_CODE_VALUE Value,\r | |
83 | IN UINT32 Instance,\r | |
84 | IN CONST EFI_GUID *CallerId OPTIONAL,\r | |
85 | IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r | |
86 | );\r | |
87 | \r | |
29f766e4 | 88 | #endif\r |
e5516b49 | 89 | \r |