1 .\" $NetBSD: pcibios.4,v 1.16 2008/04/30 13:10:56 martin Exp $
3 .\" Copyright (c) 1999, 2000 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
6 .\" This code is derived from software contributed to The NetBSD Foundation
7 .\" by Lennart Augustsson.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
18 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGE.
35 .Nd introduction to PCI BIOS support
38 .Cd "options PCIBIOSVERBOSE"
39 .Cd "#options PCIBIOS_IRQS_HINT=0x0a00 #IRQ 9,11"
40 .Cd "#options PCIBIOS_INTR_FIXUP_FORCE"
41 .Cd "options PCIBIOS_INTR_GUESS"
42 .Cd "#options PCIINTR_DEBUG"
45 provides support for setting up PCI controllers, bridges, and devices
46 using information extracted from the BIOS.
48 Ideally, the boot firmware of a machine (a.k.a. BIOS) should set
49 up all PCI devices; assigning them I/O and memory addresses and
50 interrupts. Alas, this does not always happen, so there is some
51 PC specific code that can do the initialization when
56 .Bl -tag -width PCIBIOS_IRQS_HINT -offset 3n
58 turn on the PCI BIOS support.
60 make the setup procedure verbose.
61 .It Nm PCIBIOS_IRQS_HINT
65 cannot guess an adequate IRQ for a device, the hint is used.
67 The value is a logical or of power-of-2s of allowable interrupts:
68 .Bl -column "XX-0xffff" "XX-0xffff" "XX-0xffff" "XX-0xffff" -compact -offset 2n
69 .It Em "IRQ Value" Ta Em "IRQ Value" Ta Em "IRQ Value" Ta Em "IRQ Value"
70 .It "\& 0 0x0001" Ta " 4 0x0010" Ta " 8 0x0100" Ta "12 0x1000"
71 .It "\& 1 0x0002" Ta " 5 0x0020" Ta " 9 0x0200" Ta "13 0x2000"
72 .It "\& 2 0x0004" Ta " 6 0x0040" Ta "10 0x0400" Ta "14 0x4000"
73 .It "\& 3 0x0008" Ta " 7 0x0080" Ta "11 0x0800" Ta "15 0x8000"
76 .Qq Sy options PCIBIOS_IRQS_HINT=0x0a00
77 allows IRQ 9 and IRQ 11.
79 The kernel global variable
82 so a user can override this value without kernel recompilation.
86 To specify this value on the fly, type the following command
87 at the boot prompt to drop into DDB (the in-kernel debugger;
90 to make kernel with DDB):
92 And type the following command on
95 .Dl Ic write pcibios_irqs_hint 0x0a00
96 Then type the following to continue to boot:
99 To modify kernel image without kernel recompilation,
100 run the following command on shell:
101 .Dl Ic gdb --write /netbsd
102 And type the following commands at the
105 .Dl Ic set pcibios_irqs_hint=0xa00
108 .It Nm PCIBIOS_INTR_FIXUP_FORCE
109 Some buggy BIOS implementations provide inconsistent
110 information between the PCI Interrupt Configuration Register
111 and the PCI Interrupt Routing table. In such case,
112 the PCI Interrupt Configuration Register takes precedence
113 by default. If this happens, a kernel with
116 .Qq Sy WARNING: preserving irq XX
117 in the PCI routing table.
120 .Em PCIBIOS_INTR_FIXUP_FORCE
121 is specified in addition to the
123 the PCI Interrupt Routing table takes precedence.
124 In this case, a kernel with
127 .Qq Sy WARNING: overriding irq XX
128 in the PCI routing table.
129 .It Nm PCIBIOS_INTR_GUESS
132 work with unknown interrupt router.
134 If a PCI interrupt router is not known, normally interrupt
135 configuration will not be touched.
138 .Em PCIBIOS_INTR_GUESS
139 is specified in addition to the
141 and if a PCI interrupt routing table entry indicates that only
142 one IRQ is available for the entry, the IRQ is assumed to be already
143 connected to the device, and corresponding PCI Interrupt
144 Configuration Register will be configured accordingly.
160 .Em PCIBIOS_ADDR_FIXUP
161 option may conflict with the PCI CardBus driver's own