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 PI.
21 #ifndef __PEI_CPUIO_PPI_H__
22 #define __PEI_CPUIO_PPI_H__
24 #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \
25 { 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } }
27 typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI
;
30 // *******************************************************
31 // EFI_PEI_CPU_IO_PPI_WIDTH
32 // *******************************************************
35 EfiPeiCpuIoWidthUint8
,
36 EfiPeiCpuIoWidthUint16
,
37 EfiPeiCpuIoWidthUint32
,
38 EfiPeiCpuIoWidthUint64
,
39 EfiPeiCpuIoWidthFifoUint8
,
40 EfiPeiCpuIoWidthFifoUint16
,
41 EfiPeiCpuIoWidthFifoUint32
,
42 EfiPeiCpuIoWidthFifoUint64
,
43 EfiPeiCpuIoWidthFillUint8
,
44 EfiPeiCpuIoWidthFillUint16
,
45 EfiPeiCpuIoWidthFillUint32
,
46 EfiPeiCpuIoWidthFillUint64
,
47 EfiPeiCpuIoWidthMaximum
48 } EFI_PEI_CPU_IO_PPI_WIDTH
;
51 Memory-based access services and I/O-based access services.
53 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
54 @param This Pointer to local data for the interface.
55 @param Width The width of the access. Enumerated in bytes.
56 @param Address The physical address of the access.
57 @param Count The number of accesses to perform.
58 @param Buffer A pointer to the buffer of data.
60 @retval EFI_SUCCESS The function completed successfully.
61 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
66 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
) (
67 IN EFI_PEI_SERVICES
**PeiServices
,
68 IN EFI_PEI_CPU_IO_PPI
*This
,
69 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
76 // *******************************************************
77 // EFI_PEI_CPU_IO_PPI_ACCESS
78 // *******************************************************
81 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
82 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
83 } EFI_PEI_CPU_IO_PPI_ACCESS
;
86 8-bit I/O read operations.
88 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
89 @param This Pointer to local data for the interface.
90 @param Address The physical address of the access.
97 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
) (
98 IN EFI_PEI_SERVICES
**PeiServices
,
99 IN EFI_PEI_CPU_IO_PPI
*This
,
104 16-bit I/O read operations.
106 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
107 @param This Pointer to local data for the interface.
108 @param Address The physical address of the access.
115 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
) (
116 IN EFI_PEI_SERVICES
**PeiServices
,
117 IN EFI_PEI_CPU_IO_PPI
*This
,
122 32-bit I/O read operations.
124 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
125 @param This Pointer to local data for the interface.
126 @param Address The physical address of the access.
133 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
) (
134 IN EFI_PEI_SERVICES
**PeiServices
,
135 IN EFI_PEI_CPU_IO_PPI
*This
,
140 64-bit I/O read operations.
142 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
143 @param This Pointer to local data for the interface.
144 @param Address The physical address of the access.
151 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
) (
152 IN EFI_PEI_SERVICES
**PeiServices
,
153 IN EFI_PEI_CPU_IO_PPI
*This
,
158 8-bit I/O write operations.
160 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
161 @param This Pointer to local data for the interface.
162 @param Address The physical address of the access.
163 @param Data The data to write.
170 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
) (
171 IN EFI_PEI_SERVICES
**PeiServices
,
172 IN EFI_PEI_CPU_IO_PPI
*This
,
178 16-bit I/O write operations.
180 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
181 @param This Pointer to local data for the interface.
182 @param Address The physical address of the access.
183 @param Data The data to write.
190 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
) (
191 IN EFI_PEI_SERVICES
**PeiServices
,
192 IN EFI_PEI_CPU_IO_PPI
*This
,
198 32-bit I/O write operations.
200 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
201 @param This Pointer to local data for the interface.
202 @param Address The physical address of the access.
203 @param Data The data to write.
210 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
) (
211 IN EFI_PEI_SERVICES
**PeiServices
,
212 IN EFI_PEI_CPU_IO_PPI
*This
,
218 64-bit I/O write operations.
220 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
221 @param This Pointer to local data for the interface.
222 @param Address The physical address of the access.
223 @param Data The data to write.
230 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
) (
231 IN EFI_PEI_SERVICES
**PeiServices
,
232 IN EFI_PEI_CPU_IO_PPI
*This
,
238 8-bit Memory read operations.
240 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
241 @param This Pointer to local data for the interface.
242 @param Address The physical address of the access.
249 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
) (
250 IN EFI_PEI_SERVICES
**PeiServices
,
251 IN EFI_PEI_CPU_IO_PPI
*This
,
256 16-bit Memory read operations.
258 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
259 @param This Pointer to local data for the interface.
260 @param Address The physical address of the access.
267 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
) (
268 IN EFI_PEI_SERVICES
**PeiServices
,
269 IN EFI_PEI_CPU_IO_PPI
*This
,
274 32-bit Memory read operations.
276 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
277 @param This Pointer to local data for the interface.
278 @param Address The physical address of the access.
285 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
) (
286 IN EFI_PEI_SERVICES
**PeiServices
,
287 IN EFI_PEI_CPU_IO_PPI
*This
,
292 64-bit Memory read operations.
294 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
295 @param This Pointer to local data for the interface.
296 @param Address The physical address of the access.
303 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
) (
304 IN EFI_PEI_SERVICES
**PeiServices
,
305 IN EFI_PEI_CPU_IO_PPI
*This
,
310 8-bit Memory write operations.
312 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
313 @param This Pointer to local data for the interface.
314 @param Address The physical address of the access.
315 @param Data The data to write.
322 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
) (
323 IN EFI_PEI_SERVICES
**PeiServices
,
324 IN EFI_PEI_CPU_IO_PPI
*This
,
330 16-bit Memory write operations.
332 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
333 @param This Pointer to local data for the interface.
334 @param Address The physical address of the access.
335 @param Data The data to write.
342 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
) (
343 IN EFI_PEI_SERVICES
**PeiServices
,
344 IN EFI_PEI_CPU_IO_PPI
*This
,
350 32-bit Memory write operations.
352 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
353 @param This Pointer to local data for the interface.
354 @param Address The physical address of the access.
355 @param Data The data to write.
362 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
) (
363 IN EFI_PEI_SERVICES
**PeiServices
,
364 IN EFI_PEI_CPU_IO_PPI
*This
,
370 64-bit Memory write operations.
372 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
373 @param This Pointer to local data for the interface.
374 @param Address The physical address of the access.
375 @param Data The data to write.
382 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
) (
383 IN EFI_PEI_SERVICES
**PeiServices
,
384 IN EFI_PEI_CPU_IO_PPI
*This
,
390 @par Ppi Description:
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 the bus or system.
395 Collection of memory-access services.
398 Collection of I/O-access services.
416 16-bit write service.
419 32-bit write service.
422 64-bit write service.
440 16-bit write service.
443 32-bit write service.
446 64-bit write service.
449 struct _EFI_PEI_CPU_IO_PPI
{
450 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
451 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
452 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
453 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
454 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
455 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
456 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
457 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
458 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
459 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
460 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
461 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
462 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
463 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
464 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
465 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
466 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
467 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
470 extern EFI_GUID gEfiPeiCpuIoPpiInServiceTableGuid
;