Re: booting SMP P6 kernel on P4 hangs.

From: Mark Hemment (markhe@veritas.com)
Date: Fri Aug 03 2001 - 05:48:01 EST


Hi,

On Tue, 31 Jul 2001, Linus Torvalds wrote:
> In article <Pine.LNX.4.21.0107310705580.1374-100000@penguin.homenet> you write:
> >
> >Isn't SMP P6 kernel supposed to boot fine on a P4? Btw, booting with
> >"nosmp" works but booting with "noapic" hangs just the same.
>
> It should boot, and it looks like the problem may be a bad MP table.

  The problem is the MP table contains no configuration blocks, and a zero
local APIC address. I've attached the full boot messages.

  The work around is trap that there are no config blocks, and fall back
to UP. Patch attached.

Mark

diff -ur -X dontdiff linux-2.4.7/arch/i386/kernel/apic.c p4-2.4.7/arch/i386/kernel/apic.c
--- linux-2.4.7/arch/i386/kernel/apic.c Wed Jun 20 18:06:38 2001
+++ p4-2.4.7/arch/i386/kernel/apic.c Fri Aug 3 11:10:55 2001
@@ -345,9 +345,8 @@
 {
         unsigned long apic_phys;

- if (smp_found_config) {
- apic_phys = mp_lapic_addr;
- } else {
+ apic_phys = mp_lapic_addr;
+ if (!apic_phys) {
                 /*
                  * set up a fake all zeroes page to simulate the
                  * local APIC and another one for the IO-APIC. We
diff -ur -X dontdiff linux-2.4.7/arch/i386/kernel/mpparse.c p4-2.4.7/arch/i386/kernel/mpparse.c
--- linux-2.4.7/arch/i386/kernel/mpparse.c Tue Jun 12 02:15:27 2001
+++ p4-2.4.7/arch/i386/kernel/mpparse.c Fri Aug 3 11:04:18 2001
@@ -306,6 +306,23 @@
         mp_lapic_addr = mpc->mpc_lapic;

         /*
+ * Buggy BIOS work around.
+ * Some BIOSes report an MP table, with correct signature, checksum,
+ * etc, but with no configuration blocks.
+ * In this case fall back to UP.
+ *
+ * Note: On a system which showed this problem, the local APIC
+ * address was given as NULL. This may not be the case for all
+ * systems, so take the address (incase it is valid) and check it
+ * init_apic_mappings().
+ */
+ if (count >= mpc->mpc_length) {
+ printk("Short mptable - assuming UP system\n");
+ smp_found_config = 0;
+ return 1;
+ }
+
+ /*
          * Now process the configuration blocks.
          */
         while (count < mpc->mpc_length) {



-
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/



This archive was generated by hypermail 2b29 : Tue Aug 07 2001 - 21:00:26 EST