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 #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 // *******************************************************
29 // EFI_PEI_CPU_IO_PPI_WIDTH
30 // *******************************************************
33 EfiPeiCpuIoWidthUint8
,
34 EfiPeiCpuIoWidthUint16
,
35 EfiPeiCpuIoWidthUint32
,
36 EfiPeiCpuIoWidthUint64
,
37 EfiPeiCpuIoWidthFifoUint8
,
38 EfiPeiCpuIoWidthFifoUint16
,
39 EfiPeiCpuIoWidthFifoUint32
,
40 EfiPeiCpuIoWidthFifoUint64
,
41 EfiPeiCpuIoWidthFillUint8
,
42 EfiPeiCpuIoWidthFillUint16
,
43 EfiPeiCpuIoWidthFillUint32
,
44 EfiPeiCpuIoWidthFillUint64
,
45 EfiPeiCpuIoWidthMaximum
46 } EFI_PEI_CPU_IO_PPI_WIDTH
;
49 Memory-based access services and I/O-based access services.
51 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
52 @param This Pointer to local data for the interface.
53 @param Width The width of the access. Enumerated in bytes.
54 @param Address The physical address of the access.
55 @param Count The number of accesses to perform.
56 @param Buffer A pointer to the buffer of data.
58 @retval EFI_SUCCESS The function completed successfully.
59 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
64 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
) (
65 IN EFI_PEI_SERVICES
**PeiServices
,
66 IN EFI_PEI_CPU_IO_PPI
*This
,
67 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
74 // *******************************************************
75 // EFI_PEI_CPU_IO_PPI_ACCESS
76 // *******************************************************
79 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
80 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
81 } EFI_PEI_CPU_IO_PPI_ACCESS
;
84 8-bit I/O read operations.
86 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
87 @param This Pointer to local data for the interface.
88 @param Address The physical address of the access.
95 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
) (
96 IN EFI_PEI_SERVICES
**PeiServices
,
97 IN EFI_PEI_CPU_IO_PPI
*This
,
102 16-bit I/O read operations.
104 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
105 @param This Pointer to local data for the interface.
106 @param Address The physical address of the access.
113 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
) (
114 IN EFI_PEI_SERVICES
**PeiServices
,
115 IN EFI_PEI_CPU_IO_PPI
*This
,
120 32-bit I/O read operations.
122 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
123 @param This Pointer to local data for the interface.
124 @param Address The physical address of the access.
131 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
) (
132 IN EFI_PEI_SERVICES
**PeiServices
,
133 IN EFI_PEI_CPU_IO_PPI
*This
,
138 64-bit I/O read operations.
140 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
141 @param This Pointer to local data for the interface.
142 @param Address The physical address of the access.
149 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
) (
150 IN EFI_PEI_SERVICES
**PeiServices
,
151 IN EFI_PEI_CPU_IO_PPI
*This
,
156 8-bit I/O write operations.
158 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
159 @param This Pointer to local data for the interface.
160 @param Address The physical address of the access.
161 @param Data The data to write.
168 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
) (
169 IN EFI_PEI_SERVICES
**PeiServices
,
170 IN EFI_PEI_CPU_IO_PPI
*This
,
176 16-bit I/O write operations.
178 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
179 @param This Pointer to local data for the interface.
180 @param Address The physical address of the access.
181 @param Data The data to write.
188 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
) (
189 IN EFI_PEI_SERVICES
**PeiServices
,
190 IN EFI_PEI_CPU_IO_PPI
*This
,
196 32-bit I/O write operations.
198 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
199 @param This Pointer to local data for the interface.
200 @param Address The physical address of the access.
201 @param Data The data to write.
208 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
) (
209 IN EFI_PEI_SERVICES
**PeiServices
,
210 IN EFI_PEI_CPU_IO_PPI
*This
,
216 64-bit I/O write operations.
218 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
219 @param This Pointer to local data for the interface.
220 @param Address The physical address of the access.
221 @param Data The data to write.
228 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
) (
229 IN EFI_PEI_SERVICES
**PeiServices
,
230 IN EFI_PEI_CPU_IO_PPI
*This
,
236 8-bit Memory read operations.
238 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
239 @param This Pointer to local data for the interface.
240 @param Address The physical address of the access.
247 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
) (
248 IN EFI_PEI_SERVICES
**PeiServices
,
249 IN EFI_PEI_CPU_IO_PPI
*This
,
254 16-bit Memory read operations.
256 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
257 @param This Pointer to local data for the interface.
258 @param Address The physical address of the access.
265 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
) (
266 IN EFI_PEI_SERVICES
**PeiServices
,
267 IN EFI_PEI_CPU_IO_PPI
*This
,
272 32-bit Memory read operations.
274 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
275 @param This Pointer to local data for the interface.
276 @param Address The physical address of the access.
283 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
) (
284 IN EFI_PEI_SERVICES
**PeiServices
,
285 IN EFI_PEI_CPU_IO_PPI
*This
,
290 64-bit Memory read operations.
292 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
293 @param This Pointer to local data for the interface.
294 @param Address The physical address of the access.
301 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
) (
302 IN EFI_PEI_SERVICES
**PeiServices
,
303 IN EFI_PEI_CPU_IO_PPI
*This
,
308 8-bit Memory write operations.
310 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
311 @param This Pointer to local data for the interface.
312 @param Address The physical address of the access.
313 @param Data The data to write.
320 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
) (
321 IN EFI_PEI_SERVICES
**PeiServices
,
322 IN EFI_PEI_CPU_IO_PPI
*This
,
328 16-bit Memory write operations.
330 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
331 @param This Pointer to local data for the interface.
332 @param Address The physical address of the access.
333 @param Data The data to write.
340 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
) (
341 IN EFI_PEI_SERVICES
**PeiServices
,
342 IN EFI_PEI_CPU_IO_PPI
*This
,
348 32-bit Memory write operations.
350 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
351 @param This Pointer to local data for the interface.
352 @param Address The physical address of the access.
353 @param Data The data to write.
360 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
) (
361 IN EFI_PEI_SERVICES
**PeiServices
,
362 IN EFI_PEI_CPU_IO_PPI
*This
,
368 64-bit Memory write operations.
370 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
371 @param This Pointer to local data for the interface.
372 @param Address The physical address of the access.
373 @param Data The data to write.
380 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
) (
381 IN EFI_PEI_SERVICES
**PeiServices
,
382 IN EFI_PEI_CPU_IO_PPI
*This
,
388 @par Ppi Description:
389 EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
390 The perspective of the services is that of the processor, not the bus or system.
393 Collection of memory-access services.
396 Collection of I/O-access services.
414 16-bit write service.
417 32-bit write service.
420 64-bit write service.
438 16-bit write service.
441 32-bit write service.
444 64-bit write service.
447 struct _EFI_PEI_CPU_IO_PPI
{
448 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
449 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
450 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
451 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
452 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
453 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
454 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
455 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
456 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
457 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
458 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
459 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
460 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
461 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
462 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
463 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
464 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
465 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
468 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;