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.
57 @param This Pointer to local data for the interface.
59 @param Width The width of the access. Enumerated in bytes.
61 @param Address The physical address of the access.
63 @param Count The number of accesses to perform.
65 @param Buffer A pointer to the buffer of data.
67 @retval EFI_SUCCESS The function completed successfully.
69 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
74 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
) (
75 IN EFI_PEI_SERVICES
**PeiServices
,
76 IN EFI_PEI_CPU_IO_PPI
*This
,
77 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
84 // *******************************************************
85 // EFI_PEI_CPU_IO_PPI_ACCESS
86 // *******************************************************
89 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
90 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
91 } EFI_PEI_CPU_IO_PPI_ACCESS
;
94 8-bit I/O read operations.
96 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
98 @param This Pointer to local data for the interface.
100 @param Address The physical address of the access.
107 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
) (
108 IN EFI_PEI_SERVICES
**PeiServices
,
109 IN EFI_PEI_CPU_IO_PPI
*This
,
114 16-bit I/O read operations.
116 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
118 @param This Pointer to local data for the interface.
120 @param Address The physical address of the access.
127 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
) (
128 IN EFI_PEI_SERVICES
**PeiServices
,
129 IN EFI_PEI_CPU_IO_PPI
*This
,
134 32-bit I/O read operations.
136 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
138 @param This Pointer to local data for the interface.
140 @param Address The physical address of the access.
147 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
) (
148 IN EFI_PEI_SERVICES
**PeiServices
,
149 IN EFI_PEI_CPU_IO_PPI
*This
,
154 64-bit I/O read operations.
156 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
158 @param This Pointer to local data for the interface.
160 @param Address The physical address of the access.
167 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
) (
168 IN EFI_PEI_SERVICES
**PeiServices
,
169 IN EFI_PEI_CPU_IO_PPI
*This
,
174 8-bit I/O write operations.
176 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
178 @param This Pointer to local data for the interface.
180 @param Address The physical address of the access.
182 @param Data The data to write.
189 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
) (
190 IN EFI_PEI_SERVICES
**PeiServices
,
191 IN EFI_PEI_CPU_IO_PPI
*This
,
197 16-bit I/O write operations.
199 @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.
203 @param Address The physical address of the access.
205 @param Data The data to write.
212 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
) (
213 IN EFI_PEI_SERVICES
**PeiServices
,
214 IN EFI_PEI_CPU_IO_PPI
*This
,
220 32-bit I/O write operations.
222 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
224 @param This Pointer to local data for the interface.
226 @param Address The physical address of the access.
228 @param Data The data to write.
235 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
) (
236 IN EFI_PEI_SERVICES
**PeiServices
,
237 IN EFI_PEI_CPU_IO_PPI
*This
,
243 64-bit I/O write operations.
245 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
247 @param This Pointer to local data for the interface.
249 @param Address The physical address of the access.
251 @param Data The data to write.
258 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
) (
259 IN EFI_PEI_SERVICES
**PeiServices
,
260 IN EFI_PEI_CPU_IO_PPI
*This
,
266 8-bit Memory read operations.
268 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
270 @param This Pointer to local data for the interface.
272 @param Address The physical address of the access.
279 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
) (
280 IN EFI_PEI_SERVICES
**PeiServices
,
281 IN EFI_PEI_CPU_IO_PPI
*This
,
286 16-bit Memory read operations.
288 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
290 @param This Pointer to local data for the interface.
292 @param Address The physical address of the access.
299 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
) (
300 IN EFI_PEI_SERVICES
**PeiServices
,
301 IN EFI_PEI_CPU_IO_PPI
*This
,
306 32-bit Memory read operations.
308 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
310 @param This Pointer to local data for the interface.
312 @param Address The physical address of the access.
319 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
) (
320 IN EFI_PEI_SERVICES
**PeiServices
,
321 IN EFI_PEI_CPU_IO_PPI
*This
,
326 64-bit Memory read operations.
328 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
330 @param This Pointer to local data for the interface.
332 @param Address The physical address of the access.
339 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
) (
340 IN EFI_PEI_SERVICES
**PeiServices
,
341 IN EFI_PEI_CPU_IO_PPI
*This
,
346 8-bit Memory write operations.
348 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
350 @param This Pointer to local data for the interface.
352 @param Address The physical address of the access.
354 @param Data The data to write.
361 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
) (
362 IN EFI_PEI_SERVICES
**PeiServices
,
363 IN EFI_PEI_CPU_IO_PPI
*This
,
369 16-bit Memory write operations.
371 @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.
375 @param Address The physical address of the access.
377 @param Data The data to write.
384 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
) (
385 IN EFI_PEI_SERVICES
**PeiServices
,
386 IN EFI_PEI_CPU_IO_PPI
*This
,
392 32-bit Memory write operations.
394 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
396 @param This Pointer to local data for the interface.
398 @param Address The physical address of the access.
400 @param Data The data to write.
407 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
) (
408 IN EFI_PEI_SERVICES
**PeiServices
,
409 IN EFI_PEI_CPU_IO_PPI
*This
,
415 64-bit Memory write operations.
417 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
419 @param This Pointer to local data for the interface.
421 @param Address The physical address of the access.
423 @param Data The data to write.
430 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
) (
431 IN EFI_PEI_SERVICES
**PeiServices
,
432 IN EFI_PEI_CPU_IO_PPI
*This
,
438 @par Ppi Description:
439 EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
440 The perspective of the services is that of the processor, not the bus or system.
443 Collection of memory-access services.
446 Collection of I/O-access services.
464 16-bit write service.
467 32-bit write service.
470 64-bit write service.
488 16-bit write service.
491 32-bit write service.
494 64-bit write service.
497 struct _EFI_PEI_CPU_IO_PPI
{
498 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
499 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
500 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
501 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
502 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
503 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
504 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
505 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
506 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
507 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
508 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
509 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
510 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
511 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
512 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
513 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
514 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
515 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
518 extern EFI_GUID gEfiPeiCpuIoPpiInServiceTableGuid
;