NetBSD-Bugs archive

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

Re: port-i386/52266: Double fault early in boot with AMD Am5x86 CPU



Hi,

2017-07-09 14:45 GMT+09:00 John D. Baker <jdbaker%mylinuxisp.com@localhost>:

>  Just to double check, I grabbed:
>
>    http://nycdn.netbsd.org/pub/NetBSD-daily/HEAD/201707082110Z/i386/binary/kernel/netbsd-GENERIC.gz
>
>  and it panics on the net4501 the same as my locally-built kernels:

Could you try the following patch?

diff --git a/sys/arch/x86/x86/lapic.c b/sys/arch/x86/x86/lapic.c
index 415bb65b4e5..f87de042054 100644
--- a/sys/arch/x86/x86/lapic.c
+++ b/sys/arch/x86/x86/lapic.c
@@ -237,7 +237,8 @@ lapic_is_x2apic(void)
 {
     uint64_t msr;

-    if (rdmsr_safe(MSR_APICBASE, &msr) == EFAULT)
+    if (!ISSET(cpu_feature[0], CPUID_MSR) ||
+        rdmsr_safe(MSR_APICBASE, &msr) == EFAULT)
         return false;
     return (msr & (APICBASE_EN | APICBASE_EXTD)) ==
         (APICBASE_EN | APICBASE_EXTD);

Regards,
-- 
Kimihiro Nonaka


Home | Main Index | Thread Index | Old Index