Re: SMP Pentium III, GA-6VXDC7 MoBo. -- 2.4.18-pre7 SMP not working

William Lee Irwin III (wli@holomorphy.com)
Sat, 2 Feb 2002 13:44:50 -0800


On Sat, Feb 02, 2002 at 03:12:41PM +0100, W. Michael Petullo wrote:
> I'm having a lot of trouble debugging this one. Prinks are not being
> displayed on the screen, though I know they are being executed. I have
> even tried William Lee Irwin's early_printk patch to try and get printks
> to display. Apparently the prink buffer is not being flushed this early
> in the kernel code?

printk() flushes the buffers on the exit path, or otherwise the console
code in printk.c is refusing to do anything that early to get around
the bootstrap ordering issues encountered on IA64 (which are truly
arch-generic, though some things coincidentally just work).

I should probably update this so it actually uses the CON_EARLY design
and applies against more recent kernels, and also does not register
things you don't code in explicitly (because of course it's just not
possible to get the bootstrap ordering vs. console output without some
more drivers and registration and unregistration and this logic is not
ever going to be portable).

On Sat, Feb 02, 2002 at 03:12:41PM +0100, W. Michael Petullo wrote:
> The only debugging technique I have found is to insert return statements
> in order to avoid different sections of code. I find, for example,
> that if I make the first statement of the smpboot.c:do_boot_cpu a return,
> the kernel will boot (without SMP on, of course).

I've got a few other tricks up my sleeve -- the output drivers in the
patch are supposed to help some, but there is still more that can be done
to get debugging output out of a machine. I believe that for one reason
or another the console code is refusing to print that early. The driver
defines some callbacks for use by the console code which can be made
non-static and then called directly -- they should simply dump things to
the VGA text buffer with very little interference. They won't provide
convenient string formatting, but sprintf() can be used to help it along.
This is of course not the end of the line either but it may help some.

On Sat, Feb 02, 2002 at 03:12:41PM +0100, W. Michael Petullo wrote:
> Obviously, this is not the best technique. I have been able to narrow
> the location of the bug down a little with it, but I feel I will be able
> to discover little more with this technique.
> I'm not sure what else to do without printks.
> I would appreciate any tips on debugging smpboot.c.
> Thank you.

Let me know if the VGA text buffer stuff I just mentioned helps at all.
I'm also on #kernelnewbies fairly often so flag me down there any time.
And, of course, I'll read the follow-ups. =)

Cheers,
Bill
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/