Subject: Re: serial console HOWTO?
To: Jonathan Stone <jonathan@DSG.Stanford.EDU>
From: David Maxwell <david@fundy.ca>
List: port-i386
Date: 01/18/2000 22:38:38
On Tue, Jan 18, 2000 at 05:45:46PM -0800, Jonathan Stone wrote:
> In message <20000118210856.F21588@fundy.ca>, David Maxwell writes:
> >Serial bootblocks are needed if you want to be able to select a kernel,
> >or boot options (-s) via serial.
> 
> That turns out not to be the case. Recent Intel server motherboards
> can redirect BIOS I/O to the serial port. Works fine for bootblocks,
> too.

Fair enough. The vast majority of people don't have Recent Intel server
motherboards though - my comments were meant to be generic.

> >#       you don't want the option below ON iff you are using the
> >#       serial console option of the new boot strap code.
> >#options        CONS_OVERRIDE   # Always use above! independent of boot info
> 
> Okay. I built and installed serial console bootblocks. WHere I come from,
> "iff" means "if and only if".  So I dont want CONS_OVERRIDE.
> And I am sure I built and installboot'ed biosboot_com0.sym, because the 
> vbersion string from the bootblocks changed.
> 
> So it looks like the darn bootblocks are not properly passing on the
> bt_info to the kernel, which is what both UTLSing and the manpage suggest
> should happen.

Sorry, perhaps I'm being thrown by the choice of mailing-list. What OS
Version are you setting up here? 

My comments were towards -release versions. 1.4.1 didn't include serial
console bootblocks, you had to configure it in a kernel option.

> Actually, that's exactly what I want. Put the serial config into the
> bootblock, have the bootblock pass it onto the krnel via bootinfo, and
> then I can build new kernels, or run GENERIC kernels, and the Right
> Things happen. That was my reading of how it was suppoed to wrok.
> Did I read wrong?  Or is the code totally out of whack with the
> commends and the console(4) manpage?

Got it now I think - you're running -current. What serial console
'policy' did you build your bootblocks with? ala boot_console(8)

> Or is the biosboot_com0 I built getting horribly confused by the BIOS
> redirecting "normal" (VGA/kbd) console to the serial port?

I think everything after the bootblocks doesn't go through the BIOS,
so I would expect the motherboard to be unable to grab writes that
go to the video card directly. I expect that even Dos programs that
skip the BIOS couldn't be run using that feature.

> In fact, given the funky "bios-console-redirect" feature, what would
> be *realy* cool is to have kernel console output go to both serial
> port and the graphics card (if present),a nd to accept input from
> either keyboard or serial. That'd be wonderful--that's what the BIOS
> does.  I can try and find time in Feburary to code that, if we can
> agree on how.

I suspect the performance hit of convincing the NetBSD kernel to
write all console output via the BIOS would be pretty significant.

-- 
David Maxwell, david@vex.net|david@maxwell.net -->
If you don't spend energy getting what you want,
	You'll have to spend it dealing with what you get.
					      - Unknown