Source-Changes-HG archive

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

[src/netbsd-8]: src/sys/arch/x86/x86 Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/ee108e809340
branches:  netbsd-8
changeset: 850828:ee108e809340
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Jul 14 08:41:18 2017 +0000

description:
Pull up following revision(s) (requested by nonaka in ticket #135):
        sys/arch/x86/x86/lapic.c: revision 1.60
PR/52266: Before access MSR[APICBASE], need to check if APIC is present.

diffstat:

 sys/arch/x86/x86/lapic.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r 7f1791251e82 -r ee108e809340 sys/arch/x86/x86/lapic.c
--- a/sys/arch/x86/x86/lapic.c  Wed Jul 12 13:58:38 2017 +0000
+++ b/sys/arch/x86/x86/lapic.c  Fri Jul 14 08:41:18 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lapic.c,v 1.58.2.1 2017/07/10 12:26:21 martin Exp $    */
+/*     $NetBSD: lapic.c,v 1.58.2.2 2017/07/14 08:41:18 martin Exp $    */
 
 /*-
  * Copyright (c) 2000, 2008 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.58.2.1 2017/07/10 12:26:21 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lapic.c,v 1.58.2.2 2017/07/14 08:41:18 martin Exp $");
 
 #include "acpica.h"
 #include "ioapic.h"
@@ -237,7 +237,8 @@
 {
        uint64_t msr;
 
-       if (rdmsr_safe(MSR_APICBASE, &msr) == EFAULT)
+       if (!ISSET(cpu_feature[0], CPUID_APIC) ||
+           rdmsr_safe(MSR_APICBASE, &msr) == EFAULT)
                return false;
        return (msr & (APICBASE_EN | APICBASE_EXTD)) ==
            (APICBASE_EN | APICBASE_EXTD);



Home | Main Index | Thread Index | Old Index