2 This PPI provides a set of memory and I/O-based services.
3 The perspective of the services is that of the processor, not the bus or system.
5 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials are licensed and made available under
7 the terms and conditions of the BSD License that accompanies this distribution.
8 The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php.
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 This PPI is introduced in PI Version 1.0.
19 #ifndef __PEI_CPUIO_PPI_H__
20 #define __PEI_CPUIO_PPI_H__
22 #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \
23 { 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } }
25 typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI
;
28 /// EFI_PEI_CPU_IO_PPI_WIDTH.
31 EfiPeiCpuIoWidthUint8
,
32 EfiPeiCpuIoWidthUint16
,
33 EfiPeiCpuIoWidthUint32
,
34 EfiPeiCpuIoWidthUint64
,
35 EfiPeiCpuIoWidthFifoUint8
,
36 EfiPeiCpuIoWidthFifoUint16
,
37 EfiPeiCpuIoWidthFifoUint32
,
38 EfiPeiCpuIoWidthFifoUint64
,
39 EfiPeiCpuIoWidthFillUint8
,
40 EfiPeiCpuIoWidthFillUint16
,
41 EfiPeiCpuIoWidthFillUint32
,
42 EfiPeiCpuIoWidthFillUint64
,
43 EfiPeiCpuIoWidthMaximum
44 } EFI_PEI_CPU_IO_PPI_WIDTH
;
47 Memory-based access services and I/O-based access services.
49 @param[in] PeiServices An indirect pointer to the PEI Services Table
50 published by the PEI Foundation.
51 @param[in] This The pointer to local data for the interface.
52 @param[in] Width The width of the access. Enumerated in bytes.
53 @param[in] Address The physical address of the access.
54 @param[in] Count The number of accesses to perform.
55 @param[in, out] Buffer A pointer to the buffer of data.
57 @retval EFI_SUCCESS The function completed successfully.
58 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
63 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
)(
64 IN CONST EFI_PEI_SERVICES
**PeiServices
,
65 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
66 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
73 /// EFI_PEI_CPU_IO_PPI_ACCESS
77 /// This service provides the various modalities of memory and I/O read.
79 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
81 /// This service provides the various modalities of memory and I/O write.
83 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
84 } EFI_PEI_CPU_IO_PPI_ACCESS
;
87 8-bit I/O read operations.
89 @param[in] PeiServices An indirect pointer to the PEI Services Table published
90 by the PEI Foundation.
91 @param[in] This The pointer to local data for the interface.
92 @param[in] Address The physical address of the access.
94 @return An 8-bit value returned from the I/O space.
99 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
100 IN CONST EFI_PEI_SERVICES
**PeiServices
,
101 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
106 16-bit I/O read operations.
108 @param[in] PeiServices An indirect pointer to the PEI Services Table published
109 by the PEI Foundation.
110 @param[in] This The pointer to local data for the interface.
111 @param[in] Address The physical address of the access.
113 @return A 16-bit value returned from the I/O space.
118 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
)(
119 IN CONST EFI_PEI_SERVICES
**PeiServices
,
120 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
125 32-bit I/O read operations.
127 @param[in] PeiServices An indirect pointer to the PEI Services Table published
128 by the PEI Foundation.
129 @param[in] This The pointer to local data for the interface.
130 @param[in] Address The physical address of the access.
132 @return A 32-bit value returned from the I/O space.
137 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
)(
138 IN CONST EFI_PEI_SERVICES
**PeiServices
,
139 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
144 64-bit I/O read operations.
146 @param[in] PeiServices An indirect pointer to the PEI Services Table published
147 by the PEI Foundation.
148 @param[in] This The pointer to local data for the interface.
149 @param[in] Address The physical address of the access.
151 @return A 64-bit value returned from the I/O space.
156 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
157 IN CONST EFI_PEI_SERVICES
**PeiServices
,
158 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
163 8-bit I/O write operations.
165 @param[in] PeiServices An indirect pointer to the PEI Services Table published
166 by the PEI Foundation.
167 @param[in] This The pointer to local data for the interface.
168 @param[in] Address The physical address of the access.
169 @param[in] Data The data to write.
174 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
175 IN CONST EFI_PEI_SERVICES
**PeiServices
,
176 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
182 16-bit I/O write operations.
184 @param[in] PeiServices An indirect pointer to the PEI Services Table published
185 by the PEI Foundation.
186 @param[in] This The pointer to local data for the interface.
187 @param[in] Address The physical address of the access.
188 @param[in] Data The data to write.
193 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
194 IN CONST EFI_PEI_SERVICES
**PeiServices
,
195 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
201 32-bit I/O write operations.
203 @param[in] PeiServices An indirect pointer to the PEI Services Table published
204 by the PEI Foundation.
205 @param[in] This The pointer to local data for the interface.
206 @param[in] Address The physical address of the access.
207 @param[in] Data The data to write.
212 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
213 IN CONST EFI_PEI_SERVICES
**PeiServices
,
214 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
220 64-bit I/O write operations.
222 @param[in] PeiServices An indirect pointer to the PEI Services Table published
223 by the PEI Foundation.
224 @param[in] This The pointer to local data for the interface.
225 @param[in] Address The physical address of the access.
226 @param[in] Data The data to write.
231 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
232 IN CONST EFI_PEI_SERVICES
**PeiServices
,
233 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
239 8-bit memory read operations.
241 @param[in] PeiServices An indirect pointer to the PEI Services Table published
242 by the PEI Foundation.
243 @param[in] This The pointer to local data for the interface.
244 @param[in] Address The physical address of the access.
246 @return An 8-bit value returned from the memory space.
251 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
252 IN CONST EFI_PEI_SERVICES
**PeiServices
,
253 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
258 16-bit memory read operations.
260 @param[in] PeiServices An indirect pointer to the PEI Services Table published
261 by the PEI Foundation.
262 @param[in] This The pointer to local data for the interface.
263 @param[in] Address The physical address of the access.
265 @return A 16-bit value returned from the memory space.
270 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
)(
271 IN CONST EFI_PEI_SERVICES
**PeiServices
,
272 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
277 32-bit memory read operations.
279 @param[in] PeiServices An indirect pointer to the PEI Services Table published
280 by the PEI Foundation.
281 @param[in] This The pointer to local data for the interface.
282 @param[in] Address The physical address of the access.
284 @return A 32-bit value returned from the memory space.
289 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
290 IN CONST EFI_PEI_SERVICES
**PeiServices
,
291 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
296 64-bit memory read operations.
298 @param[in] PeiServices An indirect pointer to the PEI Services Table published
299 by the PEI Foundation.
300 @param[in] This The pointer to local data for the interface.
301 @param[in] Address The physical address of the access.
303 @return A 64-bit value returned from the memory space.
308 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
)(
309 IN CONST EFI_PEI_SERVICES
**PeiServices
,
310 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
315 8-bit memory write operations.
317 @param[in] PeiServices An indirect pointer to the PEI Services Table published
318 by the PEI Foundation.
319 @param[in] This The pointer to local data for the interface.
320 @param[in] Address The physical address of the access.
321 @param[in] Data The data to write.
326 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
)(
327 IN CONST EFI_PEI_SERVICES
**PeiServices
,
328 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
334 16-bit memory write operations.
336 @param[in] PeiServices An indirect pointer to the PEI Services Table published
337 by the PEI Foundation.
338 @param[in] This The pointer to local data for the interface.
339 @param[in] Address The physical address of the access.
340 @param[in] Data The data to write.
345 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
346 IN CONST EFI_PEI_SERVICES
**PeiServices
,
347 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
353 32-bit memory write operations.
355 @param[in] PeiServices An indirect pointer to the PEI Services Table published
356 by the PEI Foundation.
357 @param[in] This The pointer to local data for the interface.
358 @param[in] Address The physical address of the access.
359 @param[in] Data The data to write.
364 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
365 IN CONST EFI_PEI_SERVICES
**PeiServices
,
366 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
372 64-bit memory write operations.
374 @param[in] PeiServices An indirect pointer to the PEI Services Table published
375 by the PEI Foundation.
376 @param[in] This The pointer to local data for the interface.
377 @param[in] Address The physical address of the access.
378 @param[in] Data The data to write.
383 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
384 IN CONST EFI_PEI_SERVICES
**PeiServices
,
385 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
391 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
392 /// The perspective of the services is that of the processor, not that of the
395 struct _EFI_PEI_CPU_IO_PPI
{
397 /// Collection of memory-access services.
399 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
401 /// Collection of I/O-access services.
403 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
405 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
406 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
407 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
408 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
410 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
411 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
412 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
413 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
415 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
416 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
417 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
418 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
420 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
421 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
422 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
423 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
426 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;