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 - 2009, 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 #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
52 published by the PEI Foundation.
53 @param This Pointer to local data for the interface.
54 @param Width The width of the access. Enumerated in bytes.
55 @param Address The physical address of the access.
56 @param Count The number of accesses to perform.
57 @param Buffer A pointer to the buffer of data.
59 @retval EFI_SUCCESS The function completed successfully.
60 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
65 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
)(
66 IN CONST EFI_PEI_SERVICES
**PeiServices
,
67 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
68 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
75 /// *******************************************************
76 /// EFI_PEI_CPU_IO_PPI_ACCESS
77 /// *******************************************************
81 /// This service provides the various modalities of memory and I/O read.
83 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
85 /// This service provides the various modalities of memory and I/O write.
87 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
88 } EFI_PEI_CPU_IO_PPI_ACCESS
;
91 8-bit I/O read operations.
93 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
94 @param This Pointer to local data for the interface.
95 @param Address The physical address of the access.
97 @return An 8-bit value returned from the I/O space.
102 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
103 IN CONST EFI_PEI_SERVICES
**PeiServices
,
104 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
109 16-bit I/O read operations.
111 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
112 @param This Pointer to local data for the interface.
113 @param Address The physical address of the access.
115 @return A 16-bit value returned from the I/O space.
120 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
)(
121 IN CONST EFI_PEI_SERVICES
**PeiServices
,
122 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
127 32-bit I/O read operations.
129 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
130 @param This Pointer to local data for the interface.
131 @param Address The physical address of the access.
133 @return A 32-bit value returned from the I/O space.
138 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
)(
139 IN CONST EFI_PEI_SERVICES
**PeiServices
,
140 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
145 64-bit I/O read operations.
147 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
148 @param This Pointer to local data for the interface.
149 @param Address The physical address of the access.
151 @return A 64-bit value returned from the I/O space.
156 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
157 IN CONST EFI_PEI_SERVICES
**PeiServices
,
158 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
163 8-bit I/O write operations.
165 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
166 @param This Pointer to local data for the interface.
167 @param Address The physical address of the access.
168 @param Data The data to write.
173 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
174 IN CONST EFI_PEI_SERVICES
**PeiServices
,
175 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
181 16-bit I/O write operations.
183 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
184 @param This Pointer to local data for the interface.
185 @param Address The physical address of the access.
186 @param Data The data to write.
191 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
192 IN CONST EFI_PEI_SERVICES
**PeiServices
,
193 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
199 32-bit I/O write operations.
201 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
202 @param This Pointer to local data for the interface.
203 @param Address The physical address of the access.
204 @param Data The data to write.
209 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
210 IN CONST EFI_PEI_SERVICES
**PeiServices
,
211 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
217 64-bit I/O write operations.
219 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
220 @param This Pointer to local data for the interface.
221 @param Address The physical address of the access.
222 @param Data The data to write.
227 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
228 IN CONST EFI_PEI_SERVICES
**PeiServices
,
229 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
235 8-bit memory read operations.
237 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
238 @param This Pointer to local data for the interface.
239 @param Address The physical address of the access.
241 @return An 8-bit value returned from the memory space.
246 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
247 IN CONST EFI_PEI_SERVICES
**PeiServices
,
248 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
253 16-bit memory read operations.
255 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
256 @param This Pointer to local data for the interface.
257 @param Address The physical address of the access.
259 @return A 16-bit value returned from the memory space.
264 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
)(
265 IN CONST EFI_PEI_SERVICES
**PeiServices
,
266 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
271 32-bit memory read operations.
273 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
274 @param This Pointer to local data for the interface.
275 @param Address The physical address of the access.
277 @return A 32-bit value returned from the memory space.
282 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
283 IN CONST EFI_PEI_SERVICES
**PeiServices
,
284 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
289 64-bit memory read operations.
291 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
292 @param This Pointer to local data for the interface.
293 @param Address The physical address of the access.
295 @return A 64-bit value returned from the memory space.
300 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
)(
301 IN CONST EFI_PEI_SERVICES
**PeiServices
,
302 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
307 8-bit memory write operations.
309 @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.
311 @param Address The physical address of the access.
312 @param Data The data to write.
317 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
)(
318 IN CONST EFI_PEI_SERVICES
**PeiServices
,
319 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
325 16-bit memory write operations.
327 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
328 @param This Pointer to local data for the interface.
329 @param Address The physical address of the access.
330 @param Data The data to write.
335 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
336 IN CONST EFI_PEI_SERVICES
**PeiServices
,
337 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
343 32-bit memory write operations.
345 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
346 @param This Pointer to local data for the interface.
347 @param Address The physical address of the access.
348 @param Data The data to write.
353 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
354 IN CONST EFI_PEI_SERVICES
**PeiServices
,
355 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
361 64-bit memory write operations.
363 @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation.
364 @param This Pointer to local data for the interface.
365 @param Address The physical address of the access.
366 @param Data The data to write.
371 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
372 IN CONST EFI_PEI_SERVICES
**PeiServices
,
373 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
379 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
380 /// The perspective of the services is that of the processor, not the bus or system.
382 struct _EFI_PEI_CPU_IO_PPI
{
383 EFI_PEI_CPU_IO_PPI_ACCESS Mem
; ///< Collection of memory-access services.
384 EFI_PEI_CPU_IO_PPI_ACCESS Io
; ///< Collection of I/O-access services.
386 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
387 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
388 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
389 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
391 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
392 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
393 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
394 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
396 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
397 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
398 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
399 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
401 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
402 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
403 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
404 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
407 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;