From owner-freebsd-i386@FreeBSD.ORG Wed Aug 2 19:54:02 2006 Return-Path: X-Original-To: freebsd-i386@freebsd.org Delivered-To: freebsd-i386@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45FF516A4DE; Wed, 2 Aug 2006 19:54:02 +0000 (UTC) (envelope-from bde@zeta.org.au) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EB1543D45; Wed, 2 Aug 2006 19:54:01 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.2.163]) by mailout2.pacific.net.au (Postfix) with ESMTP id BC08410A1C7; Thu, 3 Aug 2006 05:54:00 +1000 (EST) Received: from epsplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailproxy2.pacific.net.au (8.13.4/8.13.4/Debian-3sarge1) with ESMTP id k72JrwWh009679; Thu, 3 Aug 2006 05:53:59 +1000 Date: Thu, 3 Aug 2006 05:53:58 +1000 (EST) From: Bruce Evans X-X-Sender: bde@epsplex.bde.org To: Jo Rhett In-Reply-To: <20060803041522.F2135@epsplex.bde.org> Message-ID: <20060803055353.K635@epsplex.bde.org> References: <200607252036.k6PKanFd072593@www.freebsd.org> <20060731191302.S1172@epsplex.bde.org> <6EFF87DF-280C-402C-8C2A-10F3144CF41F@svcolo.com> <20060802205230.N90692@delplex.bde.org> <20060802234330.J1249@epsplex.bde.org> <20060802150656.GB47835@svcolo.com> <20060803024810.X1573@epsplex.bde.org> <83D35AA9-61D2-4977-AFEC-C498F4147FC2@svcolo.com> <20060803041522.F2135@epsplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: njl@freebsd.org, freebsd-gnats-submit@freebsd.org, freebsd-i386@freebsd.org Subject: Re: i386/100831: sio ignores BIOS information about serial ports - bounty offered X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Aug 2006 19:54:02 -0000 On Thu, 3 Aug 2006, Bruce Evans wrote: > On Wed, 2 Aug 2006, Jo Rhett wrote: >>>> 4. There should be no ill effect from doing this. Console will never >>>> break >>>> and go to the wrong port. >>> >>> Yes, "should be". The wiring should be fairly deterministic once you >>> get it to work. I think it will continue to work even if someone fixes >>> (?) ACPI to prefer the hints order to the ACPI order. However, it would >>> break if someone fixes (?) ACPI to prefer the BIOS order to both the hints >>> order and the ACPI order (I think ACPI is using its own order and doesn't >>> know that you've swapped the order in the BIOS). >> >> I'm not sure I understand the difference. The ACPI order is the order that >> the BIOS presents them in when querying it via ACPI, yes? > > I don't completely understand this either. I think there is a non-ACPI part > of the BIOS that FreeBSD (or all OS's doesn't see). As I understand your > configuration, you start with COM1 and COM2 at the usual places but don't > want to use COM1 so you change the BIOS settings for COM2 to the usual ones > for COM1 and maybe vice versa. This changes soft jumpers or whatever is > needed for FreeBSD to see it. Then you use a BIOS option to swap the ports > so that everything is supposed to see COM2 as COM1. The boot loader sees > this but ACPI in FreeBSD doesn't. I think this changes is only made in > some BIOS table that ACPI in FreeBSD doesn't know about. In my test, I > only swapped the settings of COM1 and COM2 in the BIOS, since I couldn't > find a BIOS option to swap the unit number assignments, so it was not > completely incorrect for ACPI in FreeBSD to swap the settings. More details on my test: - after swapping the settings of COM1 and COM2, both FreeBSD-ACPI and WinXP see only the settings swapped. WinXP didn't report any changes to the devices. I now think this is completely correct. Swapping like this requires swapping in device.hints to keep the same assignment of physical devices to unit numbers. - after swapping the settings and then disabling COM1, FreeBSD-ACPI moves COM2 down to COM1 (sio0) and sio1 goes away, while WinXP doesn't change unit numbers and COM1 goes away. I think the WinXP behaviour is correct and FreeBSD-ACPI just allocates unit numbers starting at 0. Bruce