[][src]Module sunrise_ahci::pci

PCI discovery

A minimal PCI implementation, that permits only discovering AHCI devices, and querying their BAR.

Structs

PciConfigPortsPair

A struct tying the two pci config ports together.

PciDevice

A pci device, addressed by its bus number, slot, and function.

PciHeader00

Pci header when Header Type == 0x00 (General device).

Enums

BAR

Base Address Registers. Minimal implementation, does not support 64-bits BARs.

PciHeader

Contents of pci config registers 0x4-0xf, structure varies based on Header Type.

Constants

CONFIG_ADDRESS

The CONFIG_ADDRESS I/O location.

CONFIG_DATA

The CONFIG_DATA I/O location.

MAX_BUS

The highest addressable bus.

MAX_FUNC

The highest addressable function on a slot on a bus.

MAX_REGISTER

The highest addressable register on a function on a slot on a bus.

MAX_SLOT

The highest addressable slot on a bus.

Statics

PCI_CONFIG_PORTS

A mutex around the two ports used to address pci configuration space.

Functions

discover

Discover all pci devices, by probing the PID-VID of every slot on every bus.

get_ahci_controllers

Gets the ahci controllers found by pci discovery.

pci_config_read_word

Read one of the 64 32-bit registers of a pci bus>device>func.

pci_config_write_word

Read one of the 64 32-bit registers of a pci bus>device>func.