cvs commit: src/sys/conf files src/sys/dev/uart uart_cpu.h uart_cpu_alpha.c uart_cpu_amd64.c uart_cpu_i386.c uart_cpu_ia64.c uart_cpu_pc98.c uart_cpu_sparc64.c uart_subr.c

John-Mark Gurney gurney_j at efn.org
Sat Mar 20 13:17:10 PST 2004


Marcel Moolenaar wrote this message on Sat, Mar 20, 2004 at 12:16 -0800:
> > > Probe order is irrelevant if you specify the device by its I/O port
> > > or memory mapped I/O address. When you need to pinpoint a device
> > > prior to any form of bus enumeration, the unit number is meaningless
> > > and any mechanism that includes a unit number is bogus. That's why
> > > hints are the wrong tool for pinpointing a console or debug port.
> > 
> > I hope that you don't have to specify the console via io/memory port..
> 
> Yes you have. This is no different than hints, except that you set
> flags in that case to tell uart(4) that the device is to be used as
> a console or debug port. But you still need to specify the I/O port
> because without it your hint is bogus.

My objection is to Yet Another Hint Place to stick IO/Memory wiring down
addresses...  If you need to specify IO or memory mapped addresses w/
io or mm, then you have enough information to instead specify the device
such as sio5, and then get the io or mm from the hints for that device... 

currently, you have:
hw.uart.console="io=0x3f8:br=9600:[...]"

now why couldn't that be changed to (or whatever you name the device):
hw.uart.console="dv=uart0"
hint.uart.0.port="0x3f8"

It does everything your patch does w/o scattering device information
in random places that isn't hint...  Personally, I also think that
if you want to set baudrate and other paramters, they should be:
hint.uart.0.baudrate="9600"
etc.

Since this is all hints for the device/console that specify parameters
for the device...  of course, we really should have a:
hint.console.0.dev="uart0"
or:
hint.console.0.dev="uart0:sio0:sc0"

Specifing the order in which we prefer the various devices...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the cvs-all mailing list