public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] efi: Clarify Kconfig help for EFI_MIXED
@ 2014-04-11 17:59 Thomas Bächler
  2014-04-11 18:03 ` H. Peter Anvin
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bächler @ 2014-04-11 17:59 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel,
	Thomas Bächler

EFI stub support is only missing for a 64 bit kernel on 32-bit firmware,
on 64-bit kernels, EFI stub works as usual.
---

Matt, I don't know if this help was intentionally discouraging,
however, out of curiosity, I tested this with ovmf, and the
kernel boots fine on 64-bit firmware bit with EFI stub, and on
32-bit firmware using efilinux.

Documenting this properly is important for distribution kernels.
We would want to support this on Arch, but not if it means
introducing a regression for EFI stub users.

 arch/x86/Kconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5b8ec0f..2bbbbb9 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1529,8 +1529,8 @@ config EFI_MIXED
 	   mode.
 
 	   Note that it is not possible to boot a mixed-mode enabled
-	   kernel via the EFI boot stub - a bootloader that supports
-	   the EFI handover protocol must be used.
+	   kernel via the EFI boot stub on 32-bit firmware - a bootloader
+	   that supports the EFI handover protocol must be used.
 
 	   If unsure, say N.
 
-- 
1.9.2


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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-11 17:59 [PATCH] efi: Clarify Kconfig help for EFI_MIXED Thomas Bächler
@ 2014-04-11 18:03 ` H. Peter Anvin
  2014-04-11 18:44   ` Matt Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2014-04-11 18:03 UTC (permalink / raw)
  To: Thomas Bächler, Matt Fleming
  Cc: Thomas Gleixner, Ingo Molnar, x86, linux-kernel

On 04/11/2014 10:59 AM, Thomas Bächler wrote:
> EFI stub support is only missing for a 64 bit kernel on 32-bit firmware,
> on 64-bit kernels, EFI stub works as usual.
> ---
> 
> Matt, I don't know if this help was intentionally discouraging,
> however, out of curiosity, I tested this with ovmf, and the
> kernel boots fine on 64-bit firmware bit with EFI stub, and on
> 32-bit firmware using efilinux.
> 
> Documenting this properly is important for distribution kernels.
> We would want to support this on Arch, but not if it means
> introducing a regression for EFI stub users.
> 
>  arch/x86/Kconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 5b8ec0f..2bbbbb9 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1529,8 +1529,8 @@ config EFI_MIXED
>  	   mode.
>  
>  	   Note that it is not possible to boot a mixed-mode enabled
> -	   kernel via the EFI boot stub - a bootloader that supports
> -	   the EFI handover protocol must be used.
> +	   kernel via the EFI boot stub on 32-bit firmware - a bootloader
> +	   that supports the EFI handover protocol must be used.
>  
>  	   If unsure, say N.
>  

Right, it is really that it is not possible to boot a mixed-mode kernel
on its non-native firmware using the stub, since the stub itself can
only be one way or the other.

	-hpa



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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-11 18:03 ` H. Peter Anvin
@ 2014-04-11 18:44   ` Matt Fleming
  2014-04-14  7:15     ` Ingo Molnar
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Fleming @ 2014-04-11 18:44 UTC (permalink / raw)
  To: H. Peter Anvin
  Cc: Thomas Bächler, Matt Fleming, Thomas Gleixner, Ingo Molnar,
	x86, linux-kernel

On Fri, 11 Apr, at 11:03:13AM, H. Peter Anvin wrote:
> On 04/11/2014 10:59 AM, Thomas Bächler wrote:
> > EFI stub support is only missing for a 64 bit kernel on 32-bit firmware,
> > on 64-bit kernels, EFI stub works as usual.
> > ---
> > 
> > Matt, I don't know if this help was intentionally discouraging,
> > however, out of curiosity, I tested this with ovmf, and the
> > kernel boots fine on 64-bit firmware bit with EFI stub, and on
> > 32-bit firmware using efilinux.
> > 
> > Documenting this properly is important for distribution kernels.
> > We would want to support this on Arch, but not if it means
> > introducing a regression for EFI stub users.
> > 
> >  arch/x86/Kconfig | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index 5b8ec0f..2bbbbb9 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -1529,8 +1529,8 @@ config EFI_MIXED
> >  	   mode.
> >  
> >  	   Note that it is not possible to boot a mixed-mode enabled
> > -	   kernel via the EFI boot stub - a bootloader that supports
> > -	   the EFI handover protocol must be used.
> > +	   kernel via the EFI boot stub on 32-bit firmware - a bootloader
> > +	   that supports the EFI handover protocol must be used.
> >  
> >  	   If unsure, say N.
> >  
> 
> Right, it is really that it is not possible to boot a mixed-mode kernel
> on its non-native firmware using the stub, since the stub itself can
> only be one way or the other.

Yeah, my help text was a bit... unhelpful.

CONFIG_EFI_MIXED does not introduce a regression of any sort, you can
enable it without worrying about that.

All the boot configurations that used to work will continue to work.

What I meant to say was that it isn't possible to use the EFI mixed
*feature* (booting a 64-bit kernel with 32-bit firmware) with the EFI
boot stub - so you can build support into your kernel but there's no way
to make the CPU actually execute those code paths.

-- 
Matt Fleming, Intel Open Source Technology Center

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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-11 18:44   ` Matt Fleming
@ 2014-04-14  7:15     ` Ingo Molnar
  2014-04-14  8:28       ` Thomas Bächler
  0 siblings, 1 reply; 7+ messages in thread
From: Ingo Molnar @ 2014-04-14  7:15 UTC (permalink / raw)
  To: Matt Fleming
  Cc: H. Peter Anvin, Thomas Bächler, Matt Fleming,
	Thomas Gleixner, Ingo Molnar, x86, linux-kernel


* Matt Fleming <matt@console-pimps.org> wrote:

> On Fri, 11 Apr, at 11:03:13AM, H. Peter Anvin wrote:
> > On 04/11/2014 10:59 AM, Thomas Bächler wrote:
> > > EFI stub support is only missing for a 64 bit kernel on 32-bit firmware,
> > > on 64-bit kernels, EFI stub works as usual.
> > > ---
> > > 
> > > Matt, I don't know if this help was intentionally discouraging,
> > > however, out of curiosity, I tested this with ovmf, and the
> > > kernel boots fine on 64-bit firmware bit with EFI stub, and on
> > > 32-bit firmware using efilinux.
> > > 
> > > Documenting this properly is important for distribution kernels.
> > > We would want to support this on Arch, but not if it means
> > > introducing a regression for EFI stub users.
> > > 
> > >  arch/x86/Kconfig | 4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > > index 5b8ec0f..2bbbbb9 100644
> > > --- a/arch/x86/Kconfig
> > > +++ b/arch/x86/Kconfig
> > > @@ -1529,8 +1529,8 @@ config EFI_MIXED
> > >  	   mode.
> > >  
> > >  	   Note that it is not possible to boot a mixed-mode enabled
> > > -	   kernel via the EFI boot stub - a bootloader that supports
> > > -	   the EFI handover protocol must be used.
> > > +	   kernel via the EFI boot stub on 32-bit firmware - a bootloader
> > > +	   that supports the EFI handover protocol must be used.
> > >  
> > >  	   If unsure, say N.
> > >  
> > 
> > Right, it is really that it is not possible to boot a mixed-mode kernel
> > on its non-native firmware using the stub, since the stub itself can
> > only be one way or the other.
> 
> Yeah, my help text was a bit... unhelpful.
> 
> CONFIG_EFI_MIXED does not introduce a regression of any sort, you can
> enable it without worrying about that.
> 
> All the boot configurations that used to work will continue to work.
> 
> What I meant to say was that it isn't possible to use the EFI mixed 
> *feature* (booting a 64-bit kernel with 32-bit firmware) with the 
> EFI boot stub - so you can build support into your kernel but 
> there's no way to make the CPU actually execute those code paths.

Same goes for booting a 32-bit kernel on 64-bit firmware, right?

Thanks,

	Ingo

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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-14  7:15     ` Ingo Molnar
@ 2014-04-14  8:28       ` Thomas Bächler
  2014-04-14  9:33         ` Matt Fleming
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Bächler @ 2014-04-14  8:28 UTC (permalink / raw)
  To: Ingo Molnar, Matt Fleming
  Cc: H. Peter Anvin, Thomas Bächler, Matt Fleming,
	Thomas Gleixner, Ingo Molnar, x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

Am 14.04.2014 09:15, schrieb Ingo Molnar:
>>> Right, it is really that it is not possible to boot a mixed-mode kernel
>>> on its non-native firmware using the stub, since the stub itself can
>>> only be one way or the other.
>>
>> Yeah, my help text was a bit... unhelpful.
>>
>> CONFIG_EFI_MIXED does not introduce a regression of any sort, you can
>> enable it without worrying about that.
>>
>> All the boot configurations that used to work will continue to work.
>>
>> What I meant to say was that it isn't possible to use the EFI mixed 
>> *feature* (booting a 64-bit kernel with 32-bit firmware) with the 
>> EFI boot stub - so you can build support into your kernel but 
>> there's no way to make the CPU actually execute those code paths.
> 
> Same goes for booting a 32-bit kernel on 64-bit firmware, right?
> 

It seems that isn't implemented:

config EFI_MIXED
        bool "EFI mixed-mode support"
        depends on EFI_STUB && X86_64



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 901 bytes --]

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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-14  8:28       ` Thomas Bächler
@ 2014-04-14  9:33         ` Matt Fleming
  2014-04-14  9:47           ` Borislav Petkov
  0 siblings, 1 reply; 7+ messages in thread
From: Matt Fleming @ 2014-04-14  9:33 UTC (permalink / raw)
  To: Thomas Bächler
  Cc: Ingo Molnar, H. Peter Anvin, Matt Fleming, Thomas Gleixner,
	Ingo Molnar, x86, linux-kernel

On Mon, 14 Apr, at 10:28:02AM, Thomas Bächler wrote:
> Am 14.04.2014 09:15, schrieb Ingo Molnar:
> >>> Right, it is really that it is not possible to boot a mixed-mode kernel
> >>> on its non-native firmware using the stub, since the stub itself can
> >>> only be one way or the other.
> >>
> >> Yeah, my help text was a bit... unhelpful.
> >>
> >> CONFIG_EFI_MIXED does not introduce a regression of any sort, you can
> >> enable it without worrying about that.
> >>
> >> All the boot configurations that used to work will continue to work.
> >>
> >> What I meant to say was that it isn't possible to use the EFI mixed 
> >> *feature* (booting a 64-bit kernel with 32-bit firmware) with the 
> >> EFI boot stub - so you can build support into your kernel but 
> >> there's no way to make the CPU actually execute those code paths.
> > 
> > Same goes for booting a 32-bit kernel on 64-bit firmware, right?
> > 
> 
> It seems that isn't implemented:
> 
> config EFI_MIXED
>         bool "EFI mixed-mode support"
>         depends on EFI_STUB && X86_64
> 

Correct, since that would require translating 64-bit pointers from the
firmware into 32-bit pointers for the kernel, which isn't as straight
forward as the 32-bit firmware / 64-bit kernel case, i.e. ensure all
allocations are < 4GB and truncate 64-bit pointers when they're passed
to the firmware.

That and the fact that no one has said "We really need support".

-- 
Matt Fleming, Intel Open Source Technology Center

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

* Re: [PATCH] efi: Clarify Kconfig help for EFI_MIXED
  2014-04-14  9:33         ` Matt Fleming
@ 2014-04-14  9:47           ` Borislav Petkov
  0 siblings, 0 replies; 7+ messages in thread
From: Borislav Petkov @ 2014-04-14  9:47 UTC (permalink / raw)
  To: Matt Fleming
  Cc: Thomas Bächler, Ingo Molnar, H. Peter Anvin, Matt Fleming,
	Thomas Gleixner, Ingo Molnar, x86, linux-kernel

On Mon, Apr 14, 2014 at 10:33:32AM +0100, Matt Fleming wrote:
> That and the fact that no one has said "We really need support".

Don't be putting words in people's mouths :-)

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

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

end of thread, other threads:[~2014-04-14  9:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-11 17:59 [PATCH] efi: Clarify Kconfig help for EFI_MIXED Thomas Bächler
2014-04-11 18:03 ` H. Peter Anvin
2014-04-11 18:44   ` Matt Fleming
2014-04-14  7:15     ` Ingo Molnar
2014-04-14  8:28       ` Thomas Bächler
2014-04-14  9:33         ` Matt Fleming
2014-04-14  9:47           ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox