summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2010-05-28 17:50:24 +0000
committerjhb <jhb@FreeBSD.org>2010-05-28 17:50:24 +0000
commitfa1b0e9a67ed2dcf395d7cd13ed6a11a453fb97f (patch)
tree56d5adf60bae5061f499f3b24fc13cef85408f09 /sys/i386
parente2c40a3a8f9479d1190c0ba121db0de18d02adc5 (diff)
downloadFreeBSD-src-fa1b0e9a67ed2dcf395d7cd13ed6a11a453fb97f.zip
FreeBSD-src-fa1b0e9a67ed2dcf395d7cd13ed6a11a453fb97f.tar.gz
Defer initializing machine checks for the boot CPU until the local APIC is
fully configured. MFC after: 1 month
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/machdep.c1
-rw-r--r--sys/i386/i386/mca.c13
2 files changed, 13 insertions, 1 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 38bce7a..0263321 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -328,7 +328,6 @@ cpu_startup(dummy)
#ifndef XEN
cpu_setregs();
#endif
- mca_init();
}
/*
diff --git a/sys/i386/i386/mca.c b/sys/i386/i386/mca.c
index 0552d86..ed3e7d4 100644
--- a/sys/i386/i386/mca.c
+++ b/sys/i386/i386/mca.c
@@ -812,6 +812,19 @@ mca_init(void)
load_cr4(rcr4() | CR4_MCE);
}
+/*
+ * The machine check registers for the BSP cannot be initialized until
+ * the local APIC is initialized. This happens at SI_SUB_CPU,
+ * SI_ORDER_SECOND.
+ */
+static void
+mca_init_bsp(void *arg __unused)
+{
+
+ mca_init();
+}
+SYSINIT(mca_init_bsp, SI_SUB_CPU, SI_ORDER_ANY, mca_init_bsp, NULL);
+
/* Called when a machine check exception fires. */
int
mca_intr(void)
OpenPOWER on IntegriCloud