Subject: Re: serial console bug report: port-i386/9236
To: None <port-i386@netbsd.org>
From: Daniel Dickinson <perrancan@yahoo.com>
List: port-i386
Date: 06/07/2000 13:55:00
As a side note the bios will also screw up port
assignments if you skip a port.  That is if you have
(using DOS names) COM1, COM2, and COM4 the BIOS will
read f8 03 f8 02 e8 02 00 00 instead of 
f8 03 f8 02 00 00 e8 02.  In the DOS/Win3.1 days this
would show up as COM1, COM2, COM3 with COM3 having
COM4's port address which confused many programs.  I
don't know what NetBSD does with that, but I do
remember that Win3.1 got confused by this and the fix
then was to run a debug script in the autoexec that
put in the right information at location 40:0

I think the best way to fix this is to do essentially
the same thing, only in this case you patch the kernel
to fix the info, and write tiny applet that will patch
the kernel with the correct code sequence (based on a
/etc/bioscom or some such).

The basic problem is that for most boards the bios 
cannot be in any way trusted when it comes to serial
ports.
--- Jason R Thorpe <thorpej@zembu.com> wrote:
> Hi folks...
> 
> I have discovered the cause of PR port-i386/9236. 
> In a nutshell, let
> me describe the problem I was seeing that caused me
> to look into this
> PR.
> 
> On my L440GX+ server board, I have enabled console
> redirection.  This
> gets me the BIOS messages pre-boot.  I have also
> installed biosboot_com0,
> which does direct i/o to the first serial port.
> 
> However, when the handoff to the boot program is
> made, the output appears
> on the *second* serial port, also causing the kernel
> to use com1 as the
> console.
> 
> A little investigating revealed what was happening. 
> The BIOS has a table
> at 40:0 listing the serial ports present on the
> system.  When console
> redirection is disabled, the table looks like:
> 
> f8 03 f8 02 00 00 00 00
> 
> When redirection is enabled:
> 
> f8 02 00 00 00 00 00 00
> 
> So, the BIOS has removed the first serial port from
> the list.
> 
> Needless to say, this is quite annoying.  It borders
> on utter stupidity,
> actually.
> 
> I'm not sure of a good way to fix this.  I suppose
> perhaps we could simply
> have a table containing the legacy serial port
> addresses so that at least
> direct console I/O would work the vast majority of
> the time (i.e. only
> failing when someone reconfigures where COM1 (i.e.
> com0).
> 
> Any thoughts?
> 
> -- 
>         -- Jason R. Thorpe <thorpej@zembu.com>


__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com