Module Name: src
Committed By: joerg
Date: Mon May 12 11:56:02 UTC 2014
Modified Files:
src/sys/arch/x86/x86: cpu.c
Log Message:
Match lapic conditionals from the primary CPU.
To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/x86/x86/cpu.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.110 src/sys/arch/x86/x86/cpu.c:1.111
--- src/sys/arch/x86/x86/cpu.c:1.110 Tue Feb 25 22:16:52 2014
+++ src/sys/arch/x86/x86/cpu.c Mon May 12 11:56:02 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.110 2014/02/25 22:16:52 dsl Exp $ */
+/* $NetBSD: cpu.c,v 1.111 2014/05/12 11:56:02 joerg Exp $ */
/*-
* Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.110 2014/02/25 22:16:52 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.111 2014/05/12 11:56:02 joerg Exp $");
#include "opt_ddb.h"
#include "opt_mpbios.h" /* for MPDEBUG */
@@ -855,9 +855,11 @@ cpu_hatch(void *v)
cpu_init_idt();
gdt_init_cpu(ci);
+#if NLAPIC > 0
lapic_enable();
lapic_set_lvt();
lapic_initclocks();
+#endif
fpuinit(ci);
lldt(GSYSSEL(GLDT_SEL, SEL_KPL));
@@ -1039,7 +1041,9 @@ mp_cpu_start(struct cpu_info *ci, paddr_
dwordptr[0] = 0;
dwordptr[1] = target >> 4;
+#if NLAPIC > 0
memcpy((uint8_t *)cmos_data_mapping + 0x467, dwordptr, 4);
+#endif
if ((cpu_feature[0] & CPUID_APIC) == 0) {
aprint_error("mp_cpu_start: CPU does not have APIC\n");