public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* booting SMP P6 kernel on P4 hangs.
@ 2001-07-31  6:10 Tigran Aivazian
  2001-07-31 17:57 ` Linus Torvalds
  0 siblings, 1 reply; 17+ messages in thread
From: Tigran Aivazian @ 2001-07-31  6:10 UTC (permalink / raw)
  To: linux-kernel

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


^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: booting SMP P6 kernel on P4 hangs.
@ 2001-07-31 10:45 Mikael Pettersson
  0 siblings, 0 replies; 17+ messages in thread
From: Mikael Pettersson @ 2001-07-31 10:45 UTC (permalink / raw)
  To: tigran; +Cc: linux-kernel

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

^ permalink raw reply	[flat|nested] 17+ messages in thread
* Re: booting SMP P6 kernel on P4 hangs.
@ 2001-08-01 16:00 Petr Vandrovec
  0 siblings, 0 replies; 17+ messages in thread
From: Petr Vandrovec @ 2001-08-01 16:00 UTC (permalink / raw)
  To: Tigran Aivazian; +Cc: Linus Torvalds, linux-kernel

On  1 Aug 01 at 10:47, Tigran Aivazian wrote:
> On Wed, 1 Aug 2001, Arjan van de Ven wrote:
> > Now all Linux installers that decide to install a SMP kernel if they
> > encounter
> > a MPTABLE already have a "except if it's a P4" exception nowadays..
> 
> that assumes that the installer itself has to be a UP kernel, which means
> the installation cannot itself serve as a "demo" of the final product in
> the fullest possible capacity... Not good, can't we workaround that
> somehow during parsing of the mp table?

MPTABLE is not what kills us. What kills us is stupid code
in setup_APIC_clocks(), which calls setup_APIC_timer even if 
calibrate_APIC_clock() finds that '...host bus clock speed is 0.0000 MHz'
But setup_APIC_timer does not handle this condition at all
and ends in endless loop waiting for internal APIC timer to decrement.
But for some unknown reason (either Intel braindamage or motherboard
vendor braindamage) most of (all?) P4 have just non-counting timer
in its APIC.

As I do not have P4 here, I do not know whether correct solution
is to disable APIC on P4 at all because of it does not work, or
whether only timer portion of APIC is broken on P4.

UNTESTED change could look like (btw it also fixes APIC aware Linux
kernel not booting in VMware on machine which has APIC):

void __int setup_APIC_clocks (void) {
      __cli();
      calibration_result = calibrate_APIC_clock();
      /*
       * Now set up the timer for real.
       */
      if (calibration_result) {
         using_apic_timer = 1;
         setup_APIC_timer((void*)calibration_result);
         __sti();
         printk("Using local APIC timer interrupts.\n");
         smp_call_function(setup_APIC_timer, (void*)calibration_result, 1, 1);
      } else {
         __sti();
         printk("Local APIC timer unusable.\n");
      }
}

                                            Best regards,
                                                Petr Vandrovec
                                                vandrove@vc.cvut.cz
                                                

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2001-08-06 15:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-07-31  6:10 booting SMP P6 kernel on P4 hangs Tigran Aivazian
2001-07-31 17:57 ` Linus Torvalds
2001-08-01  9:39   ` Arjan van de Ven
2001-08-01  9:47     ` Tigran Aivazian
2001-08-01 11:49     ` Maciej W. Rozycki
2001-08-02 12:30       ` Alan Cox
2001-08-02 14:00         ` john slee
2001-08-02 14:50           ` Alan Cox
2001-08-03  9:10             ` Chris Wedgwood
2001-08-03  8:50           ` Steffen Persvold
2001-08-01 16:18     ` Linus Torvalds
2001-08-02  0:51       ` Alan Cox
2001-08-03 10:48   ` Mark Hemment
2001-08-06 14:48     ` Maciej W. Rozycki
2001-08-06 15:08       ` Mark Hemment
  -- strict thread matches above, loose matches on Subject: below --
2001-07-31 10:45 Mikael Pettersson
2001-08-01 16:00 Petr Vandrovec

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox