]> git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Sample/Platform/Generic/MonoStatusCode/Pei/MonoStatusCode.h
1) Sync EdkCompatibilityPkg with EDK 1.04. The changes includes:
[mirror_edk2.git] / EdkCompatibilityPkg / Sample / Platform / Generic / MonoStatusCode / Pei / MonoStatusCode.h
1 /*++
2
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
8
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.
11
12 Module Name:
13
14 MonoStatusCode.h
15
16 Abstract:
17
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.
21
22 --*/
23
24 #ifndef _MONO_STATUS_CODE_H_
25 #define _MONO_STATUS_CODE_H_
26
27 //
28 // Statements that include other files.
29 //
30 #include "Tiano.h"
31 #include "Pei.h"
32 #include "PeiLib.h"
33 #include "EfiCommonLib.h"
34
35 //
36 // Driver Produced DXE Protocol Prototypes
37 //
38 #include EFI_PPI_PRODUCER (StatusCode)
39
40 //
41 // Driver Consumed DXE Protocol Prototypes
42 //
43 #include EFI_ARCH_PROTOCOL_CONSUMER (StatusCode)
44
45 //
46 // Driver GUID includes
47 //
48 #include EFI_GUID_DEFINITION (StatusCode)
49 #include EFI_GUID_DEFINITION (StatusCodeCallerId)
50 #include EFI_GUID_DEFINITION (GlobalVariable)
51
52 extern EFI_GUID mStatusCodeRuntimeGuid;
53
54 //
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
58 // implementation.
59 // See Nt32\PlatformStatusCode.c for an example of a status code implementation
60 // that relocates itself into memory.
61 //
62 //
63 // This is the driver entry point and must be defined.
64 //
65 EFI_STATUS
66 EFIAPI
67 InstallMonoStatusCode (
68 IN EFI_FFS_FILE_HEADER *FfsHeader,
69 IN EFI_PEI_SERVICES **PeiServices
70 )
71 ;
72
73 //
74 // This is the platform function to initialize the listeners desired by the
75 // platform.
76 //
77 VOID
78 PlatformInitializeStatusCode (
79 IN EFI_FFS_FILE_HEADER *FfsHeader,
80 IN EFI_PEI_SERVICES **PeiServices
81 )
82 ;
83
84 //
85 // This is the platform function that calls all of the listeners desired by the
86 // platform.
87 //
88 EFI_STATUS
89 EFIAPI
90 PlatformReportStatusCode (
91 IN EFI_PEI_SERVICES **PeiServices,
92 IN EFI_STATUS_CODE_TYPE CodeType,
93 IN EFI_STATUS_CODE_VALUE Value,
94 IN UINT32 Instance,
95 IN EFI_GUID * CallerId,
96 IN EFI_STATUS_CODE_DATA * Data OPTIONAL
97 )
98 ;
99
100 //
101 // Platform independent function Declarations
102 //
103 //
104 // Initialize the status code listeners and publish the status code PPI.
105 //
106 VOID
107 EFIAPI
108 InitializeMonoStatusCode (
109 IN EFI_FFS_FILE_HEADER *FfsHeader,
110 IN EFI_PEI_SERVICES **PeiServices
111 )
112 ;
113
114 //
115 // Convert a DXE status code call into a PEI status code call.
116 //
117 EFI_STATUS
118 EFIAPI
119 TranslateDxeStatusCodeToPeiStatusCode (
120 IN EFI_STATUS_CODE_TYPE CodeType,
121 IN EFI_STATUS_CODE_VALUE Value,
122 IN UINT32 Instance,
123 IN EFI_GUID * CallerId,
124 IN EFI_STATUS_CODE_DATA * Data OPTIONAL
125 )
126 ;
127
128 //
129 // Publish a HOB that contains the listener to be used by DXE.
130 //
131 EFI_STATUS
132 EFIAPI
133 InitializeDxeReportStatusCode (
134 IN EFI_PEI_SERVICES **PeiServices
135 )
136 ;
137
138 #endif