> interesting.  then why the delay in bringing up the AP?  Note in the
> dmesg output below, that the AP only comes up during th SCSI delay.  I
> have also added other comments to the following output.

The APs need the giant kernel lock when initializing the 
local APIC and printing the "launched" message.

I added code for bringing up the APs earlier, but had to disable it,
since it caused some machines to hang.  The APs were probably launched
too early, causing the BSP to attempt to send IPIs before the local
APIC was initialized).

A revised patch for bringing up the APs early is enclosed.

- Tor Egge

Index: mp_machdep.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/i386/mp_machdep.c,v
retrieving revision 1.102
diff -u -r1.102 mp_machdep.c
--- mp_machdep.c        1999/06/01 18:19:42     1.102
+++ mp_machdep.c        1999/06/08 00:27:19
@@ -494,6 +494,10 @@
 
 
 #if defined(APIC_IO)
+
+/* Wait for all APs to be fully initialized */
+extern int wait_ap(unsigned int);
+
 /*
  * Final configuration of the BSP's local APIC:
  *  - disable 'pic mode'.
@@ -526,6 +530,9 @@
 
        if (bootverbose)
                apic_dump("bsp_apic_configure()");
+       wait_ap(1000000);
+       if (smp_started == 0)
+               printf("WARNING: Failed to start all APs\n");
 }
 #endif  /* APIC_IO */
 
@@ -1743,9 +1750,6 @@
 #endif /* USE_CLOCKLOCK */
 }
 
-
-/* Wait for all APs to be fully initialized */
-extern int wait_ap(unsigned int);
 
 /*
  * start each AP in our list

Reply via email to