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 - 2018, Intel Corporation. All rights reserved.<BR>
6 SPDX-License-Identifier: BSD-2-Clause-Patent
8 @par Revision Reference:
9 This PPI is introduced in PI Version 1.0.
13 #ifndef __PEI_CPUIO_PPI_H__
14 #define __PEI_CPUIO_PPI_H__
16 #define EFI_PEI_CPU_IO_PPI_INSTALLED_GUID \
17 { 0xe6af1f7b, 0xfc3f, 0x46da, {0xa8, 0x28, 0xa3, 0xb4, 0x57, 0xa4, 0x42, 0x82 } }
19 typedef struct _EFI_PEI_CPU_IO_PPI EFI_PEI_CPU_IO_PPI
;
22 /// EFI_PEI_CPU_IO_PPI_WIDTH.
25 EfiPeiCpuIoWidthUint8
,
26 EfiPeiCpuIoWidthUint16
,
27 EfiPeiCpuIoWidthUint32
,
28 EfiPeiCpuIoWidthUint64
,
29 EfiPeiCpuIoWidthFifoUint8
,
30 EfiPeiCpuIoWidthFifoUint16
,
31 EfiPeiCpuIoWidthFifoUint32
,
32 EfiPeiCpuIoWidthFifoUint64
,
33 EfiPeiCpuIoWidthFillUint8
,
34 EfiPeiCpuIoWidthFillUint16
,
35 EfiPeiCpuIoWidthFillUint32
,
36 EfiPeiCpuIoWidthFillUint64
,
37 EfiPeiCpuIoWidthMaximum
38 } EFI_PEI_CPU_IO_PPI_WIDTH
;
41 Memory-based access services and I/O-based access services.
43 @param[in] PeiServices An indirect pointer to the PEI Services Table
44 published by the PEI Foundation.
45 @param[in] This The pointer to local data for the interface.
46 @param[in] Width The width of the access. Enumerated in bytes.
47 @param[in] Address The physical address of the access.
48 @param[in] Count The number of accesses to perform.
49 @param[in, out] Buffer A pointer to the buffer of data.
51 @retval EFI_SUCCESS The function completed successfully.
52 @retval EFI_NOT_YET_AVAILABLE The service has not been installed.
57 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_MEM
)(
58 IN CONST EFI_PEI_SERVICES
**PeiServices
,
59 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
60 IN EFI_PEI_CPU_IO_PPI_WIDTH Width
,
67 /// EFI_PEI_CPU_IO_PPI_ACCESS
71 /// This service provides the various modalities of memory and I/O read.
73 EFI_PEI_CPU_IO_PPI_IO_MEM Read
;
75 /// This service provides the various modalities of memory and I/O write.
77 EFI_PEI_CPU_IO_PPI_IO_MEM Write
;
78 } EFI_PEI_CPU_IO_PPI_ACCESS
;
81 8-bit I/O read operations.
83 @param[in] PeiServices An indirect pointer to the PEI Services Table published
84 by the PEI Foundation.
85 @param[in] This The pointer to local data for the interface.
86 @param[in] Address The physical address of the access.
88 @return An 8-bit value returned from the I/O space.
93 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ8
)(
94 IN CONST EFI_PEI_SERVICES
**PeiServices
,
95 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
100 16-bit I/O read operations.
102 @param[in] PeiServices An indirect pointer to the PEI Services Table published
103 by the PEI Foundation.
104 @param[in] This The pointer to local data for the interface.
105 @param[in] Address The physical address of the access.
107 @return A 16-bit value returned from the I/O space.
112 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ16
)(
113 IN CONST EFI_PEI_SERVICES
**PeiServices
,
114 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
119 32-bit I/O read operations.
121 @param[in] PeiServices An indirect pointer to the PEI Services Table published
122 by the PEI Foundation.
123 @param[in] This The pointer to local data for the interface.
124 @param[in] Address The physical address of the access.
126 @return A 32-bit value returned from the I/O space.
131 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ32
)(
132 IN CONST EFI_PEI_SERVICES
**PeiServices
,
133 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
138 64-bit I/O read operations.
140 @param[in] PeiServices An indirect pointer to the PEI Services Table published
141 by the PEI Foundation.
142 @param[in] This The pointer to local data for the interface.
143 @param[in] Address The physical address of the access.
145 @return A 64-bit value returned from the I/O space.
150 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_READ64
)(
151 IN CONST EFI_PEI_SERVICES
**PeiServices
,
152 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
157 8-bit I/O write operations.
159 @param[in] PeiServices An indirect pointer to the PEI Services Table published
160 by the PEI Foundation.
161 @param[in] This The pointer to local data for the interface.
162 @param[in] Address The physical address of the access.
163 @param[in] Data The data to write.
168 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE8
)(
169 IN CONST EFI_PEI_SERVICES
**PeiServices
,
170 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
176 16-bit I/O write operations.
178 @param[in] PeiServices An indirect pointer to the PEI Services Table published
179 by the PEI Foundation.
180 @param[in] This The pointer to local data for the interface.
181 @param[in] Address The physical address of the access.
182 @param[in] Data The data to write.
187 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE16
)(
188 IN CONST EFI_PEI_SERVICES
**PeiServices
,
189 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
195 32-bit I/O write operations.
197 @param[in] PeiServices An indirect pointer to the PEI Services Table published
198 by the PEI Foundation.
199 @param[in] This The pointer to local data for the interface.
200 @param[in] Address The physical address of the access.
201 @param[in] Data The data to write.
206 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE32
)(
207 IN CONST EFI_PEI_SERVICES
**PeiServices
,
208 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
214 64-bit I/O write operations.
216 @param[in] PeiServices An indirect pointer to the PEI Services Table published
217 by the PEI Foundation.
218 @param[in] This The pointer to local data for the interface.
219 @param[in] Address The physical address of the access.
220 @param[in] Data The data to write.
225 (EFIAPI
*EFI_PEI_CPU_IO_PPI_IO_WRITE64
)(
226 IN CONST EFI_PEI_SERVICES
**PeiServices
,
227 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
233 8-bit memory read operations.
235 @param[in] PeiServices An indirect pointer to the PEI Services Table published
236 by the PEI Foundation.
237 @param[in] This The pointer to local data for the interface.
238 @param[in] Address The physical address of the access.
240 @return An 8-bit value returned from the memory space.
245 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ8
)(
246 IN CONST EFI_PEI_SERVICES
**PeiServices
,
247 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
252 16-bit memory read operations.
254 @param[in] PeiServices An indirect pointer to the PEI Services Table published
255 by the PEI Foundation.
256 @param[in] This The pointer to local data for the interface.
257 @param[in] 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[in] PeiServices An indirect pointer to the PEI Services Table published
274 by the PEI Foundation.
275 @param[in] This The pointer to local data for the interface.
276 @param[in] Address The physical address of the access.
278 @return A 32-bit value returned from the memory space.
283 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_READ32
)(
284 IN CONST EFI_PEI_SERVICES
**PeiServices
,
285 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
290 64-bit memory read operations.
292 @param[in] PeiServices An indirect pointer to the PEI Services Table published
293 by the PEI Foundation.
294 @param[in] This The pointer to local data for the interface.
295 @param[in] 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[in] PeiServices An indirect pointer to the PEI Services Table published
312 by the PEI Foundation.
313 @param[in] This The pointer to local data for the interface.
314 @param[in] Address The physical address of the access.
315 @param[in] 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[in] PeiServices An indirect pointer to the PEI Services Table published
331 by the PEI Foundation.
332 @param[in] This The pointer to local data for the interface.
333 @param[in] Address The physical address of the access.
334 @param[in] Data The data to write.
339 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE16
)(
340 IN CONST EFI_PEI_SERVICES
**PeiServices
,
341 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
347 32-bit memory write operations.
349 @param[in] PeiServices An indirect pointer to the PEI Services Table published
350 by the PEI Foundation.
351 @param[in] This The pointer to local data for the interface.
352 @param[in] Address The physical address of the access.
353 @param[in] Data The data to write.
358 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE32
)(
359 IN CONST EFI_PEI_SERVICES
**PeiServices
,
360 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
366 64-bit memory write operations.
368 @param[in] PeiServices An indirect pointer to the PEI Services Table published
369 by the PEI Foundation.
370 @param[in] This The pointer to local data for the interface.
371 @param[in] Address The physical address of the access.
372 @param[in] Data The data to write.
377 (EFIAPI
*EFI_PEI_CPU_IO_PPI_MEM_WRITE64
)(
378 IN CONST EFI_PEI_SERVICES
**PeiServices
,
379 IN CONST EFI_PEI_CPU_IO_PPI
*This
,
385 /// EFI_PEI_CPU_IO_PPI provides a set of memory and I/O-based services.
386 /// The perspective of the services is that of the processor, not that of the
389 struct _EFI_PEI_CPU_IO_PPI
{
391 /// Collection of memory-access services.
393 EFI_PEI_CPU_IO_PPI_ACCESS Mem
;
395 /// Collection of I/O-access services.
397 EFI_PEI_CPU_IO_PPI_ACCESS Io
;
399 EFI_PEI_CPU_IO_PPI_IO_READ8 IoRead8
;
400 EFI_PEI_CPU_IO_PPI_IO_READ16 IoRead16
;
401 EFI_PEI_CPU_IO_PPI_IO_READ32 IoRead32
;
402 EFI_PEI_CPU_IO_PPI_IO_READ64 IoRead64
;
404 EFI_PEI_CPU_IO_PPI_IO_WRITE8 IoWrite8
;
405 EFI_PEI_CPU_IO_PPI_IO_WRITE16 IoWrite16
;
406 EFI_PEI_CPU_IO_PPI_IO_WRITE32 IoWrite32
;
407 EFI_PEI_CPU_IO_PPI_IO_WRITE64 IoWrite64
;
409 EFI_PEI_CPU_IO_PPI_MEM_READ8 MemRead8
;
410 EFI_PEI_CPU_IO_PPI_MEM_READ16 MemRead16
;
411 EFI_PEI_CPU_IO_PPI_MEM_READ32 MemRead32
;
412 EFI_PEI_CPU_IO_PPI_MEM_READ64 MemRead64
;
414 EFI_PEI_CPU_IO_PPI_MEM_WRITE8 MemWrite8
;
415 EFI_PEI_CPU_IO_PPI_MEM_WRITE16 MemWrite16
;
416 EFI_PEI_CPU_IO_PPI_MEM_WRITE32 MemWrite32
;
417 EFI_PEI_CPU_IO_PPI_MEM_WRITE64 MemWrite64
;
420 extern EFI_GUID gEfiPeiCpuIoPpiInstalledGuid
;