summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2012-03-16 12:13:44 +0000
committernyan <nyan@FreeBSD.org>2012-03-16 12:13:44 +0000
commitfbebe4e7770ae2d5b532ff04411d843acdf467ad (patch)
tree90e80268daa98a6b8c4c24918d5294a28dffe80f /sys/pc98
parent4b85eeee487e6f67ea0abed8467a06b679e81daa (diff)
downloadFreeBSD-src-fbebe4e7770ae2d5b532ff04411d843acdf467ad.zip
FreeBSD-src-fbebe4e7770ae2d5b532ff04411d843acdf467ad.tar.gz
- Fix to build a native i386 kernel without the SMP and atpic.
- Merge r232744 changes to pc98. (Allow a kernel to be built with 'nodevice atpic'.) - Move ICU related defines from x86/isa/atpic.c to x86/isa/icu.h and use them in x86/x86/intr_machdep.c. Reviewed by: jhb
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/pc98/machdep.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 9fdefaf..a51ceea 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -40,7 +40,9 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_apic.h"
#include "opt_atalk.h"
+#include "opt_atpic.h"
#include "opt_compat.h"
#include "opt_cpu.h"
#include "opt_ddb.h"
@@ -132,6 +134,10 @@ __FBSDID("$FreeBSD$");
#include <machine/smp.h>
#endif
+#ifdef DEV_APIC
+#include <machine/apicvar.h>
+#endif
+
#ifdef DEV_ISA
#include <x86/isa/icu.h>
#endif
@@ -2296,7 +2302,21 @@ init386(first)
printf("WARNING: loader(8) metadata is missing!\n");
#ifdef DEV_ISA
+#ifdef DEV_ATPIC
atpic_startup();
+#else
+ /* Reset and mask the atpics and leave them shut down. */
+ atpic_reset();
+
+ /*
+ * Point the ICU spurious interrupt vectors at the APIC spurious
+ * interrupt handler.
+ */
+ setidt(IDT_IO_INTS + 7, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL,
+ GSEL(GCODE_SEL, SEL_KPL));
+ setidt(IDT_IO_INTS + 15, IDTVEC(spuriousint), SDT_SYS386IGT, SEL_KPL,
+ GSEL(GCODE_SEL, SEL_KPL));
+#endif
#endif
#ifdef DDB
OpenPOWER on IntegriCloud