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
The following reply was made to PR port-i386/52266; it has been noted by GNATS.
From: Simon Burge <simonb%NetBSD.org@localhost>
To: Kimihiro Nonaka <nonakap%gmail.com@localhost>
Cc: "gnats-bugs%netbsd.org@localhost" <gnats-bugs%netbsd.org@localhost>,
"gnats-admin%netbsd.org@localhost" <gnats-admin%netbsd.org@localhost>,
"netbsd-bugs%netbsd.org@localhost" <netbsd-bugs%netbsd.org@localhost>,
Andreas Gustafsson <gson%gson.org@localhost>
Subject: Re: port-i386/52266: Double fault early in boot with Transmeta Crusoe CPU
Date: Sun, 09 Jul 2017 00:24:35 +1000
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