3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials are licensed and made available under
6 the terms and conditions of the BSD License that accompanies this distribution.
7 The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php.
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 Monolithic single PEIM to provide the status code functionality.
21 The PEIM is a blend of libraries that correspond to the different status code
22 listeners that a platform installs.
26 #ifndef _MONO_STATUS_CODE_H_
27 #define _MONO_STATUS_CODE_H_
30 // Statements that include other files.
34 #include "Pi/PiBootMode.h"
36 #include "Ppi/StatusCode.h"
37 #include "Ppi/MemoryDiscovered.h"
38 #include "Ppi/FvLoadFile.h"
40 #include "Library/HobLib.h"
41 #include "Library/DebugLib.h"
42 #include "Library/IoLib.h"
43 #include "Library/SerialPortLib.h"
44 #include "Protocol/StatusCode.h"
47 #ifndef _STATUS_CODE_ENABLER_H_
48 #define _STATUS_CODE_ENABLER_H_
52 #define EFI_STATUS_CODE_ENABLER_HOB_GUID \
54 0x5ffc6cf3, 0x71ad, 0x46f5, 0xbd, 0x8b, 0x7e, 0x8f, 0xfe, 0x19, 0x7, 0xd7 \
57 extern EFI_GUID gEfiSerialStatusCodeEnablerHobGuid
;
59 typedef struct _EFI_STATUS_CODE_INFO
{
60 BOOLEAN StatusCodeDisable
;
61 } EFI_STATUS_CODE_INFO
;
69 // Platform specific function Declarations. These must be implemented in a
70 // subdirectory named PlatformName in a file named PlatformStatusCode.c.
74 // This is the platform function to initialize the listeners desired by the
78 PlatformInitializeStatusCode (
79 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
80 IN CONST EFI_PEI_SERVICES
**PeiServices
84 // This is the platform function that calls all of the listeners desired by the
89 PlatformReportStatusCode (
90 IN CONST EFI_PEI_SERVICES
**PeiServices
,
91 IN EFI_STATUS_CODE_TYPE CodeType
,
92 IN EFI_STATUS_CODE_VALUE Value
,
94 IN CONST EFI_GUID
* CallerId
,
95 IN CONST EFI_STATUS_CODE_DATA
* Data OPTIONAL
99 // Platform independent function Declarations
102 // Initialize the status code listeners and publish the status code PPI.
106 InitializeMonoStatusCode (
107 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
108 IN
const EFI_PEI_SERVICES
**PeiServices
112 // Convert a DXE status code call into a PEI status code call.
116 TranslateDxeStatusCodeToPeiStatusCode (
117 IN EFI_STATUS_CODE_TYPE CodeType
,
118 IN EFI_STATUS_CODE_VALUE Value
,
120 IN EFI_GUID
* CallerId
,
121 IN EFI_STATUS_CODE_DATA
* Data OPTIONAL
125 // Publish a HOB that contains the listener to be used by DXE.
129 InitializeDxeReportStatusCode (
130 IN
const EFI_PEI_SERVICES
**PeiServices