MdePkg[all]  1.08
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
PciCfg2.h File Reference

Data Structures

struct  EFI_PEI_PCI_CFG_PPI_PCI_ADDRESS
 
struct  _EFI_PEI_PCI_CFG2_PPI
 

Macros

#define EFI_PEI_PCI_CFG2_PPI_GUID   { 0x57a449a, 0x1fdc, 0x4c06, { 0xbf, 0xc9, 0xf5, 0x3f, 0x6a, 0x99, 0xbb, 0x92 } }
 
#define EFI_PEI_PCI_CFG_ADDRESS(bus, dev, func, reg)
 

Typedefs

typedef struct
_EFI_PEI_PCI_CFG2_PPI 
EFI_PEI_PCI_CFG2_PPI
 
typedef EFI_STATUS(EFIAPIEFI_PEI_PCI_CFG2_PPI_IO )(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)
 
typedef EFI_STATUS(EFIAPIEFI_PEI_PCI_CFG2_PPI_RW )(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)
 

Enumerations

enum  EFI_PEI_PCI_CFG_PPI_WIDTH {
  EfiPeiPciCfgWidthUint8 = 0, EfiPeiPciCfgWidthUint16 = 1, EfiPeiPciCfgWidthUint32 = 2, EfiPeiPciCfgWidthUint64 = 3,
  EfiPeiPciCfgWidthMaximum
}
 

Variables

EFI_GUID gEfiPciCfg2PpiGuid
 

Detailed Description

This file declares PciCfg2 PPI.

This ppi Provides platform or chipset-specific access to the PCI configuration space for a specific PCI segment.

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

Revision Reference:
This PPI is introduced in PI Version 1.0.

Macro Definition Documentation

#define EFI_PEI_PCI_CFG2_PPI_GUID   { 0x57a449a, 0x1fdc, 0x4c06, { 0xbf, 0xc9, 0xf5, 0x3f, 0x6a, 0x99, 0xbb, 0x92 } }
#define EFI_PEI_PCI_CFG_ADDRESS (   bus,
  dev,
  func,
  reg 
)
Value:
(UINT64) ( \
(((UINTN) bus) << 24) | \
(((UINTN) dev) << 16) | \
(((UINTN) func) << 8) | \
(((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))
UINT64 EFIAPI LShiftU64(IN UINT64 Operand, IN UINTN Count)
UINT32 UINTN
Definition: ProcessorBind.h:218
unsigned __int64 UINT64
Definition: ProcessorBind.h:122

Typedef Documentation

typedef EFI_STATUS(EFIAPI * EFI_PEI_PCI_CFG2_PPI_IO)(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 or write to a given location in the PCI configuration space.

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_DEVICE_ERRORThere was a problem with the transaction.
EFI_DEVICE_NOT_READYThe device is not capable of supporting the operation at this time.
typedef EFI_STATUS(EFIAPI * EFI_PEI_PCI_CFG2_PPI_RW)(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)

Performs a read-modify-write operation on the contents from a given location in the PCI configuration space.

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_DEVICE_ERRORThere was a problem with the transaction.
EFI_DEVICE_NOT_READYThe device is not capable of supporting the operation at this time.

Enumeration Type Documentation

EFI_PEI_PCI_CFG_PPI_WIDTH

Enumerator
EfiPeiPciCfgWidthUint8 

8-bit access

EfiPeiPciCfgWidthUint16 

16-bit access

EfiPeiPciCfgWidthUint32 

32-bit access

EfiPeiPciCfgWidthUint64 

64-bit access

EfiPeiPciCfgWidthMaximum 

Variable Documentation

EFI_GUID gEfiPciCfg2PpiGuid