]> git.proxmox.com Git - mirror_edk2.git/blob - Vlv2TbltDevicePkg/MonoStatusCode/PlatformStatusCode.h
MdeModulePkg: Fix use-after-free error in InstallConfigurationTable()
[mirror_edk2.git] / Vlv2TbltDevicePkg / MonoStatusCode / PlatformStatusCode.h
1 /*++
2
3 Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>
4
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.
9
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.
12
13
14 Module Name:
15
16 PlatformStatusCode.h
17
18 Abstract:
19
20 Contains Platform specific implementations required to use status codes.
21
22 --*/
23
24 #ifndef _PLATFORM_STATUS_CODE_H_
25 #define _PLATFORM_STATUS_CODE_H_
26
27
28 #define CONFIG_PORT0 0x4E
29 #define INDEX_PORT0 0x4E
30 #define DATA_PORT0 0x4F
31 #define PCI_IDX 0xCF8
32 #define PCI_DAT 0xCFC
33
34 #include "MonoStatusCode.h"
35
36 /*++
37
38 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
39
40 This program and the accompanying materials are licensed and made available under
41 the terms and conditions of the BSD License that accompanies this distribution.
42 The full text of the license may be found at
43 http://opensource.org/licenses/bsd-license.php.
44
45 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
46 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
47
48 This software and associated documentation (if any) is furnished
49 under a license and may only be used or copied in accordance
50 with the terms of the license. Except as permitted by such
51 license, no part of this software or documentation may be
52 reproduced, stored in a retrieval system, or transmitted in any
53 form or by any means without the express written consent of
54 Intel Corporation.
55
56
57 Module Name:
58
59 Port80StatusCodeLib.h
60
61 Abstract:
62
63 Lib to provide status code reporting via port 80.
64
65 --*/
66
67 #ifndef _PEI_PORT_80_STATUS_CODE_H_
68 #define _PEI_PORT_80_STATUS_CODE_H_
69
70
71
72 //
73 // Status code reporting function
74 //
75 EFI_STATUS
76 Port80ReportStatusCode (
77 IN CONST EFI_PEI_SERVICES **PeiServices,
78 IN EFI_STATUS_CODE_TYPE CodeType,
79 IN EFI_STATUS_CODE_VALUE Value,
80 IN UINT32 Instance,
81 IN CONST EFI_GUID * CallerId,
82 IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL
83 );
84
85 #endif
86
87 /*++
88
89 Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved
90
91 This program and the accompanying materials are licensed and made available under
92 the terms and conditions of the BSD License that accompanies this distribution.
93 The full text of the license may be found at
94 http://opensource.org/licenses/bsd-license.php.
95
96 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
97 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
98
99 This software and associated documentation (if any) is furnished
100 under a license and may only be used or copied in accordance
101 with the terms of the license. Except as permitted by such
102 license, no part of this software or documentation may be
103 reproduced, stored in a retrieval system, or transmitted in any
104 form or by any means without the express written consent of
105 Intel Corporation.
106
107
108 Module Name:
109
110 SerialStatusCodeLib.h
111
112 Abstract:
113
114 Lib to provide Serial I/O status code reporting.
115
116 --*/
117
118 #ifndef _PEI_SERIAL_STATUS_CODE_LIB_H_
119 #define _PEI_SERIAL_STATUS_CODE_LIB_H_
120
121
122 #include <Guid/StatusCodeDataTypeId.h>
123 #include <Guid/StatusCodeDataTypeDebug.h>
124 #include <Library/ReportStatusCodeLib.h>
125 #include <Library/PrintLib.h>
126 #include <Library/BaseMemoryLib.h>
127
128 //
129 // Initialization function
130 //
131 VOID
132 SerialInitializeStatusCode (
133 VOID
134 );
135
136 //
137 // Status code reporting function
138 //
139 EFI_STATUS
140 SerialReportStatusCode (
141 IN CONST EFI_PEI_SERVICES **PeiServices,
142 IN EFI_STATUS_CODE_TYPE CodeType,
143 IN EFI_STATUS_CODE_VALUE Value,
144 IN UINT32 Instance,
145 IN CONST EFI_GUID * CallerId,
146 IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL
147 );
148
149 #endif
150
151 extern EFI_PEI_PROGRESS_CODE_PPI mStatusCodePpi;
152 extern EFI_PEI_PPI_DESCRIPTOR mPpiListStatusCode;
153 #define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
154 #define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
155 #define STATUSCODE_PEIM_SIGNATURE EFI_SIGNATURE_32 ('p', 's', 't', 'c')
156
157 typedef struct {
158 UINT32 Signature;
159 EFI_FFS_FILE_HEADER *FfsHeader;
160 EFI_PEI_NOTIFY_DESCRIPTOR StatusCodeNotify;
161 } STATUSCODE_CALLBACK_STATE_INFORMATION;
162
163 #pragma pack(1)
164 typedef struct {
165 UINT16 Limit;
166 UINT32 Base;
167 } GDT_DSCRIPTOR;
168 #pragma pack()
169
170 #define STATUSCODE_PEIM_FROM_THIS(a) \
171 BASE_CR ( \
172 a, \
173 STATUSCODE_CALLBACK_STATE_INFORMATION, \
174 StatusCodeNotify \
175 )
176
177 VOID
178 EFIAPI
179 PlatformInitializeStatusCode (
180 IN EFI_FFS_FILE_HEADER *FfsHeader,
181 IN CONST EFI_PEI_SERVICES **PeiServices
182 );
183
184
185 //
186 // Function declarations
187 //
188 /**
189 Install Firmware Volume Hob's once there is main memory
190
191 @param PeiServices General purpose services available to every PEIM.
192 @param NotifyDescriptor Not Used
193 @param Ppi Not Used
194
195 @retval Status EFI_SUCCESS if the interface could be successfully
196 installed
197
198 **/
199 EFI_STATUS
200 EFIAPI
201 MemoryDiscoveredPpiNotifyCallback (
202 IN EFI_PEI_SERVICES **PeiServices,
203 IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor,
204 IN VOID *Ppi
205 );
206
207 #endif