Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Mar 2004 12:53:56 -0800
From:      John-Mark Gurney <gurney_j@efn.org>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: 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
Message-ID:  <20040320205356.GE567@funkthat.com>
In-Reply-To: <20040320201610.GC84959@dhcp01.pn.xcllnt.net>
References:  <200403200214.i2K2E3ps052217@repoman.freebsd.org> <20040320080027.GC567@funkthat.com> <20040320085431.GA74398@dhcp01.pn.xcllnt.net> <20040320185640.GD567@funkthat.com> <20040320201610.GC84959@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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."



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040320205356.GE567>