TianoCore EDK2 master
Loading...
Searching...
No Matches
PciCfg2.c File Reference
#include "PeiMain.h"

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI PeiDefaultPciCfg2Read (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultPciCfg2Write (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
 
EFI_STATUS EFIAPI PeiDefaultPciCfg2Modify (IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits)
 

Variables

EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi
 

Detailed Description

The default version of EFI_PEI_PCI_CFG2_PPI support published by PeiServices in PeiCore initialization phase.

EFI_PEI_PCI_CFG2_PPI is installed by the PEIM which supports a PCI root bridge. When PeiCore is started, the default version of EFI_PEI_PCI_CFG2_PPI will be assigned to PeiServices table.

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

Definition in file PciCfg2.c.

Function Documentation

◆ PeiDefaultPciCfg2Modify()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Modify ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN VOID SetBits,
IN VOID ClearBits 
)

This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space. If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. Type EFI_PEI_PCI_CFG_PPI_WIDTH is defined in Read().
AddressThe physical address of the access.
SetBitsPoints to value to bitwise-OR with the read configuration value. The size of the value is determined by Width.
ClearBitsPoints to the value to negate and bitwise-AND with the read configuration value. The size of the value is determined by Width.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 112 of file PciCfg2.c.

◆ PeiDefaultPciCfg2Read()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Read ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN OUT VOID Buffer 
)

Reads from a given location in the PCI configuration space.

If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. See EFI_PEI_PCI_CFG_PPI_WIDTH above.
AddressThe physical address of the access. The format of the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 47 of file PciCfg2.c.

◆ PeiDefaultPciCfg2Write()

EFI_STATUS EFIAPI PeiDefaultPciCfg2Write ( IN CONST EFI_PEI_SERVICES **  PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI This,
IN EFI_PEI_PCI_CFG_PPI_WIDTH  Width,
IN UINT64  Address,
IN OUT VOID Buffer 
)

Write to a given location in the PCI configuration space.

If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then return EFI_NOT_YET_AVAILABLE.

Parameters
PeiServicesAn indirect pointer to the PEI Services Table published by the PEI Foundation.
ThisPointer to local data for the interface.
WidthThe width of the access. Enumerated in bytes. See EFI_PEI_PCI_CFG_PPI_WIDTH above.
AddressThe physical address of the access. The format of the address is described by EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS.
BufferA pointer to the buffer of data.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_INVALID_PARAMETERThe invalid access width.
EFI_NOT_YET_AVAILABLEIf the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM.

Definition at line 78 of file PciCfg2.c.

Variable Documentation

◆ gPeiDefaultPciCfg2Ppi

EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi
Initial value:
= {
}
EFI_STATUS EFIAPI PeiDefaultPciCfg2Read(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
Definition: PciCfg2.c:47
EFI_STATUS EFIAPI PeiDefaultPciCfg2Modify(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits)
Definition: PciCfg2.c:112
EFI_STATUS EFIAPI PeiDefaultPciCfg2Write(IN CONST EFI_PEI_SERVICES **PeiServices, IN CONST EFI_PEI_PCI_CFG2_PPI *This, IN EFI_PEI_PCI_CFG_PPI_WIDTH Width, IN UINT64 Address, IN OUT VOID *Buffer)
Definition: PciCfg2.c:78

This default instance of EFI_PEI_PCI_CFG2_PPI install assigned to EFI_PEI_SERVICE.PciCfg when PeiCore's initialization.

Definition at line 20 of file PciCfg2.c.