2 This file declares CPU IO PPI that abstracts CPU IO access
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. 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.
15 @par Revision Reference:
16 This PPI is defined in PEI CIS.
21 #ifndef __PEI_CPUIO_PPI_H__
22 #define __PEI_CPUIO_PPI_H__
24 #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \
26 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } \
29 typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI
;
32 // *******************************************************
33 // EFI_PEI_CPU_IO_PPI_WIDTH
34 // *******************************************************
37 EfiPeiCpuIoWidthUint8
,
38 EfiPeiCpuIoWidthUint16
,
39 EfiPeiCpuIoWidthUint32
,
40 EfiPeiCpuIoWidthUint64
,
41 EfiPeiCpuIoWidthFifoUint8
,
42 EfiPeiCpuIoWidthFifoUint16
,
43 EfiPeiCpuIoWidthFifoUint32
,
44 EfiPeiCpuIoWidthFifoUint64
,
45 EfiPeiCpuIoWidthFillUint8
,
46 EfiPeiCpuIoWidthFillUint16
,
47 EfiPeiCpuIoWidthFillUint32
,
48 EfiPeiCpuIoWidthFillUint64
,
49 EfiPeiCpuIoWidthMaximum
50 } EFI_PEI_CPU_IO_PPI_WIDTH
;
53 Memory-based access services and I/O-based access services.
55 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
56 @param This Pointer to local data for the interface.
57 @param Width The width of the access. Enumerated in bytes.
58 @param Address The physical address of the access.
59 @param Count The number of accesses to perform.
60 @param Buffer A pointer to the buffer of data.
62 @retval EFI_SUCCESS The function completed successfully.
63 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
68 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
) (
69 IN EFI_PEI_SERVICES
**PeiServices
,
70 IN EFI_PEI_CPU_IO_PPI
*This
,
71 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
78 // *******************************************************
79 // EFI_PEI_CPU_IO_PPI_ACCESS
80 // *******************************************************
83 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
84 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
85 } EFI_PEI_CPU_IO_PPI_ACCESS
;
88 8-bit I/O read operations.
90 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
91 @param This Pointer to local data for the interface.
92 @param Address The physical address of the access.
99 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
) (
100 IN EFI_PEI_SERVICES
**PeiServices
,
101 IN EFI_PEI_CPU_IO_PPI
*This
,
106 16-bit I/O read operations.
108 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
109 @param This Pointer to local data for the interface.
110 @param Address The physical address of the access.
117 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
) (
118 IN EFI_PEI_SERVICES
**PeiServices
,
119 IN EFI_PEI_CPU_IO_PPI
*This
,
124 32-bit I/O read operations.
126 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
127 @param This Pointer to local data for the interface.
128 @param Address The physical address of the access.
135 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
) (
136 IN EFI_PEI_SERVICES
**PeiServices
,
137 IN EFI_PEI_CPU_IO_PPI
*This
,
142 64-bit I/O read operations.
144 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
145 @param This Pointer to local data for the interface.
146 @param Address The physical address of the access.
153 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
) (
154 IN EFI_PEI_SERVICES
**PeiServices
,
155 IN EFI_PEI_CPU_IO_PPI
*This
,
160 8-bit I/O write operations.
162 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
163 @param This Pointer to local data for the interface.
164 @param Address The physical address of the access.
165 @param Data The data to write.
172 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
) (
173 IN EFI_PEI_SERVICES
**PeiServices
,
174 IN EFI_PEI_CPU_IO_PPI
*This
,
180 16-bit I/O write operations.
182 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
183 @param This Pointer to local data for the interface.
184 @param Address The physical address of the access.
185 @param Data The data to write.
192 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
) (
193 IN EFI_PEI_SERVICES
**PeiServices
,
194 IN EFI_PEI_CPU_IO_PPI
*This
,
200 32-bit I/O write operations.
202 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
203 @param This Pointer to local data for the interface.
204 @param Address The physical address of the access.
205 @param Data The data to write.
212 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
) (
213 IN EFI_PEI_SERVICES
**PeiServices
,
214 IN EFI_PEI_CPU_IO_PPI
*This
,
220 64-bit I/O write operations.
222 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
223 @param This Pointer to local data for the interface.
224 @param Address The physical address of the access.
225 @param Data The data to write.
232 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
) (
233 IN EFI_PEI_SERVICES
**PeiServices
,
234 IN EFI_PEI_CPU_IO_PPI
*This
,
240 8-bit Memory read operations.
242 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
243 @param This Pointer to local data for the interface.
244 @param Address The physical address of the access.
251 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
) (
252 IN EFI_PEI_SERVICES
**PeiServices
,
253 IN EFI_PEI_CPU_IO_PPI
*This
,
258 16-bit Memory read operations.
260 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
261 @param This Pointer to local data for the interface.
262 @param Address The physical address of the access.
269 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
) (
270 IN EFI_PEI_SERVICES
**PeiServices
,
271 IN EFI_PEI_CPU_IO_PPI
*This
,
276 32-bit Memory read operations.
278 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
279 @param This Pointer to local data for the interface.
280 @param Address The physical address of the access.
287 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
) (
288 IN EFI_PEI_SERVICES
**PeiServices
,
289 IN EFI_PEI_CPU_IO_PPI
*This
,
294 64-bit Memory read operations.
296 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
297 @param This Pointer to local data for the interface.
298 @param Address The physical address of the access.
305 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
) (
306 IN EFI_PEI_SERVICES
**PeiServices
,
307 IN EFI_PEI_CPU_IO_PPI
*This
,
312 8-bit Memory write operations.
314 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
315 @param This Pointer to local data for the interface.
316 @param Address The physical address of the access.
317 @param Data The data to write.
324 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
) (
325 IN EFI_PEI_SERVICES
**PeiServices
,
326 IN EFI_PEI_CPU_IO_PPI
*This
,
332 16-bit Memory write operations.
334 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
335 @param This Pointer to local data for the interface.
336 @param Address The physical address of the access.
337 @param Data The data to write.
344 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
) (
345 IN EFI_PEI_SERVICES
**PeiServices
,
346 IN EFI_PEI_CPU_IO_PPI
*This
,
352 32-bit Memory write operations.
354 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
355 @param This Pointer to local data for the interface.
356 @param Address The physical address of the access.
357 @param Data The data to write.
364 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
) (
365 IN EFI_PEI_SERVICES
**PeiServices
,
366 IN EFI_PEI_CPU_IO_PPI
*This
,
372 64-bit Memory write operations.
374 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
375 @param This Pointer to local data for the interface.
376 @param Address The physical address of the access.
377 @param Data The data to write.
384 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
) (
385 IN EFI_PEI_SERVICES
**PeiServices
,
386 IN EFI_PEI_CPU_IO_PPI
*This
,
392 @par Ppi Description:
393 EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
394 The perspective of the services is that of the processor, not the bus or system.
397 Collection of memory-access services.
400 Collection of I/O-access services.
418 16-bit write service.
421 32-bit write service.
424 64-bit write service.
442 16-bit write service.
445 32-bit write service.
448 64-bit write service.
451 struct _EFI_PEI_CPU_IO_PPI
{
452 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
453 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
454 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
455 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
456 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
457 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
458 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
459 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
460 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
461 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
462 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
463 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
464 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
465 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
466 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
467 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
468 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
469 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
472 extern EFI_GUID gEfiPeiCpuIoPpiInServiceTableGuid
;