Trimming the default /boot/device.hints

M. Warner Losh imp at bsdimp.com
Tue Jan 27 22:39:53 PST 2009


In message: <200901260947.32870.jhb at freebsd.org>
            John Baldwin <jhb at freebsd.org> writes:
: After the changes to make hints always reserve device names, soem folks ran 
: into issues with devices changing names due to previously unused hints now 
: always being honored (e.g. hints for non-existent ISA le(4) cards always 
: reserving le0).  What I would like to do to help minimize this further is to 
: trim the default set of hints.  The number of machines that will run 8.0 that 
: have ISA slots is incredibly small, probably zero.  To that end, I would like 
: to remove all hints for ISA adapters from i386 and amd64 (amd64 already has 
: most of them removed).  Also, the hint for vga0 is not needed as the vga_isa 
: driver uses an identify routine to always add itself.  Note that end-users 
: can always add hints back later if desired/needed.  However, changing the 
: defaults means that some hardware may no longer work out of the box.  My 
: guess though is that the set of such hardware is the empty set.

Your guess likely would be incorrect.  There's still a number of
embedded machines that have pc-104 busses attached to them.  However,
the set is getting much smaller...

: If we wanted, we could go further and assume that all machines have either 
: PnPBIOS or ACPI and remove most of the other hints as well.  We already sort 
: of assume that on amd64 (which has no atrtc0 hints, but still has hints for 
: fdc0, ppc0, and some other devices).

A pure PNPBIOS enumerated system is almost working today.  It works on
x86 most of the time.  I've run systems that had only minimal hints
for sio2 and sio3 and a couple of other minor variants.

: Here is the proposed diff:

I don't like this change.  However, you've hit on part of the reason I
don't like the change.  I don't think it goes far enough, and at the
same time loses valuable history.

To address the latter, I'd do a cp GENERIC.hints LEGACY.hints and add
comments to the top that this is for systems that don't have PNPBIOS
or ACPI or that there's problems with those.

To address the former, I'd propose something more like:

hint.fd.0.at="fdc0"
hint.fd.0.drive="0"
hint.fd.1.at="fdc0"
hint.fd.1.drive="1"
hint.atkbd.0.at="atkbdc"
hint.psm.0.at="atkbdc"
hint.sc.0.at="isa"
hint.sc.0.flags="0x100"
hint.uart.0.port="0x3F8"
hint.uart.0.flags="0x10"
hint.uart.1.port="0x2F8"

Not sure that the 'sc' lines are needed, but I was too chicken to try
without them.  They used to be needed...  The above wires up
everything that isn't on the ISA bus, and gives hints that uart0
should be the one at 0x3f8, etc.

Warner

: --- //depot/user/jhb/acpipci/amd64/conf/GENERIC.hints
: +++ /home/jhb/work/p4/acpipci/amd64/conf/GENERIC.hints
: @@ -13,7 +13,6 @@
:  hint.atkbd.0.irq="1"
:  hint.psm.0.at="atkbdc"
:  hint.psm.0.irq="12"
: -hint.vga.0.at="isa"
:  hint.sc.0.at="isa"
:  hint.sc.0.flags="0x100"
:  hint.uart.0.at="isa"
: @@ -23,13 +22,5 @@
:  hint.uart.1.at="isa"
:  hint.uart.1.port="0x2F8"
:  hint.uart.1.irq="3"
: -hint.uart.2.at="isa"
: -hint.uart.2.disabled="1"
: -hint.uart.2.port="0x3E8"
: -hint.uart.2.irq="5"
: -hint.uart.3.at="isa"
: -hint.uart.3.disabled="1"
: -hint.uart.3.port="0x2E8"
: -hint.uart.3.irq="9"
:  hint.ppc.0.at="isa"
:  hint.ppc.0.irq="7"
: --- //depot/user/jhb/acpipci/i386/conf/GENERIC.hints
: +++ /home/jhb/work/p4/acpipci/i386/conf/GENERIC.hints
: @@ -13,21 +13,12 @@
:  hint.ata.1.at="isa"
:  hint.ata.1.port="0x170"
:  hint.ata.1.irq="15"
: -hint.adv.0.at="isa"
: -hint.adv.0.disabled="1"
: -hint.bt.0.at="isa"
: -hint.bt.0.disabled="1"
: -hint.aha.0.at="isa"
: -hint.aha.0.disabled="1"
: -hint.aic.0.at="isa"
: -hint.aic.0.disabled="1"
:  hint.atkbdc.0.at="isa"
:  hint.atkbdc.0.port="0x060"
:  hint.atkbd.0.at="atkbdc"
:  hint.atkbd.0.irq="1"
:  hint.psm.0.at="atkbdc"
:  hint.psm.0.irq="12"
: -hint.vga.0.at="isa"
:  hint.sc.0.at="isa"
:  hint.sc.0.flags="0x100"
:  hint.apm.0.disabled="1"
: @@ -39,41 +30,8 @@
:  hint.uart.1.at="isa"
:  hint.uart.1.port="0x2F8"
:  hint.uart.1.irq="3"
: -hint.uart.2.at="isa"
: -hint.uart.2.disabled="1"
: -hint.uart.2.port="0x3E8"
: -hint.uart.2.irq="5"
: -hint.uart.3.at="isa"
: -hint.uart.3.disabled="1"
: -hint.uart.3.port="0x2E8"
: -hint.uart.3.irq="9"
:  hint.ppc.0.at="isa"
:  hint.ppc.0.irq="7"
: -hint.ed.0.at="isa"
: -hint.ed.0.disabled="1"
: -hint.ed.0.port="0x280"
: -hint.ed.0.irq="10"
: -hint.ed.0.maddr="0xd8000"
: -hint.cs.0.at="isa"
: -hint.cs.0.disabled="1"
: -hint.cs.0.port="0x300"
: -hint.sn.0.at="isa"
: -hint.sn.0.disabled="1"
: -hint.sn.0.port="0x300"
: -hint.sn.0.irq="10"
: -hint.ie.0.at="isa"
: -hint.ie.0.disabled="1"
: -hint.ie.0.port="0x300"
: -hint.ie.0.irq="10"
: -hint.ie.0.maddr="0xd0000"
: -hint.fe.0.at="isa"
: -hint.fe.0.disabled="1"
: -hint.fe.0.port="0x300"
: -hint.le.0.at="isa"
: -hint.le.0.disabled="1"
: -hint.le.0.port="0x280"
: -hint.le.0.irq="10"
: -hint.le.0.drq="0"
:  hint.atrtc.0.at="isa"
:  hint.atrtc.0.port="0x70"
:  hint.atrtc.0.irq="8"
: 
: 
: -- 
: John Baldwin
: _______________________________________________
: freebsd-arch at freebsd.org mailing list
: http://lists.freebsd.org/mailman/listinfo/freebsd-arch
: To unsubscribe, send any mail to "freebsd-arch-unsubscribe at freebsd.org"
: 


More information about the freebsd-arch mailing list