Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/x86/x86 Match lapic conditionals from the primary CPU.



details:   https://anonhg.NetBSD.org/src/rev/04d4fe38622f
branches:  trunk
changeset: 329156:04d4fe38622f
user:      joerg <joerg%NetBSD.org@localhost>
date:      Mon May 12 11:56:02 2014 +0000

description:
Match lapic conditionals from the primary CPU.

diffstat:

 sys/arch/x86/x86/cpu.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r ce3bf6367578 -r 04d4fe38622f sys/arch/x86/x86/cpu.c
--- a/sys/arch/x86/x86/cpu.c    Mon May 12 11:55:39 2014 +0000
+++ b/sys/arch/x86/x86/cpu.c    Mon May 12 11:56:02 2014 +0000
@@ -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_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 @@
        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");



Home | Main Index | Thread Index | Old Index