summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/initcpu.c
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1998-05-16 14:38:10 +0000
committerkato <kato@FreeBSD.org>1998-05-16 14:38:10 +0000
commit25a6c2ae414c7fea74d1708ce98637e020fbff96 (patch)
treed7963274876393767cc8d878e44268e4e5c06ee8 /sys/amd64/amd64/initcpu.c
parent44ca09f404f89542338097f47043ac679dc4b7e9 (diff)
downloadFreeBSD-src-25a6c2ae414c7fea74d1708ce98637e020fbff96.zip
FreeBSD-src-25a6c2ae414c7fea74d1708ce98637e020fbff96.tar.gz
Disable local APIC in UP kernel. Intel specification update describes
that local APIC should be disabled in UP system. However, some of old BIOS does not disable local APIC, and virtual wire mode through local APIC may cause int 15.
Diffstat (limited to 'sys/amd64/amd64/initcpu.c')
-rw-r--r--sys/amd64/amd64/initcpu.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/sys/amd64/amd64/initcpu.c b/sys/amd64/amd64/initcpu.c
index 42a0777..3849299 100644
--- a/sys/amd64/amd64/initcpu.c
+++ b/sys/amd64/amd64/initcpu.c
@@ -26,7 +26,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: initcpu.c,v 1.11 1998/01/03 05:35:51 kato Exp $
+ * $Id: initcpu.c,v 1.12 1998/02/04 03:47:14 eivind Exp $
*/
#include "opt_cpu.h"
@@ -54,6 +54,7 @@ static void init_6x86(void);
#ifdef I686_CPU
static void init_6x86MX(void);
+static void init_ppro(void);
#endif
#ifdef I486_CPU
@@ -433,6 +434,21 @@ init_6x86MX(void)
write_eflags(eflags);
}
+
+static void
+init_ppro(void)
+{
+#ifndef SMP
+ quad_t apicbase;
+
+ /*
+ * Local APIC should be diabled in UP kernel.
+ */
+ apicbase = rdmsr(0x1b);
+ apicbase &= ~0x800LL;
+ wrmsr(0x1b, apicbase);
+#endif
+}
#endif /* I686_CPU */
void
@@ -466,6 +482,11 @@ initializecpu(void)
case CPU_M2:
init_6x86MX();
break;
+ case CPU_686:
+ if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
+ (cpu_id & 0xff0) == 0x610)
+ init_ppro();
+ break;
#endif
default:
break;
OpenPOWER on IntegriCloud