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 Transmeta Crusoe CPU



Kimihiro Nonaka wrote:

> Could you try the following patch.
> 
> diff --git a/sys/arch/x86/x86/lapic.c b/sys/arch/x86/x86/lapic.c
> index 20822a67184..372e9f8c0c2 100644
> --- a/sys/arch/x86/x86/lapic.c
> +++ b/sys/arch/x86/x86/lapic.c
> @@ -235,10 +235,12 @@ lapic_enable_x2apic(void)
>  bool
>  lapic_is_x2apic(void)
>  {
> -    uint64_t r;
> +    uint64_t msr;
> 
> -    r = rdmsr(MSR_APICBASE);
> -    return (r & (APICBASE_EN | APICBASE_EXTD)) == (APICBASE_EN |
> APICBASE_EXTD);
> +    if (rdmsr_safe(MSR_APICBASE, &msr) == EFAULT)
> +        return false;
> +    return (msr & (APICBASE_EN | APICBASE_EXTD)) ==
> +        (APICBASE_EN | APICBASE_EXTD);
>  }
> 
>  /*

This works (tested on netbsd-8 branch).  Thank you!

Can you please commit and pull up to the netbsd-8 branch?

Cheers,
Simon.


Home | Main Index | Thread Index | Old Index