PCIBIOS(4)

NAME
pcibios - introduction to PCI BIOS support

SYNOPSIS
options PCIBIOS
options PCIBIOSVERBOSE
#options PCIBIOS_IRQS_HINT=0x0a00 #IRQ 9,11
#options PCIBIOS_INTR_FIXUP_FORCE
options PCIBIOS_INTR_GUESS
#options PCIINTR_DEBUG

INTRODUCTION
pcibios provides support for setting up PCI controllers, bridges, and devices using information extracted from the BIOS.

Ideally, the boot firmware of a machine (a.k.a. BIOS) should set up all PCI devices; assigning them I/O and memory addresses and interrupts. Alas, this does not always happen, so there is some PC specific code that can do the initialization when NetBSD boots.

Options:

PCIBIOS
    turn on the PCI BIOS support.

PCIBIOSVERBOSE
    make the setup procedure verbose.

PCIBIOS_IRQS_HINT
    hint for IRQ use. When PCI_INTR_FIXUP cannot guess an adequate IRQ for a device, the hint is used.

    The value is a logical or of power-of-2s of allowable interrupts:
    IRQ Value | IRQ Value | IRQ Value | IRQ Value
    0 0x0001 | 4 0x0010 | 8 0x0100 | 12 0x1000
    1 0x0002 | 5 0x0020 | 9 0x0200 | 13 0x2000
    2 0x0004 | 6 0x0040 | 10 0x0400 | 14 0x4000
    3 0x0008 | 7 0x0080 | 11 0x0800 | 15 0x8000
    For example, "options PCIBIOS_IRQS_HINT=0x0a00" allows IRQ 9 and IRQ 11.

    The kernel global variable pcibios_irqs_hint holds this value, so a user can override this value without kernel recompilation. For example:
    •   To specify this value on the fly, type the following command at the boot prompt to drop into DDB (the in-kernel debugger; you have to specify "options DDB" to make kernel with DDB):
            boot -d
        And type the following command on "db>" prompt:
            write pcibios_irqs_hint 0x0a00
        Then type the following to continue to boot:
            c
    •   To modify kernel image without kernel recompilation, run the following command on shell:
            gdb --write /netbsd
        And type the following commands at the "(gdb)" prompt:
            set pcibios_irqs_hint=0xa00
            quit

PCIBIOS_INTR_FIXUP_FORCE
    Some buggy BIOS implementations provide inconsistent information between the PCI Interrupt Configuration Register and the PCI Interrupt Routing table. In such case, the PCI Interrupt Configuration Register takes precedence by default. If this happens, a kernel with PCIBIOSVERBOSE shows "WARNING: preserving irq XX" in the PCI routing table.

    If PCIBIOS_INTR_FIXUP_FORCE is specified in addition to the PCI_INTR_FIXUP, the PCI Interrupt Routing table takes precedence. In this case, a kernel with PCIBIOSVERBOSE shows "WARNING: overriding irq XX" in the PCI routing table.

PCIBIOS_INTR_GUESS
    make PCI_INTR_FIXUP work with unknown interrupt router.

    If a PCI interrupt router is not known, normally interrupt configuration will not be touched.

    But if PCIBIOS_INTR_GUESS is specified in addition to the PCI_INTR_FIXUP, and if a PCI interrupt routing table entry indicates that only one IRQ is available for the entry, the IRQ is assumed to be already connected to the device, and corresponding PCI Interrupt Configuration Register will be configured accordingly.

PCIINTR_DEBUG
    make the PCI_INTR_FIXUP procedure verbose.

SEE ALSO
cardbus(4), pci(4)

HISTORY
The pcibios code appeared in NetBSD 1.5.

BUGS
The PCIBIOS_ADDR_FIXUP option may conflict with the PCI CardBus driver's own address fixup.