tech-kern archive

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

Re: debugging a kernel that doesn't start



On Mon, Sep 12, 2022 at 10:04:24PM +0200, Edgar Fuß wrote:
> > If you can setup a serial console, it may make things much easier.
> I do have a serial port on the machine.
> 
> > I almost always use serial consoles on dev machines; I don't remember the
> > details but doing the equivalent of a putchar very early was possible.
> Is the BIOS still available or how does that work?

Basically it just requires a outb to the serial port's TX register
(well, you also need to busy-wait for the transmit to complete,
or characters will be lost). This is simple enough to have it working
early in boot, as early as the consinit() call in init_x86_64().

I'm almost sure I used printf() in init_x86_64 with a serial console
(but after the consinit() call or course).
I definitively used it in pmap_bootstrap().

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index