From 15afc798fdf77f773564b68a80c7543f33b2a856 Mon Sep 17 00:00:00 2001 From: John Birrell Date: Tue, 9 Mar 2004 02:49:24 +0000 Subject: [PATCH] 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. --- sys/i386/i386/vm_machdep.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/i386/i386/vm_machdep.c b/sys/i386/i386/vm_machdep.c index b09128d483c..7007e54909a 100644 --- a/sys/i386/i386/vm_machdep.c +++ b/sys/i386/i386/vm_machdep.c @@ -43,6 +43,7 @@ #include __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 #include #include +#ifdef CPU_ELAN +#include +#endif #ifdef CPU_ELAN #include @@ -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