2001-07-31 06:08:42

by Tigran Aivazian

[permalink] [raw]
Subject: booting SMP P6 kernel on P4 hangs.

Hi guys,

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.

Here is where it hangs:

>
> ---------------------System Info------------------------------------
>
> Intel Pentium 4 processor: 1.3 GHz
> Level 2 Cache: 256 KB Integrated
>
> System Memory 256 MB ECC RDRAM
> AGP Aperture 128 MB
> CPU Information::
> CPU speed Normal
> Bus Speed 100 Mhz
> Processor ID F0A
> Clock Speed 1.30 Ghz
> Cache Size 256KB
>
>
>
> --------------------Messages on the screen---------------------------
>
>
> CPU0: Intel(R) Pentium(R) 4 CPU 1300 Mhz stepping 0a
> per-CPU timeslice cutoff: 731.49 usecs
> weird, boot CPU (#0) not listed by the BIOS
> Getting VERSION: f000acde
> Getting VERSION: f0ffac21
> leaving PIC mode, enabling symmetric IO mode.
> enabled ExtINT on CPU#0
> ESR value before enabling vector: 00000000
> ESR value after enabling vector: 00000000
> CPU present map: 1
> Before bogomips.
> Error: only one processor found.
> Boot done.
> ENABLING IO-APIC IRQs
> Synchronizing Arb IDs.
> ..TIMER: vector=31 pin1=2 pin2=0
> activating NMI Watchdog...done
> CPU#0 NMI appears to be stuck
> testing the IO APIC.............
> ..........................done
> calibrating APIC timer...
> .....CPU clock speed is 1285.2614 Mhz
> ....host bus clock speed is 0.0000 Mhz
> cpu:0, clocks:0, slice:0
>
>
>


2001-07-31 10:45:58

by Mikael Pettersson

[permalink] [raw]
Subject: Re: booting SMP P6 kernel on P4 hangs.

On Tue, 31 Jul 2001 07:10:34 +0100 (BST), Tigran Aivazian wrote:

>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.
>
>Here is where it hangs:
>
>> CPU0: Intel(R) Pentium(R) 4 CPU 1300 Mhz stepping 0a
>> per-CPU timeslice cutoff: 731.49 usecs
>> weird, boot CPU (#0) not listed by the BIOS
>> Getting VERSION: f000acde
>> Getting VERSION: f0ffac21
>> leaving PIC mode, enabling symmetric IO mode.
>> enabled ExtINT on CPU#0
>> ESR value before enabling vector: 00000000
>> ESR value after enabling vector: 00000000
>> CPU present map: 1
>> Before bogomips.
>> Error: only one processor found.
>> Boot done.
>> ENABLING IO-APIC IRQs
>> Synchronizing Arb IDs.
>> ..TIMER: vector=31 pin1=2 pin2=0
>> activating NMI Watchdog...done
>> CPU#0 NMI appears to be stuck
>> testing the IO APIC.............
>> ..........................done
>> calibrating APIC timer...
>> .....CPU clock speed is 1285.2614 Mhz
>> ....host bus clock speed is 0.0000 Mhz
>> cpu:0, clocks:0, slice:0

Which kernel version?
I actually wouldn't expect the current local APIC or SMP code to
work perfectly on a P4, since there are many differences to P6/K7.
I scribbled some of them down a while ago (based on reading
the first rev of Intel's IA32 Vol3 for P4 manual):
- FEE000090 Arbitration Priority not supported in P4
- broadcast is 0xFF in P4
- flat cluster model is not supported in P4
- focus processor concept doesn't exist in P4
- "all excluding self" destination shorthand == "all including self"
in P4 if lowest-priority delivery mode is used (not recommended)
- SPIV bit 9 (focus) should be 0 on P4
- version is 0x14 and maxlvt is 5 on P4

2.4.7 apic.c enables the SPIV focus bit, maybe that's the problem.

/Mikael

2001-08-01 01:14:04

by Linus Torvalds

[permalink] [raw]
Subject: Re: booting SMP P6 kernel on P4 hangs.

In article <[email protected]> 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 fact that it gets to the point of saying "only one processor found"
definitely means that it found a MP table. However, that MP table
doesn't seem to actually describe the (single) CPU in a way that Linux
likes:

>> CPU0: Intel(R) Pentium(R) 4 CPU 1300 Mhz stepping 0a
>> per-CPU timeslice cutoff: 731.49 usecs
>> weird, boot CPU (#0) not listed by the BIOS

Notice?

It looks like your MP table does list a CPU, but it doesn't match the
CPU that is the boot CPU. So first Linux is unhappy about not finding
the boot CPU, but once it has added it it gets to the point of trying to
use the "other" CPU (the one described in the MP table):

>> CPU#0 NMI appears to be stuck
>> testing the IO APIC.............
>> ..........................done
>> calibrating APIC timer...
>> .....CPU clock speed is 1285.2614 Mhz
>> ....host bus clock speed is 0.0000 Mhz
>> cpu:0, clocks:0, slice:0

And yeah, that's not going anywhere.

The way Linux gets the boot CPU ID is by reading the APIC ID. It's
supposed to match the one in the MP table.

The reason "nosmp" works for you is that then we just ignore the MP
table, and just use the boot CPU without worrying about anything else.

Linus