2 This PPI provides a set of memory- and I/O-based services.
3 The perspective of the services is that of the processor, not the bus or system.
5 Copyright (c) 2006 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
14 @par Revision Reference:
15 This PPI is defined in PI.
20 #ifndef __PEI_CPUIO_PPI_H__
21 #define __PEI_CPUIO_PPI_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
55 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 CONST EFI_PEI_SERVICES
**PeiServices
,
70 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
71 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
78 /// *******************************************************
79 /// EFI_PEI_CPU_IO_PPI_ACCESS
80 /// *******************************************************
84 /// This service provides the various modalities of memory and I/O read.
86 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
88 /// This service provides the various modalities of memory and I/O write.
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.
97 @param This Pointer to local data for the interface.
98 @param Address The physical address of the access.
100 @return An 8-bit value returned from the I/O space.
105 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
106 IN CONST EFI_PEI_SERVICES
**PeiServices
,
107 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
112 16-bit I/O read operations.
114 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
115 @param This Pointer to local data for the interface.
116 @param Address The physical address of the access.
118 @return A 16-bit value returned from the I/O space.
123 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
)(
124 IN CONST EFI_PEI_SERVICES
**PeiServices
,
125 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
130 32-bit I/O read operations.
132 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
133 @param This Pointer to local data for the interface.
134 @param Address The physical address of the access.
136 @return A 32-bit value returned from the I/O space.
141 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
)(
142 IN CONST EFI_PEI_SERVICES
**PeiServices
,
143 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
148 64-bit I/O read operations.
150 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
151 @param This Pointer to local data for the interface.
152 @param Address The physical address of the access.
154 @return A 64-bit value returned from the I/O space.
159 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
160 IN CONST EFI_PEI_SERVICES
**PeiServices
,
161 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
166 8-bit I/O write operations.
168 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
169 @param This Pointer to local data for the interface.
170 @param Address The physical address of the access.
171 @param Data The data to write.
176 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
177 IN CONST EFI_PEI_SERVICES
**PeiServices
,
178 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
184 16-bit I/O write operations.
186 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
187 @param This Pointer to local data for the interface.
188 @param Address The physical address of the access.
189 @param Data The data to write.
194 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
195 IN CONST EFI_PEI_SERVICES
**PeiServices
,
196 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
202 32-bit I/O write operations.
204 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
205 @param This Pointer to local data for the interface.
206 @param Address The physical address of the access.
207 @param Data The data to write.
212 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
213 IN CONST EFI_PEI_SERVICES
**PeiServices
,
214 IN CONST 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.
230 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
231 IN CONST EFI_PEI_SERVICES
**PeiServices
,
232 IN CONST 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.
244 @return An 8-bit value returned from the memory space.
249 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
250 IN CONST EFI_PEI_SERVICES
**PeiServices
,
251 IN CONST 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.
262 @return A 16-bit value returned from the memory space.
267 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
)(
268 IN CONST EFI_PEI_SERVICES
**PeiServices
,
269 IN CONST 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.
280 @return A 32-bit value returned from the memory space.
285 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
286 IN CONST EFI_PEI_SERVICES
**PeiServices
,
287 IN CONST 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.
298 @return A 64-bit value returned from the memory space.
303 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
)(
304 IN CONST EFI_PEI_SERVICES
**PeiServices
,
305 IN CONST 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.
320 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
)(
321 IN CONST EFI_PEI_SERVICES
**PeiServices
,
322 IN CONST 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.
338 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
339 IN CONST EFI_PEI_SERVICES
**PeiServices
,
340 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
346 32-bit memory write operations.
348 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
349 @param This Pointer to local data for the interface.
350 @param Address The physical address of the access.
351 @param Data The data to write.
356 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
357 IN CONST EFI_PEI_SERVICES
**PeiServices
,
358 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
364 64-bit memory write operations.
366 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
367 @param This Pointer to local data for the interface.
368 @param Address The physical address of the access.
369 @param Data The data to write.
374 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
375 IN CONST EFI_PEI_SERVICES
**PeiServices
,
376 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
382 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
383 /// The perspective of the services is that of the processor, not the bus or system.
385 struct _EFI_PEI_CPU_IO_PPI
{
386 EFI_PEI_CPU_IO_PPI_ACCESS Mem
; ///< Collection of memory-access services.
387 EFI_PEI_CPU_IO_PPI_ACCESS Io
; ///< Collection of I/O-access services.
389 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
390 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
391 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
392 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
394 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
395 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
396 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
397 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
399 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
400 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
401 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
402 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
404 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
405 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
406 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
407 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
410 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;