summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>2004-03-09 02:49:24 +0000
committerjb <jb@FreeBSD.org>2004-03-09 02:49:24 +0000
commit1fdc6e57d5d3b5e473d7e3b037afcb0f08e05880 (patch)
treea1ccd8c4a11cf38fb9a993e21d8060229661902a
parente9062915d30751c7edfb1855484e1aaeca783ca6 (diff)
downloadFreeBSD-src-1fdc6e57d5d3b5e473d7e3b037afcb0f08e05880.zip
FreeBSD-src-1fdc6e57d5d3b5e473d7e3b037afcb0f08e05880.tar.gz
AMD's ELAN documentation says that you write to the SYS_RST register
in the Memory Mapped Configuration Region (MMCR) to reset the CPU. If CPU_ELAN is set, try this first to reset the CPU before the traditional way. Without this change, my Compulab board powers down on 'reset' instead of rebooting.
-rw-r--r--sys/i386/i386/vm_machdep.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c
index b09128d..7007e54 100644
--- a/sys/i386/i386/vm_machdep.c
+++ b/sys/i386/i386/vm_machdep.c
@@ -43,6 +43,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_cpu.h"
#include "opt_isa.h"
#include "opt_kstack_pages.h"
#include "opt_npx.h"
@@ -77,6 +78,9 @@ __FBSDID("$FreeBSD$");
#include <machine/pcb.h>
#include <machine/pcb_ext.h>
#include <machine/vm86.h>
+#ifdef CPU_ELAN
+#include <machine/elan_mmcr.h>
+#endif
#ifdef CPU_ELAN
#include <machine/elan_mmcr.h>
@@ -559,6 +563,12 @@ cpu_reset_real()
}
outb(0xf0, 0x00); /* Reset. */
#else
+#ifdef CPU_ELAN
+ if (elan_mmcr != NULL)
+ /* SYS_RST */
+ elan_mmcr->RESCFG = 1;
+#endif
+
/*
* Attempt to do a CPU reset via the keyboard controller,
* do not turn of the GateA20, as any machine that fails
OpenPOWER on IntegriCloud