mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-16 10:20:30 +00:00
The APs now reload the interrupt descriptor table pointer after
f00f_hack has run. Use the global r_idt descriptor in f00f_hack when in SMP mode, so the APs find the relocated interrupt descriptor table. Submitted by: Partially from David A Adkins <adkin003@tc.umn.edu>
This commit is contained in:
parent
1ab7c6cc77
commit
1146c3560f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34197
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.290 1998/03/02 05:47:50 peter Exp $
|
||||
* $Id: machdep.c,v 1.291 1998/03/05 19:37:03 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1569,7 +1569,9 @@ SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
|
||||
|
||||
static void
|
||||
f00f_hack(void *unused) {
|
||||
#ifndef SMP
|
||||
struct region_descriptor r_idt;
|
||||
#endif
|
||||
vm_offset_t tmp;
|
||||
int i;
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* from: @(#)machdep.c 7.4 (Berkeley) 6/3/91
|
||||
* $Id: machdep.c,v 1.290 1998/03/02 05:47:50 peter Exp $
|
||||
* $Id: machdep.c,v 1.291 1998/03/05 19:37:03 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "apm.h"
|
||||
@ -1569,7 +1569,9 @@ SYSINIT(f00f_hack, SI_SUB_INTRINSIC, SI_ORDER_FIRST, f00f_hack, NULL);
|
||||
|
||||
static void
|
||||
f00f_hack(void *unused) {
|
||||
#ifndef SMP
|
||||
struct region_descriptor r_idt;
|
||||
#endif
|
||||
vm_offset_t tmp;
|
||||
int i;
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
@ -22,11 +22,12 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: mp_machdep.c,v 1.68 1998/03/03 20:55:25 tegge Exp $
|
||||
* $Id: mp_machdep.c,v 1.69 1998/03/03 22:56:24 tegge Exp $
|
||||
*/
|
||||
|
||||
#include "opt_smp.h"
|
||||
#include "opt_vm86.h"
|
||||
#include "opt_cpu.h"
|
||||
|
||||
#ifdef SMP
|
||||
#include <machine/smptests.h>
|
||||
@ -2056,6 +2057,10 @@ ap_init()
|
||||
|
||||
smp_cpus++;
|
||||
|
||||
#if defined(I586_CPU) && !defined(NO_F00F_HACK)
|
||||
lidt(&r_idt);
|
||||
#endif
|
||||
|
||||
/* Build our map of 'other' CPUs. */
|
||||
other_cpus = all_cpus & ~(1 << cpuid);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user