summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortegge <tegge@FreeBSD.org>1998-03-07 20:16:49 +0000
committertegge <tegge@FreeBSD.org>1998-03-07 20:16:49 +0000
commit8644d41f2db3203f8a67363f52bf7155fe15878a (patch)
treeaa2cc21c7ee8d42ebca2c4120ca19bfa71855931
parent1fd7c195a523382100dc2d4c50a8108b6fb9cc79 (diff)
downloadFreeBSD-src-8644d41f2db3203f8a67363f52bf7155fe15878a.zip
FreeBSD-src-8644d41f2db3203f8a67363f52bf7155fe15878a.tar.gz
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>
-rw-r--r--sys/amd64/amd64/machdep.c4
-rw-r--r--sys/amd64/amd64/mp_machdep.c7
-rw-r--r--sys/amd64/amd64/mptable.c7
-rw-r--r--sys/amd64/include/mptable.h7
-rw-r--r--sys/i386/i386/machdep.c4
-rw-r--r--sys/i386/i386/mp_machdep.c7
-rw-r--r--sys/i386/i386/mptable.c7
-rw-r--r--sys/i386/include/mptable.h7
-rw-r--r--sys/kern/subr_smp.c7
9 files changed, 48 insertions, 9 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 8f03687..14f0edc 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -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;
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index d5bfeeb..aa6adb9 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -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);
diff --git a/sys/amd64/amd64/mptable.c b/sys/amd64/amd64/mptable.c
index d5bfeeb..aa6adb9 100644
--- a/sys/amd64/amd64/mptable.c
+++ b/sys/amd64/amd64/mptable.c
@@ -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);
diff --git a/sys/amd64/include/mptable.h b/sys/amd64/include/mptable.h
index d5bfeeb..aa6adb9 100644
--- a/sys/amd64/include/mptable.h
+++ b/sys/amd64/include/mptable.h
@@ -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);
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 8f03687..14f0edc 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -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;
diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c
index d5bfeeb..aa6adb9 100644
--- a/sys/i386/i386/mp_machdep.c
+++ b/sys/i386/i386/mp_machdep.c
@@ -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);
diff --git a/sys/i386/i386/mptable.c b/sys/i386/i386/mptable.c
index d5bfeeb..aa6adb9 100644
--- a/sys/i386/i386/mptable.c
+++ b/sys/i386/i386/mptable.c
@@ -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);
diff --git a/sys/i386/include/mptable.h b/sys/i386/include/mptable.h
index d5bfeeb..aa6adb9 100644
--- a/sys/i386/include/mptable.h
+++ b/sys/i386/include/mptable.h
@@ -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);
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index d5bfeeb..aa6adb9 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -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);
OpenPOWER on IntegriCloud