i386/100831: sio ignores BIOS information about serial ports - bounty offered

Marcel Moolenaar marcel at xcllnt.net
Wed Aug 2 20:33:35 UTC 2006


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 at xcllnt.net




More information about the freebsd-i386 mailing list