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.
13 @par Revision Reference:
14 This PPI is defined in PI.
19 #ifndef __PEI_CPUIO_PPI_H__
20 #define __PEI_CPUIO_PPI_H__
22 #include <ProcessorBind.h>
23 #include <Pi/PiPeiCis.h>
25 #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \
26 { 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } }
28 typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI
;
31 // *******************************************************
32 // EFI_PEI_CPU_IO_PPI_WIDTH
33 // *******************************************************
36 EfiPeiCpuIoWidthUint8
,
37 EfiPeiCpuIoWidthUint16
,
38 EfiPeiCpuIoWidthUint32
,
39 EfiPeiCpuIoWidthUint64
,
40 EfiPeiCpuIoWidthFifoUint8
,
41 EfiPeiCpuIoWidthFifoUint16
,
42 EfiPeiCpuIoWidthFifoUint32
,
43 EfiPeiCpuIoWidthFifoUint64
,
44 EfiPeiCpuIoWidthFillUint8
,
45 EfiPeiCpuIoWidthFillUint16
,
46 EfiPeiCpuIoWidthFillUint32
,
47 EfiPeiCpuIoWidthFillUint64
,
48 EfiPeiCpuIoWidthMaximum
49 } EFI_PEI_CPU_IO_PPI_WIDTH
;
52 Memory-based access services and I/O-based access services.
54 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
55 @param This Pointer to local data for the interface.
56 @param Width The width of the access. Enumerated in bytes.
57 @param Address The physical address of the access.
58 @param Count The number of accesses to perform.
59 @param Buffer A pointer to the buffer of data.
61 @retval EFI_SUCCESS The function completed successfully.
62 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
67 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
) (
68 IN EFI_PEI_SERVICES
**PeiServices
,
69 IN EFI_PEI_CPU_IO_PPI
*This
,
70 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
77 // *******************************************************
78 // EFI_PEI_CPU_IO_PPI_ACCESS
79 // *******************************************************
82 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
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 PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
90 @param This Pointer to local data for the interface.
91 @param Address The physical address of the access.
98 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
) (
99 IN EFI_PEI_SERVICES
**PeiServices
,
100 IN EFI_PEI_CPU_IO_PPI
*This
,
105 16-bit I/O read operations.
107 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
108 @param This Pointer to local data for the interface.
109 @param Address The physical address of the access.
116 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
) (
117 IN EFI_PEI_SERVICES
**PeiServices
,
118 IN EFI_PEI_CPU_IO_PPI
*This
,
123 32-bit I/O read operations.
125 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
126 @param This Pointer to local data for the interface.
127 @param Address The physical address of the access.
134 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
) (
135 IN EFI_PEI_SERVICES
**PeiServices
,
136 IN EFI_PEI_CPU_IO_PPI
*This
,
141 64-bit I/O read operations.
143 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
144 @param This Pointer to local data for the interface.
145 @param Address The physical address of the access.
152 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
) (
153 IN EFI_PEI_SERVICES
**PeiServices
,
154 IN EFI_PEI_CPU_IO_PPI
*This
,
159 8-bit I/O write operations.
161 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
162 @param This Pointer to local data for the interface.
163 @param Address The physical address of the access.
164 @param Data The data to write.
171 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
) (
172 IN EFI_PEI_SERVICES
**PeiServices
,
173 IN EFI_PEI_CPU_IO_PPI
*This
,
179 16-bit I/O write operations.
181 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
182 @param This Pointer to local data for the interface.
183 @param Address The physical address of the access.
184 @param Data The data to write.
191 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
) (
192 IN EFI_PEI_SERVICES
**PeiServices
,
193 IN EFI_PEI_CPU_IO_PPI
*This
,
199 32-bit I/O write operations.
201 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
202 @param This Pointer to local data for the interface.
203 @param Address The physical address of the access.
204 @param Data The data to write.
211 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
) (
212 IN EFI_PEI_SERVICES
**PeiServices
,
213 IN EFI_PEI_CPU_IO_PPI
*This
,
219 64-bit I/O write operations.
221 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
222 @param This Pointer to local data for the interface.
223 @param Address The physical address of the access.
224 @param Data The data to write.
231 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
) (
232 IN EFI_PEI_SERVICES
**PeiServices
,
233 IN EFI_PEI_CPU_IO_PPI
*This
,
239 8-bit Memory read operations.
241 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
242 @param This Pointer to local data for the interface.
243 @param Address The physical address of the access.
250 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
) (
251 IN EFI_PEI_SERVICES
**PeiServices
,
252 IN EFI_PEI_CPU_IO_PPI
*This
,
257 16-bit Memory read operations.
259 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
260 @param This Pointer to local data for the interface.
261 @param Address The physical address of the access.
268 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
) (
269 IN EFI_PEI_SERVICES
**PeiServices
,
270 IN EFI_PEI_CPU_IO_PPI
*This
,
275 32-bit Memory read operations.
277 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
278 @param This Pointer to local data for the interface.
279 @param Address The physical address of the access.
286 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
) (
287 IN EFI_PEI_SERVICES
**PeiServices
,
288 IN EFI_PEI_CPU_IO_PPI
*This
,
293 64-bit Memory read operations.
295 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
296 @param This Pointer to local data for the interface.
297 @param Address The physical address of the access.
304 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
) (
305 IN EFI_PEI_SERVICES
**PeiServices
,
306 IN EFI_PEI_CPU_IO_PPI
*This
,
311 8-bit Memory write operations.
313 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
314 @param This Pointer to local data for the interface.
315 @param Address The physical address of the access.
316 @param Data The data to write.
323 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
) (
324 IN EFI_PEI_SERVICES
**PeiServices
,
325 IN EFI_PEI_CPU_IO_PPI
*This
,
331 16-bit Memory write operations.
333 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
334 @param This Pointer to local data for the interface.
335 @param Address The physical address of the access.
336 @param Data The data to write.
343 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
) (
344 IN EFI_PEI_SERVICES
**PeiServices
,
345 IN EFI_PEI_CPU_IO_PPI
*This
,
351 32-bit Memory write operations.
353 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
354 @param This Pointer to local data for the interface.
355 @param Address The physical address of the access.
356 @param Data The data to write.
363 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
) (
364 IN EFI_PEI_SERVICES
**PeiServices
,
365 IN EFI_PEI_CPU_IO_PPI
*This
,
371 64-bit Memory write operations.
373 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
374 @param This Pointer to local data for the interface.
375 @param Address The physical address of the access.
376 @param Data The data to write.
383 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
) (
384 IN EFI_PEI_SERVICES
**PeiServices
,
385 IN EFI_PEI_CPU_IO_PPI
*This
,
391 @par Ppi Description:
392 EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
393 The perspective of the services is that of the processor, not the bus or system.
396 Collection of memory-access services.
399 Collection of I/O-access services.
417 16-bit write service.
420 32-bit write service.
423 64-bit write service.
441 16-bit write service.
444 32-bit write service.
447 64-bit write service.
450 struct _EFI_PEI_CPU_IO_PPI
{
451 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
452 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
453 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
454 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
455 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
456 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
457 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
458 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
459 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
460 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
461 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
462 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
463 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
464 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
465 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
466 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
467 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
468 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
471 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;