All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@canonical.com>
To: Olof Johansson <olof@lixom.net>
Cc: matt@console-pimps.org, hpa@zytor.com,
	linux-kernel@vger.kernel.org, marko.kohtala@gmail.com,
	Matthew Garrett <mjg@redhat.com>
Subject: Re: [PATCH v2] x86: efi: Turn off efi_enabled after setup on mixed fw/kernel
Date: Wed, 24 Oct 2012 17:50:49 +0200	[thread overview]
Message-ID: <50880E59.3000309@canonical.com> (raw)
In-Reply-To: <CAOesGMiB3cDMOSz+t4Mhek5+AbyoRtoJHRu+_8TL=Ob+6uPSaA@mail.gmail.com>

Op 24-10-12 17:21, Olof Johansson schreef:
> Hi,
>
> On Wed, Oct 24, 2012 at 1:40 AM, Maarten Lankhorst
> <maarten.lankhorst@canonical.com> wrote:
>> Op 24-10-12 08:24, Olof Johansson schreef:
>>> When 32-bit EFI is used with 64-bit kernel (or vice versa), turn off
>>> efi_enabled once setup is done. Beyond setup, it is normally used to
>>> determine if runtime services are available and we will have none.
>>>
>>> This will resolve issues stemming from efivars modprobe panicking on a
>>> 32/64-bit setup, as well as some reboot issues on similar setups.
>>>
>>> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=45991
>>>
>>> Reported-by: Marko Kohtala <marko.kohtala@gmail.com>
>>> Reported-by: Maxim Kammerer <mk@dee.su>
>>> Signed-off-by: Olof Johansson <olof@lixom.net>
>>> Cc: stable@kernel.org # 3.4 - 3.6
>>> Cc: Matthew Garrett <mjg@redhat.com>
>>> Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
>>> ---
>>>
>>> v2: rebase due to context diffs, and simplified efi_is_native() logic.
>>>
>>>  arch/x86/kernel/setup.c     | 11 +++++++++++
>>>  arch/x86/platform/efi/efi.c | 16 +++++++++-------
>>>  2 files changed, 20 insertions(+), 7 deletions(-)
>>>
>>> diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c
>>> index 468e98d..ea2c587 100644
>>> --- a/arch/x86/kernel/setup.c
>>> +++ b/arch/x86/kernel/setup.c
>>> @@ -1048,6 +1048,17 @@ void __init setup_arch(char **cmdline_p)
>>>       arch_init_ideal_nops();
>>>
>>>       register_refined_jiffies(CLOCK_TICK_RATE);
>>> +
>>> +#ifdef CONFIG_EFI
>>> +     /* Once setup is done above, disable efi_enabled on mismatched
>>> +      * firmware/kernel archtectures since there is no support for
>>> +      * runtime services.
>>> +      */
>>> +     if (IS_ENABLED(CONFIG_X86_64) != efi_64bit) {
>>> +             pr_info("efi: Setup done, disabling due to 32/64-bit mismatch\n");
>>> +             efi_enabled = 0;
>>> +     }
>>> +#endif
>>>  }
>> Won't this give a spurious warning if it's already disabled?
> Ah, of course, my bad. v3 forthcoming.
>
>> And it should probably be moved to before the vga con setup, else it seems you
>> might not get a vga console when efifb is not used. Unless that's intentional,
>> but in that case please change the commit message to reflect that. :-)
> Hmm. I think the current logic and flow is valid -- it's likely a bad
> idea to enable VGA console if the memory isn't set aside in the memory
> map, since that possibly means that EFI didn't POST graphics for VGA
> text mode in the first place.
>
>> With those issues fixed in next version.
>>
>> Acked-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
> Please confirm if you agree with my reasoning above, I'll post v3
> right after if so.
>
Ack

  reply	other threads:[~2012-10-24 15:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-19 21:48 [PATCH] x86: efi: Turn off efi_enabled after setup on mixed fw/kernel Olof Johansson
2012-08-20  9:56 ` Matt Fleming
2012-08-20 10:13 ` Maarten Lankhorst
2012-08-20 21:59   ` Olof Johansson
2012-08-21 14:39     ` Matt Fleming
2012-08-21 14:53       ` H. Peter Anvin
2012-10-08 14:28 ` Matt Fleming
2012-10-24  6:24   ` [PATCH v2] " Olof Johansson
2012-10-24  8:40     ` Maarten Lankhorst
2012-10-24 15:21       ` Olof Johansson
2012-10-24 15:50         ` Maarten Lankhorst [this message]
2012-10-24 17:00     ` [PATCH v3] " Olof Johansson
2012-10-25 10:56       ` Matt Fleming
     [not found]       ` <1351098044-4586-1-git-send-email-olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
2012-10-25 13:20         ` Matt Fleming
2012-10-25 13:20           ` Matt Fleming
     [not found]           ` <1351171217.5303.13.camel-ZqTwcBeJ+wsBof6jY8KHXm7IUlhRatedral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2012-10-25 17:05             ` Olof Johansson
2012-10-25 17:05               ` Olof Johansson

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=50880E59.3000309@canonical.com \
    --to=maarten.lankhorst@canonical.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marko.kohtala@gmail.com \
    --cc=matt@console-pimps.org \
    --cc=mjg@redhat.com \
    --cc=olof@lixom.net \
    /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.