Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2006 13:33:19 -0700
From:      Marcel Moolenaar <marcel@xcllnt.net>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        Jo Rhett <jrhett@svcolo.com>, 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
Message-ID:  <6097EF2A-BFD8-4E85-86E7-BCCE9A57E245@xcllnt.net>
In-Reply-To: <20060803041522.F2135@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>

next in thread | previous in thread | raw e-mail | index | archive | help

On Aug 2, 2006, at 12:32 PM, Bruce Evans wrote:

> On Wed, 2 Aug 2006, Jo Rhett wrote:
>
>>> On Wed, 2 Aug 2006, Jo Rhett wrote:
>>>> 1. We can't/won't fix the sio0<->sio1 problem because fixing  
>>>> ACPI is hard
>>
>> On Aug 2, 2006, at 10:25 AM, Bruce Evans wrote:
>>> _I_ can't/won't fix it because not just the above :-).  Swapping  
>>> of consoles
>>> only could be fixed within the driver (so that ACPI is not  
>>> involved and
>>> you don't have to change device.hints) since consoles have to be  
>>> hard-wired
>>> in some way and the hints are good enough for wiring the unit  
>>> number to
>>> the i/o address (provided it's an old ISA port -- otherwise hints  
>>> based
>>> on the i/o address don't work).
>>
>> Sorry, color me dumb.  I'm getting lost here.  The problem I was  
>> observing is that device hints is being (mostly) ignored by ACPI  
>> and thus this is the root problem to fix.  I'm not sure what  
>> you're trying to say here.
>
> Console drivers have to and do use the hints directly so as to work  
> before
> bus stuff like ACPI is initializated.

It is a mistake for console drivers to use the hints. It's a mistake
even to use hints for anything else. The fundamental problem with hints
is that they use a device numbering for identification. This is totally
wrong for low-level consoles, because device numbers mean nothing at
that time and are mostly wrong during bus enumeration, because you
cannot generally predict device numbers.

Low-level console drivers should only use I/O port or memory mapped I/O
information to get to the hardware and hints for non-enumerating busses
should only provide resource information. During bus enumeration this
will eventually be mapped to device numbers and one can establish the
logical connection between low-level consoles and high-level devices.

Thus: hints are not hints, but a convoluted mix of enforced settings
and suggestions that are partially and inconsistently used and there-
fore much sooner the cause of problems that a solution to it.

-- 
  Marcel Moolenaar         USPA: A-39004          marcel@xcllnt.net





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6097EF2A-BFD8-4E85-86E7-BCCE9A57E245>