kern: Prepare to split SI_BOOT2_SMP into multi-stages
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Jun 2011 07:19:28 +0000 (15:19 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Wed, 1 Jun 2011 09:31:02 +0000 (17:31 +0800)
sys/platform/pc32/i386/machdep.c
sys/platform/pc64/x86_64/machdep.c
sys/platform/vkernel/i386/autoconf.c
sys/platform/vkernel64/x86_64/autoconf.c
sys/sys/kernel.h

index 98f6302..3a5a3c8 100644 (file)
@@ -143,7 +143,7 @@ extern void ffs_rawread_setup(void);
 #endif /* DIRECTIO */
 static void init_locks(void);
 
-SYSINIT(cpu, SI_BOOT2_SMP, SI_ORDER_FIRST, cpu_startup, NULL)
+SYSINIT(cpu, SI_BOOT2_START_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
 
 int    _udatasel, _ucodesel;
 u_int  atdevbase;
index 0336032..88bda85 100644 (file)
@@ -146,7 +146,7 @@ extern void ffs_rawread_setup(void);
 #endif /* DIRECTIO */
 static void init_locks(void);
 
-SYSINIT(cpu, SI_BOOT2_SMP, SI_ORDER_FIRST, cpu_startup, NULL)
+SYSINIT(cpu, SI_BOOT2_START_CPU, SI_ORDER_FIRST, cpu_startup, NULL)
 
 #ifdef DDB
 extern vm_offset_t ksym_start, ksym_end;
index 476d0cf..d5d2808 100644 (file)
@@ -106,7 +106,7 @@ static void pxe_setup_nfsdiskless(void);
 #endif
 #endif
 
-SYSINIT(cpu, SI_BOOT2_SMP, SI_ORDER_FIRST, cpu_startup, NULL);
+SYSINIT(cpu, SI_BOOT2_START_CPU, SI_ORDER_FIRST, cpu_startup, NULL);
 SYSINIT(configure1, SI_SUB_CONFIGURE, SI_ORDER_FIRST, configure_first, NULL);
 /* SI_ORDER_SECOND is hookable */
 SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
index 0dd1511..4319ede 100644 (file)
@@ -105,7 +105,7 @@ static void pxe_setup_nfsdiskless(void);
 #endif
 #endif
 
-SYSINIT(cpu, SI_BOOT2_SMP, SI_ORDER_FIRST, cpu_startup, NULL);
+SYSINIT(cpu, SI_BOOT2_START_CPU, SI_ORDER_FIRST, cpu_startup, NULL);
 SYSINIT(configure1, SI_SUB_CONFIGURE, SI_ORDER_FIRST, configure_first, NULL);
 /* SI_ORDER_SECOND is hookable */
 SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL);
index e7cc77b..73f3124 100644 (file)
@@ -128,8 +128,13 @@ enum sysinit_sub_id {
         * must occur before SMP.  Messy messy.
         */
        SI_BOOT2_LEAVE_CRIT     = 0x1900000,
-       SI_BOOT2_PRESMP         = 0x1a00000,    /* register smp configs */
-       SI_BOOT2_SMP            = 0x1a80000,    /* SMP startup */
+       SI_BOOT2_PRESMP         = 0x1a00000,    /* register SMP configs */
+       SI_BOOT2_START_CPU      = 0x1a40000,    /* start CPU (BSP) */
+       SI_BOOT2_LAPIC          = 0x1a50000,    /* configure Local APIC */
+       SI_BOOT2_START_APS      = 0x1a60000,    /* start all APs */
+       SI_BOOT2_IOAPIC         = 0x1a70000,    /* configure I/O APIC */
+       SI_BOOT2_FINISH_PIC     = 0x1a80000,    /* finish PIC configure */
+       SI_BOOT2_FINISH_CPU     = 0x1a90000,    /* finish CPU startup */
        SI_BOOT2_CLOCKREG       = 0x1ac0000,    /* register available clocks */
        SI_BOOT2_OBJCACHE       = 0x1b00000,
        SI_BOOT2_SOFTCLOCK      = 0x1b80000,