Mercurial > illumos > illumos-gate
changeset 2985:78b075f897aa
6480953 system seems hung,invisible panic, on debug kernel, never gets to mp_startup
author | dmick |
---|---|
date | Thu, 26 Oct 2006 13:54:40 -0700 |
parents | 4cbdbc401db9 |
children | c782fcf7a319 |
files | usr/src/uts/i86pc/ml/mpcore.s usr/src/uts/i86pc/os/mp_startup.c |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/i86pc/ml/mpcore.s Thu Oct 26 12:33:58 2006 -0700 +++ b/usr/src/uts/i86pc/ml/mpcore.s Thu Oct 26 13:54:40 2006 -0700 @@ -2,9 +2,8 @@ * CDDL HEADER START * * The contents of this file are subject to the terms of the - * Common Development and Distribution License, Version 1.0 only - * (the "License"). You may not use this file except in compliance - * with the License. + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. * * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE * or http://www.opensolaris.org/os/licensing. @@ -50,7 +49,6 @@ * - We change over to using our IDT. * - We load the default LDT into the hardware LDT register. * - We load the default TSS into the hardware task register. - * - call ap_mlsetup(void) * - call mp_startup(void) indirectly through the T_PC * */ @@ -309,7 +307,6 @@ /* * Complete the rest of the setup and call mp_startup(). */ - call *ap_mlsetup movq %gs:CPU_THREAD, %rax /* get thread ptr */ call *T_PC(%rax) /* call mp_startup */ /* not reached */ @@ -557,7 +554,6 @@ /* * Complete the rest of the setup and call mp_startup(). */ - call *ap_mlsetup movq %gs:CPU_THREAD, %rax /* get thread ptr */ call *T_PC(%rax) /* call mp_startup */ /* not reached */ @@ -648,7 +644,6 @@ * that's how our page tables are set up. */ call *set_nxe_func - call *ap_mlsetup movl %gs:CPU_THREAD, %eax /* get thread ptr */ call *T_PC(%eax) /* call mp_startup */ /* not reached */ @@ -731,7 +726,6 @@ * that's how our page tables are set up. */ call *set_nxe_func - call *ap_mlsetup mov %gs:CPU_THREAD, %eax /* get thread ptr */ call *T_PC(%eax) /* call mp_startup */ /* not reached */
--- a/usr/src/uts/i86pc/os/mp_startup.c Thu Oct 26 12:33:58 2006 -0700 +++ b/usr/src/uts/i86pc/os/mp_startup.c Thu Oct 26 13:54:40 2006 -0700 @@ -1081,7 +1081,7 @@ /* * Startup function for 'other' CPUs (besides boot cpu). - * Called from real_mode_start (after *ap_mlsetup). + * Called from real_mode_start. * * WARNING: until CPU_READY is set, mp_startup and routines called by * mp_startup should not call routines (e.g. kmem_free) that could call @@ -1093,6 +1093,15 @@ struct cpu *cp = CPU; uint_t new_x86_feature; + /* + * Once this was done from assembly, but it's safer here; if + * it blocks, we need to be able to swtch() to and from, and + * since we get here by calling t_pc, we need to do that call + * before swtch() overwrites it. + */ + + (void) (*ap_mlsetup)(); + new_x86_feature = cpuid_pass1(cp); /*