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 introduced in PI Version 1.0.
19 #ifndef __PEI_CPUIO_PPI_H__
20 #define __PEI_CPUIO_PPI_H__
22 #include <Pi/PiPeiCis.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
54 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 CONST EFI_PEI_SERVICES
**PeiServices
,
69 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
70 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
77 /// *******************************************************
78 /// EFI_PEI_CPU_IO_PPI_ACCESS
79 /// *******************************************************
83 /// This service provides the various modalities of memory and I/O read.
85 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
87 /// This service provides the various modalities of memory and I/O write.
89 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
90 } EFI_PEI_CPU_IO_PPI_ACCESS
;
93 8-bit I/O read operations.
95 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
96 @param This Pointer to local data for the interface.
97 @param Address The physical address of the access.
99 @return An 8-bit value returned from the I/O space.
104 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
105 IN CONST EFI_PEI_SERVICES
**PeiServices
,
106 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
111 16-bit I/O read operations.
113 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
114 @param This Pointer to local data for the interface.
115 @param Address The physical address of the access.
117 @return A 16-bit value returned from the I/O space.
122 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
)(
123 IN CONST EFI_PEI_SERVICES
**PeiServices
,
124 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
129 32-bit I/O read operations.
131 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
132 @param This Pointer to local data for the interface.
133 @param Address The physical address of the access.
135 @return A 32-bit value returned from the I/O space.
140 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
)(
141 IN CONST EFI_PEI_SERVICES
**PeiServices
,
142 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
147 64-bit I/O read operations.
149 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
150 @param This Pointer to local data for the interface.
151 @param Address The physical address of the access.
153 @return A 64-bit value returned from the I/O space.
158 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
159 IN CONST EFI_PEI_SERVICES
**PeiServices
,
160 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
165 8-bit I/O write operations.
167 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
168 @param This Pointer to local data for the interface.
169 @param Address The physical address of the access.
170 @param Data The data to write.
175 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
176 IN CONST EFI_PEI_SERVICES
**PeiServices
,
177 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
183 16-bit I/O write operations.
185 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
186 @param This Pointer to local data for the interface.
187 @param Address The physical address of the access.
188 @param Data The data to write.
193 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
194 IN CONST EFI_PEI_SERVICES
**PeiServices
,
195 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
201 32-bit I/O write operations.
203 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
204 @param This Pointer to local data for the interface.
205 @param Address The physical address of the access.
206 @param Data The data to write.
211 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
212 IN CONST EFI_PEI_SERVICES
**PeiServices
,
213 IN CONST 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.
229 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
230 IN CONST EFI_PEI_SERVICES
**PeiServices
,
231 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
237 8-bit memory read operations.
239 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
240 @param This Pointer to local data for the interface.
241 @param Address The physical address of the access.
243 @return An 8-bit value returned from the memory space.
248 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
249 IN CONST EFI_PEI_SERVICES
**PeiServices
,
250 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
255 16-bit memory read operations.
257 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
258 @param This Pointer to local data for the interface.
259 @param Address The physical address of the access.
261 @return A 16-bit value returned from the memory space.
266 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
)(
267 IN CONST EFI_PEI_SERVICES
**PeiServices
,
268 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
273 32-bit memory read operations.
275 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
276 @param This Pointer to local data for the interface.
277 @param Address The physical address of the access.
279 @return A 32-bit value returned from the memory space.
284 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
285 IN CONST EFI_PEI_SERVICES
**PeiServices
,
286 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
291 64-bit memory read operations.
293 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
294 @param This Pointer to local data for the interface.
295 @param Address The physical address of the access.
297 @return A 64-bit value returned from the memory space.
302 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
)(
303 IN CONST EFI_PEI_SERVICES
**PeiServices
,
304 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
309 8-bit memory write operations.
311 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
312 @param This Pointer to local data for the interface.
313 @param Address The physical address of the access.
314 @param Data The data to write.
319 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
)(
320 IN CONST EFI_PEI_SERVICES
**PeiServices
,
321 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
327 16-bit memory write operations.
329 @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.
331 @param Address The physical address of the access.
332 @param Data The data to write.
337 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
338 IN CONST EFI_PEI_SERVICES
**PeiServices
,
339 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
345 32-bit memory write operations.
347 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
348 @param This Pointer to local data for the interface.
349 @param Address The physical address of the access.
350 @param Data The data to write.
355 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
356 IN CONST EFI_PEI_SERVICES
**PeiServices
,
357 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
363 64-bit memory write operations.
365 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
366 @param This Pointer to local data for the interface.
367 @param Address The physical address of the access.
368 @param Data The data to write.
373 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
374 IN CONST EFI_PEI_SERVICES
**PeiServices
,
375 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
381 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
382 /// The perspective of the services is that of the processor, not the bus or system.
384 struct _EFI_PEI_CPU_IO_PPI
{
385 EFI_PEI_CPU_IO_PPI_ACCESS Mem
; ///< Collection of memory-access services.
386 EFI_PEI_CPU_IO_PPI_ACCESS Io
; ///< Collection of I/O-access services.
388 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
389 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
390 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
391 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
393 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
394 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
395 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
396 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
398 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
399 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
400 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
401 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
403 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
404 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
405 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
406 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
409 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;