PCIBIOS(4) NetBSD/i386 Kernel Interfaces Manual PCIBIOS(4)
NAME
pcibios - introduction to PCI BIOS support
SYNOPSIS
options PCIBIOS options PCIBIOSVERBOSE options PCIBIOS_ADDR_FIXUP options PCIBIOS_BUS_FIXUP options PCIBIOS_INTR_FIXUP #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_ADDR_FIXUP fixup PCI I/O and memory addresses. Some BIOS implementations don't allocate I/O space and memory space for some PCI devices. Especially, a BIOS which is "PnP OS mode enabled" shows this behavior. Since necessary space isn't allocated, those devices will not work without special han- dling. This option allocates I/O space and memory space instead of relying upon the BIOS to do so. If necessary space is already correctly assigned to the devices, this option leaves the space as is. Although many BIOS implementations leave CardBus bridges' space unallocated, the CardBus bridge device driver doesn't require this option, since the driver allocates necessary space by itself. PCIBIOS_BUS_FIXUP fixup PCI bus numbering; needed for many cardbus(4) bridges. Each PCI bus and CardBus should have a unique bus number. But some BIOS implementations don't assign a bus number for subordinate PCI buses. And many BIOS implementations don't assign a bus num- ber for CardBuses. A typical symptom of this is the following boot message: cardbus0 at cardslot0: bus 0 device 0... Please note that this cardbus0 has a bus number `0', but normally the bus number 0 is used by the machine's primary PCI bus. Thus, this bus number for cardbus is incorrect (not assigned). In this situation, a device located in cardbus0 doesn't show correct device ID, because its bus number 0 incorrectly refers to the primary PCI bus, and a device ID in the primary PCI bus is shown in the boot message instead of the device's ID in the cardbus0. This option assigns bus numbers for all subordi- nate PCI buses and CardBuses. Since this option renumbers all PCI buses and CardBuses, all bus numbers of subordinate buses become different when this option is enabled. PCIBIOS_INTR_FIXUP fixup PCI interrupt routing. Some BIOS implementations don't assign an inter- rupt for some devices. This option assigns an interrupt for such devices instead of relying upon the BIOS to do so. If the BIOS has already assigned an interrupt to a device, this option leaves the interrupt as is. PCIBIOS_IRQS_HINT hint for IRQ use. When the PCIBIOS_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 allow- able 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 recompi- lation, 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 inconsis- tent information between the PCI Interrupt Config- uration Register and the PCI Interrupt Routing ta- ble. In such case, the PCI Interrupt Configuration Register takes precedence by default. If this hap- pens, a kernel with PCIBIOSVERBOSE shows "WARNING: preserving irq XX" in the PCI routing table. If PCIBIOS_INTR_FIXUP_FORCE is specified in addi- tion to the PCIBIOS_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 PCIBIOS_INTR_FIXUP work with unknown inter- rupt 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 PCIBIOS_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 con- figured accordingly. PCIINTR_DEBUG make the PCIBIOS_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. NetBSD 2.1 July 22, 2000 NetBSD 2.1
Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.