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 - 2010, 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[in] PeiServices An indirect pointer to the PEI Services Table
52 published by the PEI Foundation.
53 @param[in] This Pointer to local data for the interface.
54 @param[in] Width The width of the access. Enumerated in bytes.
55 @param[in] Address The physical address of the access.
56 @param[in] Count The number of accesses to perform.
57 @param[out] 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[in] PeiServices An indirect pointer to the PEI Services Table published
94 by the PEI Foundation.
95 @param[in] This Pointer to local data for the interface.
96 @param[in] Address The physical address of the access.
98 @return An 8-bit value returned from the I/O space.
103 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
104 IN CONST EFI_PEI_SERVICES
**PeiServices
,
105 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
110 16-bit I/O read operations.
112 @param[in] PeiServices An indirect pointer to the PEI Services Table published
113 by the PEI Foundation.
114 @param[in] This Pointer to local data for the interface.
115 @param[in] 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[in] PeiServices An indirect pointer to the PEI Services Table published
132 by the PEI Foundation.
133 @param[in] This Pointer to local data for the interface.
134 @param[in] 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[in] PeiServices An indirect pointer to the PEI Services Table published
151 by the PEI Foundation.
152 @param[in] This Pointer to local data for the interface.
153 @param[in] Address The physical address of the access.
155 @return A 64-bit value returned from the I/O space.
160 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
161 IN CONST EFI_PEI_SERVICES
**PeiServices
,
162 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
167 8-bit I/O write operations.
169 @param[in] PeiServices An indirect pointer to the PEI Services Table published
170 by the PEI Foundation.
171 @param[in] This Pointer to local data for the interface.
172 @param[in] Address The physical address of the access.
173 @param[in] Data The data to write.
178 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
179 IN CONST EFI_PEI_SERVICES
**PeiServices
,
180 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
186 16-bit I/O write operations.
188 @param[in] PeiServices An indirect pointer to the PEI Services Table published
189 by the PEI Foundation.
190 @param[in] This Pointer to local data for the interface.
191 @param[in] Address The physical address of the access.
192 @param[in] Data The data to write.
197 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
198 IN CONST EFI_PEI_SERVICES
**PeiServices
,
199 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
205 32-bit I/O write operations.
207 @param[in] PeiServices An indirect pointer to the PEI Services Table published
208 by the PEI Foundation.
209 @param[in] This Pointer to local data for the interface.
210 @param[in] Address The physical address of the access.
211 @param[in] Data The data to write.
216 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
217 IN CONST EFI_PEI_SERVICES
**PeiServices
,
218 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
224 64-bit I/O write operations.
226 @param[in] PeiServices An indirect pointer to the PEI Services Table published
227 by the PEI Foundation.
228 @param[in] This Pointer to local data for the interface.
229 @param[in] Address The physical address of the access.
230 @param[in] Data The data to write.
235 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
236 IN CONST EFI_PEI_SERVICES
**PeiServices
,
237 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
243 8-bit memory read operations.
245 @param[in] PeiServices An indirect pointer to the PEI Services Table published
246 by the PEI Foundation.
247 @param[in] This Pointer to local data for the interface.
248 @param[in] Address The physical address of the access.
250 @return An 8-bit value returned from the memory space.
255 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
256 IN CONST EFI_PEI_SERVICES
**PeiServices
,
257 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
262 16-bit memory read operations.
264 @param[in] PeiServices An indirect pointer to the PEI Services Table published
265 by the PEI Foundation.
266 @param[in] This Pointer to local data for the interface.
267 @param[in] Address The physical address of the access.
269 @return A 16-bit value returned from the memory space.
274 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ16
)(
275 IN CONST EFI_PEI_SERVICES
**PeiServices
,
276 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
281 32-bit memory read operations.
283 @param[in] PeiServices An indirect pointer to the PEI Services Table published
284 by the PEI Foundation.
285 @param[in] This Pointer to local data for the interface.
286 @param[in] Address The physical address of the access.
288 @return A 32-bit value returned from the memory space.
293 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
294 IN CONST EFI_PEI_SERVICES
**PeiServices
,
295 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
300 64-bit memory read operations.
302 @param[in] PeiServices An indirect pointer to the PEI Services Table published
303 by the PEI Foundation.
304 @param[in] This Pointer to local data for the interface.
305 @param[in] Address The physical address of the access.
307 @return A 64-bit value returned from the memory space.
312 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ64
)(
313 IN CONST EFI_PEI_SERVICES
**PeiServices
,
314 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
319 8-bit memory write operations.
321 @param[in] PeiServices An indirect pointer to the PEI Services Table published
322 by the PEI Foundation.
323 @param[in] This Pointer to local data for the interface.
324 @param[in] Address The physical address of the access.
325 @param[in] Data The data to write.
330 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE8
)(
331 IN CONST EFI_PEI_SERVICES
**PeiServices
,
332 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
338 16-bit memory write operations.
340 @param[in] PeiServices An indirect pointer to the PEI Services Table published
341 by the PEI Foundation.
342 @param[in] This Pointer to local data for the interface.
343 @param[in] Address The physical address of the access.
344 @param[in] Data The data to write.
349 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
350 IN CONST EFI_PEI_SERVICES
**PeiServices
,
351 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
357 32-bit memory write operations.
359 @param[in] PeiServices An indirect pointer to the PEI Services Table published
360 by the PEI Foundation.
361 @param[in] This Pointer to local data for the interface.
362 @param[in] Address The physical address of the access.
363 @param[in] Data The data to write.
368 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
369 IN CONST EFI_PEI_SERVICES
**PeiServices
,
370 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
376 64-bit memory write operations.
378 @param[in] PeiServices An indirect pointer to the PEI Services Table published
379 by the PEI Foundation.
380 @param[in] This Pointer to local data for the interface.
381 @param[in] Address The physical address of the access.
382 @param[in] Data The data to write.
387 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
388 IN CONST EFI_PEI_SERVICES
**PeiServices
,
389 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
395 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
396 /// The perspective of the services is that of the processor, not the bus or system.
398 struct _EFI_PEI_CPU_IO_PPI
{
400 /// Collection of memory-access services.
402 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
404 /// Collection of I/O-access services.
406 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
408 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
409 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
410 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
411 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
413 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
414 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
415 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
416 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
418 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
419 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
420 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
421 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
423 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
424 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
425 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
426 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
429 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;