All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: JérômeCarretero <cJ-ko@zougloub.eu>
Cc: "Ingo Molnar" <mingo@kernel.org>,
	"Matt Fleming" <matt.fleming@linux.intel.com>,
	"Matthew Garrett" <mjg59@srcf.ucam.org>,
	<linux-efi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	"H. PeterAnvin" <hpa@zytor.com>
Subject: Re: [Regression] "x86-64/efi: Use EFI to deal with platform wall clock" prevents my machine from booting
Date: Tue, 07 Aug 2012 08:14:07 +0100	[thread overview]
Message-ID: <5020DC5F02000078000931C2@nat28.tlf.novell.com> (raw)
In-Reply-To: <20120806230629.153d33bd@zougloub.eu>

>>> On 07.08.12 at 05:06, JérômeCarretero <cJ-ko@zougloub.eu> wrote:
> On Mon, 6 Aug 2012 22:32:08 -0400
> Jérôme Carretero <cJ-ko@zougloub.eu> wrote:
> 
>> For troubleshooting purposes I edited over your patch.
>> So far:
>> [...]
>> Maybe I can get more...
> 
> With the following:
> 
> diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> index 2dc29f5..46729f3 100644
> --- a/arch/x86/platform/efi/efi.c
> +++ b/arch/x86/platform/efi/efi.c
> @@ -97,8 +97,9 @@ static efi_status_t virt_efi_get_time(efi_time_t *tm, 
> efi_time_cap_t *tc)
>         unsigned long flags;
>         efi_status_t status;
>  
> +       printk("%s: get_time=0x%p\n", __func__, 
> efi.systab->runtime->get_time);
>         spin_lock_irqsave(&rtc_lock, flags);
> -       status = efi_call_virt2(get_time, tm, tc);
> +       status = EFI_SUCCESS + 1;// efi_call_virt2(get_time, tm, tc);
>         spin_unlock_irqrestore(&rtc_lock, flags);
>         return status;
>  }
> @@ -270,8 +271,10 @@ static unsigned long efi_get_time(void)
>         efi_time_cap_t cap;
>  
>         status = efi.get_time(&eft, &cap);
> -       if (status != EFI_SUCCESS)
> -               pr_err("Oops: efitime: can't read time!\n");
> +       if (status != EFI_SUCCESS) {
> +               /* fall back to RTC time */
> +               return mach_get_cmos_time();
> +       }
>  
>         return mktime(eft.year, eft.month, eft.day, eft.hour,
>                       eft.minute, eft.second);
> 
> The system boots, at that point...

That's not surprising. The question really is what goes wrong
when the call is being made - page fault, some other fault, or
silent hang. A page fault would point to an incorrect memory
map as the prime candidate for causing the problem. My
primary suspect would be #NM, i.e. the implementation using
floating point (SSE to be precise) instructions when they're
unavailable.

> I would say my BIOS is broken,
> but it can be expected that others can have the same issue.

Likely. The question is whether we could make Linux be spec
compliant on sane systems _and_ tolerate broken ones like
this. But whether e.g. adding a command line option (or DMI-
based quirk) is appropriate depends on whether this really is
a firmware issue or a flaw in the patch.

Jan

  reply	other threads:[~2012-08-07  7:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-05 21:29 [Regression] "x86-64/efi: Use EFI to deal with platform wall clock" prevents my machine from booting Jérôme Carretero
2012-08-05 22:28 ` H. Peter Anvin
2012-08-06  6:44   ` Jan Beulich
2012-08-06 12:52     ` Matthew Garrett
2012-08-06 13:08       ` Jan Beulich
2012-08-06 13:16         ` Jérôme Carretero
2012-08-06 13:25           ` Jan Beulich
2012-08-06 23:29             ` Jérôme Carretero
2012-08-07  7:05               ` Jan Beulich
2012-08-07  2:32           ` Jérôme Carretero
2012-08-07  3:06             ` Jérôme Carretero
2012-08-07  7:14               ` Jan Beulich [this message]
2012-08-07  9:30                 ` Matt Fleming
2012-08-07 10:50                   ` Jan Beulich
2012-08-09  8:51                     ` Matt Fleming
2012-08-10 19:22                       ` Yinghai Lu
2012-08-10 19:26                         ` Matthew Garrett
2012-08-21 14:16                           ` Matt Fleming
2012-08-10  3:49                 ` Jérôme Carretero
2012-08-14 19:43 ` [tip:x86/urgent] Revert "x86-64/efi: Use EFI to deal with platform wall clock" tip-bot for H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5020DC5F02000078000931C2@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=cJ-ko@zougloub.eu \
    --cc=hpa@zytor.com \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt.fleming@linux.intel.com \
    --cc=mingo@kernel.org \
    --cc=mjg59@srcf.ucam.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.