class PciConfig

Defined at line 50 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h

PciConfig supplies the factory for creating the appropriate pci config

object based on the address space of the pci device.

Public Members

static PciReg16 kVendorId
static PciReg16 kDeviceId
static PciReg16 kCommand
static PciReg16 kStatus
static PciReg8 kRevisionId
static PciReg8 kProgramInterface
static PciReg8 kSubClass
static PciReg8 kBaseClass
static PciReg8 kCacheLineSize
static PciReg8 kLatencyTimer
static PciReg8 kHeaderType
static PciReg8 kBist
static PciReg32 kCardbusCisPtr
static PciReg16 kSubsystemVendorId
static PciReg16 kSubsystemId
static PciReg32 kExpansionRomAddress
static PciReg8 kCapabilitiesPtr
static PciReg8 kInterruptLine
static PciReg8 kInterruptPin
static PciReg8 kMinGrant
static PciReg8 kMaxLatency
static const uint8_t kStdCfgEnd
static PciReg8 kPrimaryBusId
static PciReg8 kSecondaryBusId
static PciReg8 kSubordinateBusId
static PciReg8 kSecondaryLatencyTimer
static PciReg8 kIoBase
static PciReg8 kIoLimit
static PciReg16 kSecondaryStatus
static PciReg16 kMemoryBase
static PciReg16 kMemoryLimit
static PciReg16 kPrefetchableMemoryBase
static PciReg16 kPrefetchableMemoryLimit
static PciReg32 kPrefetchableMemoryBaseUpper
static PciReg32 kPrefetchableMemoryLimitUpper
static PciReg16 kIoBaseUpper
static PciReg16 kIoLimitUpper
static PciReg32 kBridgeExpansionRomAddress
static PciReg16 kBridgeControl

Protected Members

PciAddrSpace addr_space_
const uintptr_t base_

Public Methods

PciReg32 kBAR (uint bar)

0x10 is the address of the first BAR in config space

BAR rather than BaseAddress for space / sanity considerations

Defined at line 68 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h

uintptr_t base ()

Defined at line 119 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h

PciAddrSpace addr_space ()

Defined at line 120 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h

fbl::RefPtr<PciConfig> Create (uintptr_t base, PciAddrSpace addr_type)

Create a Pci Configuration object of the appropriate type.

Parameters

base The base address for the PCI configuration space.
addr_type An enum value of PciAddrSpace to identify the time of address space the configuration object will use.

Returns

a pointer to a new PciConfig instance on success, nullptr on failure.

Defined at line 157 of file ../../zircon/kernel/dev/pcie/pci_config.cc

void DumpConfig (uint16_t len)

Virtuals

Defined at line 176 of file ../../zircon/kernel/dev/pcie/pci_config.cc

uint8_t Read (const PciReg8 addr)
uint16_t Read (const PciReg16 addr)
uint32_t Read (const PciReg32 addr)
void Write (const PciReg8 addr, uint8_t val)
void Write (const PciReg16 addr, uint16_t val)
void Write (const PciReg32 addr, uint32_t val)
void ~PciConfig ()

Defined at line 130 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h

Protected Methods

void PciConfig (uintptr_t base, PciAddrSpace addr_space)

Defined at line 133 of file ../../zircon/kernel/dev/pcie/include/dev/pci_config.h