All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Matt Fleming <matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
Cc: "H. Peter Anvin" <hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>,
	LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Matt Fleming
	<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Dave Young <dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH] x86/boot: EFI_MIXED should not prohibit loading above 4G
Date: Mon, 9 Jun 2014 10:15:12 -0400	[thread overview]
Message-ID: <20140609141512.GA22049@redhat.com> (raw)
In-Reply-To: <CADknwL7Jeh82W3=rEqGqh=37zpqhmMuP1jy+DDq9vb2gQ+9hzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Mon, Jun 09, 2014 at 02:18:54PM +0100, Matt Fleming wrote:
> On 9 June 2014 13:54, Vivek Goyal <vgoyal-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > Hi Matt,
> >
> > So with new kexec syscall I have written 64bit bzImage loader. For now
> > I would like to detect this situation and disable loading and once
> > 32bit loader gets implemented it can take care of loading bzImage below
> > 4G.
> 
> What situation do you want to detect? You want to detect when it's
> impossible to load a kernel above 4G in the kexec path because you're
> booting with 32-bit EFI firmware?

Yes.

> 
> > So how do I find out if EFI is 32bit.
> 
> efi_enabled(EFI_64BIT) will tell you that, but you probably also want
> to check that EFI runtime services are actually usable with
> efi_enabled(EFI_RUNTIME_SERVICES) since if they're not, you'll never
> call into the firmware so it doesn't matter where you load the kernel
> (this may happen with "noefi" kernel parameter).

Ok, thanks. Or I can check whether EFI run time map is there or not. I am
assuming that efi runtime services are not enabled, then run time map
will not be there either.

Thanks
Vivek

WARNING: multiple messages have this Message-ID (diff)
From: Vivek Goyal <vgoyal@redhat.com>
To: Matt Fleming <matt@console-pimps.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-efi@vger.kernel.org, Matt Fleming <matt.fleming@intel.com>,
	Dave Young <dyoung@redhat.com>
Subject: Re: [PATCH] x86/boot: EFI_MIXED should not prohibit loading above 4G
Date: Mon, 9 Jun 2014 10:15:12 -0400	[thread overview]
Message-ID: <20140609141512.GA22049@redhat.com> (raw)
In-Reply-To: <CADknwL7Jeh82W3=rEqGqh=37zpqhmMuP1jy+DDq9vb2gQ+9hzg@mail.gmail.com>

On Mon, Jun 09, 2014 at 02:18:54PM +0100, Matt Fleming wrote:
> On 9 June 2014 13:54, Vivek Goyal <vgoyal@redhat.com> wrote:
> > Hi Matt,
> >
> > So with new kexec syscall I have written 64bit bzImage loader. For now
> > I would like to detect this situation and disable loading and once
> > 32bit loader gets implemented it can take care of loading bzImage below
> > 4G.
> 
> What situation do you want to detect? You want to detect when it's
> impossible to load a kernel above 4G in the kexec path because you're
> booting with 32-bit EFI firmware?

Yes.

> 
> > So how do I find out if EFI is 32bit.
> 
> efi_enabled(EFI_64BIT) will tell you that, but you probably also want
> to check that EFI runtime services are actually usable with
> efi_enabled(EFI_RUNTIME_SERVICES) since if they're not, you'll never
> call into the firmware so it doesn't matter where you load the kernel
> (this may happen with "noefi" kernel parameter).

Ok, thanks. Or I can check whether EFI run time map is there or not. I am
assuming that efi runtime services are not enabled, then run time map
will not be there either.

Thanks
Vivek

  parent reply	other threads:[~2014-06-09 14:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1402140380-15377-1-git-send-email-matt@console-pimps.org>
2014-06-07 16:33 ` [tip:x86/urgent] x86/boot: EFI_MIXED should not prohibit loading above 4G tip-bot for Matt Fleming
     [not found] ` <1402140380-15377-1-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-06-09 12:54   ` [PATCH] " Vivek Goyal
2014-06-09 12:54     ` Vivek Goyal
2014-06-09 13:18     ` Matt Fleming
     [not found]       ` <CADknwL7Jeh82W3=rEqGqh=37zpqhmMuP1jy+DDq9vb2gQ+9hzg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-09 14:15         ` Vivek Goyal [this message]
2014-06-09 14:15           ` Vivek Goyal
     [not found]           ` <20140609141512.GA22049-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-06-09 14:25             ` Matt Fleming
2014-06-09 14:25               ` Matt Fleming
     [not found]               ` <20140609142559.GE27302-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-06-09 14:32                 ` Vivek Goyal
2014-06-09 14:32                   ` Vivek Goyal

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=20140609141512.GA22049@redhat.com \
    --to=vgoyal-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=dyoung-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=hpa-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org \
    --cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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.