linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: default CONFIG_EFI_STUB=y
@ 2013-08-09 15:23 H. Peter Anvin
       [not found] ` <52050985.9070107-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2013-08-09 15:23 UTC (permalink / raw)
  To: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

I would like to change the defaults for CONFIG_EFI and CONFIG_EFI_STUB
to y.  There is little reason to omit this since EFI now is a
significant percentage of all systems.

	-hpa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found] ` <52050985.9070107-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2013-08-09 15:32   ` James Bottomley
       [not found]     ` <1376062345.2087.16.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2013-08-09 15:32 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On Fri, 2013-08-09 at 08:23 -0700, H. Peter Anvin wrote:
> I would like to change the defaults for CONFIG_EFI and CONFIG_EFI_STUB
> to y.  There is little reason to omit this since EFI now is a
> significant percentage of all systems.

You didn't actually attach the patch, but I presume this is for 64 bit
compiles on x86 only?  We still have significant problems getting 64 bit
EFI to interact with 32 bit kernels, so I don't believe we should enable
CONFIG_EFI globally for all of x86.

James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]     ` <1376062345.2087.16.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2013-08-09 15:38       ` H. Peter Anvin
       [not found]         ` <52050D03.4030805-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2013-08-09 15:38 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On 08/09/2013 08:32 AM, James Bottomley wrote:
> On Fri, 2013-08-09 at 08:23 -0700, H. Peter Anvin wrote:
>> I would like to change the defaults for CONFIG_EFI and CONFIG_EFI_STUB
>> to y.  There is little reason to omit this since EFI now is a
>> significant percentage of all systems.
> 
> You didn't actually attach the patch, but I presume this is for 64 bit
> compiles on x86 only?  We still have significant problems getting 64 bit
> EFI to interact with 32 bit kernels, so I don't believe we should enable
> CONFIG_EFI globally for all of x86.
> 

Well, it doesn't *solve* the problem with cross-mode, but it should work
as-is for EFI32->32-bit kernel and EFI64->64-bit kernel.  For the
cross-mode kernels they will simply not do anything.

Either way, nothing bad should come from it.  The worst thing that will
happen is that the kernel says "I don't have any EFI that I recognize."

Cross-mode support will always require a secondary bootloader (since as
far as I know there is no concept of "fat binaries" for EFI), but Matt
Fleming is working on genuine cross-mode support for both the boot stub
and (eventually) run time support.

	-hpa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]         ` <52050D03.4030805-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2013-08-13 18:30           ` H. Peter Anvin
       [not found]             ` <520A7B48.3020304-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2013-08-13 18:30 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On 08/09/2013 08:38 AM, H. Peter Anvin wrote:
> On 08/09/2013 08:32 AM, James Bottomley wrote:
>> On Fri, 2013-08-09 at 08:23 -0700, H. Peter Anvin wrote:
>>> I would like to change the defaults for CONFIG_EFI and CONFIG_EFI_STUB
>>> to y.  There is little reason to omit this since EFI now is a
>>> significant percentage of all systems.
>>
>> You didn't actually attach the patch, but I presume this is for 64 bit
>> compiles on x86 only?  We still have significant problems getting 64 bit
>> EFI to interact with 32 bit kernels, so I don't believe we should enable
>> CONFIG_EFI globally for all of x86.
>>
> 
> Well, it doesn't *solve* the problem with cross-mode, but it should work
> as-is for EFI32->32-bit kernel and EFI64->64-bit kernel.  For the
> cross-mode kernels they will simply not do anything.
> 
> Either way, nothing bad should come from it.  The worst thing that will
> happen is that the kernel says "I don't have any EFI that I recognize."
> 
> Cross-mode support will always require a secondary bootloader (since as
> far as I know there is no concept of "fat binaries" for EFI), but Matt
> Fleming is working on genuine cross-mode support for both the boot stub
> and (eventually) run time support.
> 

James, does this address your concerns?

	-hpa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]             ` <520A7B48.3020304-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2013-08-13 18:43               ` James Bottomley
  2013-08-13 18:52                 ` H. Peter Anvin
       [not found]                 ` <1376419410.3467.67.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  0 siblings, 2 replies; 9+ messages in thread
From: James Bottomley @ 2013-08-13 18:43 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On Tue, 2013-08-13 at 11:30 -0700, H. Peter Anvin wrote:
> On 08/09/2013 08:38 AM, H. Peter Anvin wrote:
> > On 08/09/2013 08:32 AM, James Bottomley wrote:
> >> On Fri, 2013-08-09 at 08:23 -0700, H. Peter Anvin wrote:
> >>> I would like to change the defaults for CONFIG_EFI and CONFIG_EFI_STUB
> >>> to y.  There is little reason to omit this since EFI now is a
> >>> significant percentage of all systems.
> >>
> >> You didn't actually attach the patch, but I presume this is for 64 bit
> >> compiles on x86 only?  We still have significant problems getting 64 bit
> >> EFI to interact with 32 bit kernels, so I don't believe we should enable
> >> CONFIG_EFI globally for all of x86.
> >>
> > 
> > Well, it doesn't *solve* the problem with cross-mode, but it should work
> > as-is for EFI32->32-bit kernel and EFI64->64-bit kernel.  For the
> > cross-mode kernels they will simply not do anything.
> > 
> > Either way, nothing bad should come from it.  The worst thing that will
> > happen is that the kernel says "I don't have any EFI that I recognize."
> > 
> > Cross-mode support will always require a secondary bootloader (since as
> > far as I know there is no concept of "fat binaries" for EFI), but Matt
> > Fleming is working on genuine cross-mode support for both the boot stub
> > and (eventually) run time support.
> > 
> 
> James, does this address your concerns?

You mean for globally enabling CONFIG_EFI on x86?  not really for 32
bit, you say above it's pretty much unusable; I'd prefer just to enable
it for 64 bit.  As you said in your original post "since EFI now is a
significant percentage of all systems" but you actually mean EFI64 ...
EFI32 is a pretty insignificant percentage of all systems.

Can we actually boot a 32 bit kernel on an EFI64 system?  The last time
I tried on my Secure Boot SDV it wouldn't work; the problem is getting
someting in the transfer of control path to boot the processor back to
32 bit mode.

James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
  2013-08-13 18:43               ` James Bottomley
@ 2013-08-13 18:52                 ` H. Peter Anvin
       [not found]                   ` <520A8054.1030108-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
       [not found]                 ` <1376419410.3467.67.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 9+ messages in thread
From: H. Peter Anvin @ 2013-08-13 18:52 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi@vger.kernel.org, Linux Kernel Mailing List,
	Matt Fleming

On 08/13/2013 11:43 AM, James Bottomley wrote:
>> James, does this address your concerns?
> 
> You mean for globally enabling CONFIG_EFI on x86?  not really for 32
> bit, you say above it's pretty much unusable; I'd prefer just to enable
> it for 64 bit.  As you said in your original post "since EFI now is a
> significant percentage of all systems" but you actually mean EFI64 ...
> EFI32 is a pretty insignificant percentage of all systems.

For better or worse, there will be more.

> Can we actually boot a 32 bit kernel on an EFI64 system?  The last time
> I tried on my Secure Boot SDV it wouldn't work; the problem is getting
> someting in the transfer of control path to boot the processor back to
> 32 bit mode.

We can boot with a bootloader in "skip stub" mode; no runtime services
yet.  We are working on making it possible to boot via a EFI stub in
assisted mode (still needing a bootloader, but with the boot stub in the
kernel.)

Runtime services will be the last piece, obviously, but even that looks
reasonably doable.

	-hpa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]                   ` <520A8054.1030108-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
@ 2013-08-13 19:02                     ` James Bottomley
       [not found]                       ` <1376420525.3467.70.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: James Bottomley @ 2013-08-13 19:02 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On Tue, 2013-08-13 at 11:52 -0700, H. Peter Anvin wrote:
> On 08/13/2013 11:43 AM, James Bottomley wrote:
> > Can we actually boot a 32 bit kernel on an EFI64 system?  The last time
> > I tried on my Secure Boot SDV it wouldn't work; the problem is getting
> > someting in the transfer of control path to boot the processor back to
> > 32 bit mode.
> 
> We can boot with a bootloader in "skip stub" mode; no runtime services
> yet.

So the bootloader has to do the 64->32 transition?

>   We are working on making it possible to boot via a EFI stub in
> assisted mode (still needing a bootloader, but with the boot stub in the
> kernel.)
> 
> Runtime services will be the last piece, obviously, but even that looks
> reasonably doable.

So why not start with the working case (default to EFI on 64 bit) and
add in the mostly non-working case (default to EFI on 32 bit) when it
actually mostly works?

James

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]                       ` <1376420525.3467.70.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2013-08-13 19:06                         ` H. Peter Anvin
  0 siblings, 0 replies; 9+ messages in thread
From: H. Peter Anvin @ 2013-08-13 19:06 UTC (permalink / raw)
  To: James Bottomley
  Cc: Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On 08/13/2013 12:02 PM, James Bottomley wrote:
> On Tue, 2013-08-13 at 11:52 -0700, H. Peter Anvin wrote:
>> On 08/13/2013 11:43 AM, James Bottomley wrote:
>>> Can we actually boot a 32 bit kernel on an EFI64 system?  The last time
>>> I tried on my Secure Boot SDV it wouldn't work; the problem is getting
>>> someting in the transfer of control path to boot the processor back to
>>> 32 bit mode.
>>
>> We can boot with a bootloader in "skip stub" mode; no runtime services
>> yet.
> 
> So the bootloader has to do the 64->32 transition?
> 
Currently, yes.

>>   We are working on making it possible to boot via a EFI stub in
>> assisted mode (still needing a bootloader, but with the boot stub in the
>> kernel.)
>>
>> Runtime services will be the last piece, obviously, but even that looks
>> reasonably doable.
> 
> So why not start with the working case (default to EFI on 64 bit) and
> add in the mostly non-working case (default to EFI on 32 bit) when it
> actually mostly works?

We can do that, but I really hate making gratuitous differences between
32 and 64 bits... we have too many of those already.

	-hpa

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: RFC: default CONFIG_EFI_STUB=y
       [not found]                 ` <1376419410.3467.67.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
@ 2013-08-15  5:15                   ` Matthew Garrett
  0 siblings, 0 replies; 9+ messages in thread
From: Matthew Garrett @ 2013-08-15  5:15 UTC (permalink / raw)
  To: James Bottomley
  Cc: H. Peter Anvin, Ingo Molnar, Thomas Gleixner, Linus Torvalds,
	linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux Kernel Mailing List, Matt Fleming

On Tue, Aug 13, 2013 at 11:43:30AM -0700, James Bottomley wrote:

> Can we actually boot a 32 bit kernel on an EFI64 system?  The last time
> I tried on my Secure Boot SDV it wouldn't work; the problem is getting
> someting in the transfer of control path to boot the processor back to
> 32 bit mode.

In theory, as long as you jump to the 32-bit entry point having already 
set the cpu to that mode. The linux command in grub2 ought to do that.

-- 
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-15  5:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-09 15:23 RFC: default CONFIG_EFI_STUB=y H. Peter Anvin
     [not found] ` <52050985.9070107-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-08-09 15:32   ` James Bottomley
     [not found]     ` <1376062345.2087.16.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2013-08-09 15:38       ` H. Peter Anvin
     [not found]         ` <52050D03.4030805-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-08-13 18:30           ` H. Peter Anvin
     [not found]             ` <520A7B48.3020304-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-08-13 18:43               ` James Bottomley
2013-08-13 18:52                 ` H. Peter Anvin
     [not found]                   ` <520A8054.1030108-YMNOUZJC4hwAvxtiuMwx3w@public.gmane.org>
2013-08-13 19:02                     ` James Bottomley
     [not found]                       ` <1376420525.3467.70.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2013-08-13 19:06                         ` H. Peter Anvin
     [not found]                 ` <1376419410.3467.67.camel-sFMDBYUN5F8GjUHQrlYNx2Wm91YjaHnnhRte9Li2A+AAvxtiuMwx3w@public.gmane.org>
2013-08-15  5:15                   ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).