From owner-freebsd-acpi@FreeBSD.ORG Mon Jul 10 14:35:19 2006 Return-Path: X-Original-To: freebsd-acpi@freebsd.org Delivered-To: freebsd-acpi@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DCDF016A4DA for ; Mon, 10 Jul 2006 14:35:19 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A46343D45 for ; Mon, 10 Jul 2006 14:35:18 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from zion.baldwin.cx (zion.baldwin.cx [192.168.0.7]) (authenticated bits=0) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id k6AEZ8dV061078; Mon, 10 Jul 2006 10:35:14 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-acpi@freebsd.org Date: Mon, 10 Jul 2006 09:10:50 -0400 User-Agent: KMail/1.9.1 References: <200607071738.k67HcmJG006425@ns.init-main.com> <200607071428.27775.jhb@freebsd.org> <20060709.002057.58455516.imp@bsdimp.com> In-Reply-To: <20060709.002057.58455516.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200607100910.51309.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [192.168.0.1]); Mon, 10 Jul 2006 10:35:15 -0400 (EDT) X-Virus-Scanned: ClamAV 0.87.1/1590/Mon Jul 10 01:34:09 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx Cc: takawata@init-main.com, atkin901@yahoo.com Subject: Re: acpi on msi-9218 (-current) swaps sio0 and sio1 X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Jul 2006 14:35:19 -0000 On Sunday 09 July 2006 02:20, M. Warner Losh wrote: > In message: <200607071428.27775.jhb@freebsd.org> > John Baldwin 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