Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bootblocks and bios fighting over what's com0?



On Wed, Oct 01, 2008 at 12:24:58AM -0400, Thor Lancelot Simon wrote:
> I have a machine whose BIOS appears to claim that the first serial
> port (COM1) is what we'd (once netbsd boots) usually call com1
> (address 0x2f8).  This is an artifact of its BIOS console redirection:
> the console redirection hides the serial port from BIOS callers. :-/
> 
> If I set up pxeboot_ia32.bin with nbinstallboot -o console=com0, it
> appears that it uses what the *bios* claims is the first serial port,
> but what we will, once NetBSD has booted, call com1.  This seems to me
> to not be right.  We don't pick serial ports by their BIOS names (or
> "com0" would make no sense) but by their NetBSD names -- so I think
> this setting should always get me the serial port at 3f8, no matter
> what the BIOS says COM1 is.

I think the boot loader looks at the bios tables to get the serial port
addresses.

> 
> It appears I can override CONSADDR in the pxeboot build to change this

I think you can also use
nbinstallboot -o console=com0,ioaddr=0x3f8,speed=9600
works for me

> but reading the code, I can't quite see why it's happening at all.  I
> think it should not -- a lot of BIOSes have this annoying quirk when
> redirecting output to serial (admittedly, most allow it to be turned
> off -- this one does not, unless I want to miss *all* the BIOS output
> after the initial POST).

> 
> Can anyone point me at where in the source code we end up using what
> the BIOS said was COM1 instead of what's at 3f8?  Also, do others think
> the current behavior is correct?  I really do not.

I think it's correct (I've seen systems with com0 at funny addresses,
and the boot loader did get it right - the kernel did get it at com2). 
What's not correct is the BIOS moving things around in your back :)

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           
Manuel.Bouyer%lip6.fr@localhost
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index