Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2006 09:10:50 -0400
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-acpi@freebsd.org
Cc:        takawata@init-main.com, atkin901@yahoo.com
Subject:   Re: acpi on msi-9218 (-current) swaps sio0 and sio1
Message-ID:  <200607100910.51309.jhb@freebsd.org>
In-Reply-To: <20060709.002057.58455516.imp@bsdimp.com>
References:  <200607071738.k67HcmJG006425@ns.init-main.com> <200607071428.27775.jhb@freebsd.org> <20060709.002057.58455516.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 09 July 2006 02:20, M. Warner Losh wrote:
> In message: <200607071428.27775.jhb@freebsd.org>
>             John Baldwin <jhb@FreeBSD.org> writes:
> : On Friday 07 July 2006 13:38, Takanori Watanabe wrote:
> : > In message <200607071240.57062.jhb@freebsd.org>, John Baldwin $B$5$s$$$o$/
> : (B:
> : > We may want to use _UID resource to wire unit number.
> : > How about tweaking acpi_probe_child function so that attaching by
> : > _UID order?
> : 
> : That's probably not a bad idea.  However, it may be somewhat tricky to 
> : implement.  A quick hack solution would be to add the _UID to the order which 
> : works as long as _UIDs are all < 10.  I think the general case of unit wiring 
> : is still useful though as it has applications outside of just ACPI.
> 
> I believe the right way to cope is adding the devices with the right
> unit number.  I think anything else is doomed to failure.
> 
> However, it will mean that we'll need to OMIT the sio hints for ISA
> when we do acpi.  We shouldn't be loading hints for isa anymore
> anyway, except on really really old machines.

See my earlier post.  The problem here is that the ASL list the ports in
reverse order, so we probe COM2 first (as sio0) and COM1 second (as sio1).
The only way I can see to bind sio0 to COM1 is to use the resources
associated with COM1 to wire unit 0 to COM1.  Also, note that the way you
specify a serial console is via a hint flag.

Also, if you look at my proposal, it allows us to extend hints to bind unit
numbers in all sorts of ways.  For example, for this case we could also not
use resources but do something like 'hint.sio.0.device=COMA' or
'hint.sio.0.device=_SB_.FOO.COMA'.  This lets the bus determine what hints
mean as far as wiring unit numbers.  However, letting ACPI parse the
resources and do the subset thing means that default /boot/device.hints
would wire sio0 and sio1 up correctly out of the box.  This will also
cleanup the ISA PnP BIOS case by having the PNP BIOS devices "take over"
hint devices as well.

-- 
John Baldwin



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