TianoCore EDK2 master
CpuIoPei.h File Reference
#include <PiDxe.h>
#include <Ppi/CpuIo.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/IoLib.h>
#include <Library/PeiServicesLib.h>

Go to the source code of this file.

Macros

#define MAX_IO_PORT_ADDRESS   0xFFFF
 

Functions

EFI_STATUS EFIAPI CpuMemoryServiceRead (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
 
EFI_STATUS EFIAPI CpuMemoryServiceWrite (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
 
EFI_STATUS EFIAPI CpuIoServiceRead (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, OUT VOID *Buffer)
 
EFI_STATUS EFIAPI CpuIoServiceWrite (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN EFI_PEI_CPU_IO_PPI_WIDTH Width, IN UINT64 Address, IN UINTN Count, IN VOID *Buffer)
 
UINT8 EFIAPI CpuIoRead8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT16 EFIAPI CpuIoRead16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT32 EFIAPI CpuIoRead32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT64 EFIAPI CpuIoRead64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
VOID EFIAPI CpuIoWrite8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT8 Data)
 
VOID EFIAPI CpuIoWrite16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT16 Data)
 
VOID EFIAPI CpuIoWrite32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT32 Data)
 
VOID EFIAPI CpuIoWrite64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT64 Data)
 
UINT8 EFIAPI CpuMemRead8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT16 EFIAPI CpuMemRead16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT32 EFIAPI CpuMemRead32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
UINT64 EFIAPI CpuMemRead64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address)
 
VOID EFIAPI CpuMemWrite8 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT8 Data)
 
VOID EFIAPI CpuMemWrite16 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT16 Data)
 
VOID EFIAPI CpuMemWrite32 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT32 Data)
 
VOID EFIAPI CpuMemWrite64 (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address, IN UINT64 Data)
 

Detailed Description

Internal include file for the CPU I/O PPI.

Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file CpuIoPei.h.

Macro Definition Documentation

◆ MAX_IO_PORT_ADDRESS

#define MAX_IO_PORT_ADDRESS   0xFFFF

Definition at line 21 of file CpuIoPei.h.

Function Documentation

◆ CpuIoRead16()

UINT16 EFIAPI CpuIoRead16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

16-bit I/O read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 16-bit value returned from the I/O space.

Definition at line 555 of file CpuIoPei.c.

◆ CpuIoRead32()

UINT32 EFIAPI CpuIoRead32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

32-bit I/O read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 32-bit value returned from the I/O space.

Definition at line 577 of file CpuIoPei.c.

◆ CpuIoRead64()

UINT64 EFIAPI CpuIoRead64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

64-bit I/O read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 64-bit value returned from the I/O space.

Definition at line 599 of file CpuIoPei.c.

◆ CpuIoRead8()

UINT8 EFIAPI CpuIoRead8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

8-bit I/O read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
An 8-bit value returned from the I/O space.

Definition at line 533 of file CpuIoPei.c.

◆ CpuIoServiceRead()

EFI_STATUS EFIAPI CpuIoServiceRead ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
OUT VOID Buffer 
)

Reads I/O registers.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]WidthThe width of the access. Enumerated in bytes.
[in]AddressThe physical address of the access.
[in]CountThe number of accesses to perform.
[out]BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system.
EFI_INVALID_PARAMETERBuffer is NULL.
EFI_UNSUPPORTEDThe address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 350 of file CpuIoPei.c.

◆ CpuIoServiceWrite()

EFI_STATUS EFIAPI CpuIoServiceWrite ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN VOID Buffer 
)

Write I/O registers.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]WidthThe width of the access. Enumerated in bytes.
[in]AddressThe physical address of the access.
[in]CountThe number of accesses to perform.
[in]BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system.
EFI_INVALID_PARAMETERBuffer is NULL.
EFI_UNSUPPORTEDThe address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 444 of file CpuIoPei.c.

◆ CpuIoWrite16()

VOID EFIAPI CpuIoWrite16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT16  Data 
)

16-bit I/O write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 642 of file CpuIoPei.c.

◆ CpuIoWrite32()

VOID EFIAPI CpuIoWrite32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT32  Data 
)

32-bit I/O write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 664 of file CpuIoPei.c.

◆ CpuIoWrite64()

VOID EFIAPI CpuIoWrite64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT64  Data 
)

64-bit I/O write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 686 of file CpuIoPei.c.

◆ CpuIoWrite8()

VOID EFIAPI CpuIoWrite8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT8  Data 
)

8-bit I/O write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 620 of file CpuIoPei.c.

◆ CpuMemoryServiceRead()

EFI_STATUS EFIAPI CpuMemoryServiceRead ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
OUT VOID Buffer 
)

Reads memory-mapped registers.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]WidthThe width of the access. Enumerated in bytes.
[in]AddressThe physical address of the access.
[in]CountThe number of accesses to perform.
[out]BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system.
EFI_INVALID_PARAMETERBuffer is NULL.
EFI_UNSUPPORTEDThe address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 200 of file CpuIoPei.c.

◆ CpuMemoryServiceWrite()

EFI_STATUS EFIAPI CpuMemoryServiceWrite ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN EFI_PEI_CPU_IO_PPI_WIDTH  Width,
IN UINT64  Address,
IN UINTN  Count,
IN VOID Buffer 
)

Writes memory-mapped registers.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]WidthThe width of the access. Enumerated in bytes.
[in]AddressThe physical address of the access.
[in]CountThe number of accesses to perform.
[in]BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERWidth is invalid for this EFI system.
EFI_INVALID_PARAMETERBuffer is NULL.
EFI_UNSUPPORTEDThe address range specified by Address, Width, and Count is not valid for this EFI system.

Definition at line 275 of file CpuIoPei.c.

◆ CpuMemRead16()

UINT16 EFIAPI CpuMemRead16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

16-bit memory read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 16-bit value returned from the memory space.

Definition at line 731 of file CpuIoPei.c.

◆ CpuMemRead32()

UINT32 EFIAPI CpuMemRead32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

32-bit memory read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 32-bit value returned from the memory space.

Definition at line 753 of file CpuIoPei.c.

◆ CpuMemRead64()

UINT64 EFIAPI CpuMemRead64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

64-bit memory read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
A 64-bit value returned from the memory space.

Definition at line 775 of file CpuIoPei.c.

◆ CpuMemRead8()

UINT8 EFIAPI CpuMemRead8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address 
)

8-bit memory read operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
Returns
An 8-bit value returned from the memory space.

Definition at line 709 of file CpuIoPei.c.

◆ CpuMemWrite16()

VOID EFIAPI CpuMemWrite16 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT16  Data 
)

16-bit memory write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 818 of file CpuIoPei.c.

◆ CpuMemWrite32()

VOID EFIAPI CpuMemWrite32 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT32  Data 
)

32-bit memory write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 840 of file CpuIoPei.c.

◆ CpuMemWrite64()

VOID EFIAPI CpuMemWrite64 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT64  Data 
)

64-bit memory write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 862 of file CpuIoPei.c.

◆ CpuMemWrite8()

VOID EFIAPI CpuMemWrite8 ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_CPU_IO_PPI This,
IN UINT64  Address,
IN UINT8  Data 
)

8-bit memory write operations.

Parameters
[in]PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
[in]ThisPointer to local data for the interface.
[in]AddressThe physical address of the access.
[in]DataThe data to write.

Definition at line 796 of file CpuIoPei.c.