3 Copyright (c) 2004 - 2005, Intel Corporation
4 All rights reserved. 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
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.
18 Monolithic single PEIM to provide the status code functionality.
19 The PEIM is a blend of libraries that correspond to the different status code
20 listeners that a platform installs.
24 #ifndef _MONO_STATUS_CODE_H_
25 #define _MONO_STATUS_CODE_H_
28 // Statements that include other files.
33 #include "EfiCommonLib.h"
36 // Driver Produced DXE Protocol Prototypes
38 #include EFI_PPI_PRODUCER (StatusCode)
41 // Driver Consumed DXE Protocol Prototypes
43 #include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)
46 // Driver GUID includes
48 #include EFI_GUID_DEFINITION (StatusCode)
49 #include EFI_GUID_DEFINITION (StatusCodeCallerId)
50 #include EFI_GUID_DEFINITION (GlobalVariable)
52 extern EFI_GUID mStatusCodeRuntimeGuid
;
55 // Platform specific function Declarations. These must be implemented in a
56 // subdirectory named PlatformName in a file named PlatformStatusCode.c.
57 // See D845GRG\PlatformStatusCode.c for an example of a simple status code
59 // See Nt32\PlatformStatusCode.c for an example of a status code implementation
60 // that relocates itself into memory.
63 // This is the driver entry point and must be defined.
67 InstallMonoStatusCode (
68 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
69 IN EFI_PEI_SERVICES
**PeiServices
73 // This is the platform function to initialize the listeners desired by the
77 PlatformInitializeStatusCode (
78 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
79 IN EFI_PEI_SERVICES
**PeiServices
83 // This is the platform function that calls all of the listeners desired by the
88 PlatformReportStatusCode (
89 IN EFI_PEI_SERVICES
**PeiServices
,
90 IN EFI_STATUS_CODE_TYPE CodeType
,
91 IN EFI_STATUS_CODE_VALUE Value
,
93 IN EFI_GUID
* CallerId
,
94 IN EFI_STATUS_CODE_DATA
* Data OPTIONAL
98 // Platform independent function Declarations
101 // Initialize the status code listeners and publish the status code PPI.
105 InitializeMonoStatusCode (
106 IN EFI_FFS_FILE_HEADER
*FfsHeader
,
107 IN EFI_PEI_SERVICES
**PeiServices
111 // Convert a DXE status code call into a PEI status code call.
115 TranslateDxeStatusCodeToPeiStatusCode (
116 IN EFI_STATUS_CODE_TYPE CodeType
,
117 IN EFI_STATUS_CODE_VALUE Value
,
119 IN EFI_GUID
* CallerId
,
120 IN EFI_STATUS_CODE_DATA
* Data OPTIONAL
124 // Publish a HOB that contains the listener to be used by DXE.
128 InitializeDxeReportStatusCode (
129 IN EFI_PEI_SERVICES
**PeiServices