miniOS
x86_64 hobby kernel with SMP, VFS, and POSIX process model
Loading...
Searching...
No Matches
pci_device_t Struct Reference

#include <pci.h>

Public Attributes

uint8_t bus
uint8_t dev
uint8_t fn
uint16_t vendor_id
uint16_t device_id
uint8_t class_code
uint8_t subclass
uint8_t prog_if
uint8_t revision_id
uint16_t subsys_vendor
uint16_t subsys_device
uint8_t irq_line
uint8_t irq_pin
uint32_t bar [6]
uint8_t header_type

Detailed Description

pci_device_t - Descriptor for a single PCI function discovered during enumeration.

Populated by pci_init() for every non-empty bus/device/function tuple on bus 0.

Member Data Documentation

◆ bar

uint32_t pci_device_t::bar[6]

Base Address Registers 0-5 (offsets 0x10-0x24)

◆ bus

uint8_t pci_device_t::bus

PCI bus number (always 0 for bus-0 scan)

◆ class_code

uint8_t pci_device_t::class_code

Base class code (bits 31-24 of offset 0x08)

◆ dev

uint8_t pci_device_t::dev

PCI device number (0-31)

◆ device_id

uint16_t pci_device_t::device_id

Device ID from config-space offset 0x00 high 16 bits

◆ fn

uint8_t pci_device_t::fn

PCI function number (0-7)

◆ header_type

uint8_t pci_device_t::header_type

Header type byte (offset 0x0C bits 23-16)

◆ irq_line

uint8_t pci_device_t::irq_line

IRQ line (offset 0x3C bits 7-0)

◆ irq_pin

uint8_t pci_device_t::irq_pin

IRQ pin (offset 0x3C bits 15-8)

◆ prog_if

uint8_t pci_device_t::prog_if

Programming interface (bits 15-8 of offset 0x08)

◆ revision_id

uint8_t pci_device_t::revision_id

Revision ID (bits 7-0 of offset 0x08)

◆ subclass

uint8_t pci_device_t::subclass

Sub-class code (bits 23-16 of offset 0x08)

◆ subsys_device

uint16_t pci_device_t::subsys_device

Subsystem device ID (offset 0x2C high 16)

◆ subsys_vendor

uint16_t pci_device_t::subsys_vendor

Subsystem vendor ID (offset 0x2C low 16)

◆ vendor_id

uint16_t pci_device_t::vendor_id

Vendor ID from config-space offset 0x00 low 16 bits


The documentation for this struct was generated from the following file:
  • include/miniOS/drivers/pci.h