* [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
@ 2011-06-09 14:32 Matthew Garrett
2011-06-09 14:34 ` Peter Jones
2011-06-09 14:37 ` H. Peter Anvin
0 siblings, 2 replies; 7+ messages in thread
From: Matthew Garrett @ 2011-06-09 14:32 UTC (permalink / raw)
To: x86; +Cc: hpa, linux-kernel, pjones, Matthew Garrett
EFI doesn't provide any guarantees that any given address will be free,
so the bootloader must have the freedom to position the kernel
appropriately. Make CONFIG_EFI select CONFIG_RELOCATABLE in order to
ensure that this constraint is satisfiable.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
---
arch/x86/Kconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index da34972..580cd31 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1454,6 +1454,7 @@ config ARCH_USES_PG_UNCACHED
config EFI
bool "EFI runtime service support"
depends on ACPI
+ select RELOCATABLE
---help---
This enables the kernel to use EFI runtime services that are
available (such as the EFI variable services).
--
1.7.5.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 14:32 [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE Matthew Garrett
@ 2011-06-09 14:34 ` Peter Jones
2011-06-09 14:37 ` H. Peter Anvin
1 sibling, 0 replies; 7+ messages in thread
From: Peter Jones @ 2011-06-09 14:34 UTC (permalink / raw)
To: Matthew Garrett; +Cc: x86, hpa, linux-kernel
On 06/09/2011 10:32 AM, Matthew Garrett wrote:
> EFI doesn't provide any guarantees that any given address will be free,
> so the bootloader must have the freedom to position the kernel
> appropriately. Make CONFIG_EFI select CONFIG_RELOCATABLE in order to
> ensure that this constraint is satisfiable.
>
> Signed-off-by: Matthew Garrett<mjg@redhat.com>
Yeah, this is a requirement by the UEFI spec.
Signed-off-by: Peter Jones <pjones@redhat.com>
> ---
> arch/x86/Kconfig | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index da34972..580cd31 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1454,6 +1454,7 @@ config ARCH_USES_PG_UNCACHED
> config EFI
> bool "EFI runtime service support"
> depends on ACPI
> + select RELOCATABLE
> ---help---
> This enables the kernel to use EFI runtime services that are
> available (such as the EFI variable services).
--
Peter
All parts should go together without forcing. You must remember that
the parts you are reassembling were disassembled by you. Therefore,
if you can't get them together again, there must be a reason. By all
means, do not use a hammer.
-- IBM maintenance manual, 1925
01234567890123456789012345678901234567890123456789012345678901234567890123456789
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 14:32 [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE Matthew Garrett
2011-06-09 14:34 ` Peter Jones
@ 2011-06-09 14:37 ` H. Peter Anvin
2011-06-09 14:41 ` Peter Jones
2011-06-09 14:47 ` Matthew Garrett
1 sibling, 2 replies; 7+ messages in thread
From: H. Peter Anvin @ 2011-06-09 14:37 UTC (permalink / raw)
To: Matthew Garrett; +Cc: x86, linux-kernel, pjones
On 06/09/2011 07:32 AM, Matthew Garrett wrote:
> EFI doesn't provide any guarantees that any given address will be free,
> so the bootloader must have the freedom to position the kernel
> appropriately. Make CONFIG_EFI select CONFIG_RELOCATABLE in order to
> ensure that this constraint is satisfiable.
>
> Signed-off-by: Matthew Garrett <mjg@redhat.com>
> ---
> arch/x86/Kconfig | 1 +
> 1 files changed, 1 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index da34972..580cd31 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1454,6 +1454,7 @@ config ARCH_USES_PG_UNCACHED
> config EFI
> bool "EFI runtime service support"
> depends on ACPI
> + select RELOCATABLE
> ---help---
> This enables the kernel to use EFI runtime services that are
> available (such as the EFI variable services).
Can we make this a depends on instead of select?
-hpa
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 14:37 ` H. Peter Anvin
@ 2011-06-09 14:41 ` Peter Jones
2011-06-09 15:23 ` H. Peter Anvin
2011-06-09 14:47 ` Matthew Garrett
1 sibling, 1 reply; 7+ messages in thread
From: Peter Jones @ 2011-06-09 14:41 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Matthew Garrett, x86, linux-kernel
On 06/09/2011 10:37 AM, H. Peter Anvin wrote:
> On 06/09/2011 07:32 AM, Matthew Garrett wrote:
>> EFI doesn't provide any guarantees that any given address will be free,
>> so the bootloader must have the freedom to position the kernel
>> appropriately. Make CONFIG_EFI select CONFIG_RELOCATABLE in order to
>> ensure that this constraint is satisfiable.
>>
>> Signed-off-by: Matthew Garrett<mjg@redhat.com>
>> ---
>> arch/x86/Kconfig | 1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>>
>> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
>> index da34972..580cd31 100644
>> --- a/arch/x86/Kconfig
>> +++ b/arch/x86/Kconfig
>> @@ -1454,6 +1454,7 @@ config ARCH_USES_PG_UNCACHED
>> config EFI
>> bool "EFI runtime service support"
>> depends on ACPI
>> + select RELOCATABLE
>> ---help---
>> This enables the kernel to use EFI runtime services that are
>> available (such as the EFI variable services).
>
> Can we make this a depends on instead of select?
Seems weird to me - when you're configuring the kernel, you're more likely
to know that you want EFI than to remember that that requires relocation.
--
Peter
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 14:37 ` H. Peter Anvin
2011-06-09 14:41 ` Peter Jones
@ 2011-06-09 14:47 ` Matthew Garrett
1 sibling, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2011-06-09 14:47 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: x86, linux-kernel, pjones
On Thu, Jun 09, 2011 at 07:37:31AM -0700, H. Peter Anvin wrote:
> On 06/09/2011 07:32 AM, Matthew Garrett wrote:
> > config EFI
> > bool "EFI runtime service support"
> > depends on ACPI
> > + select RELOCATABLE
> > ---help---
> > This enables the kernel to use EFI runtime services that are
> > available (such as the EFI variable services).
>
> Can we make this a depends on instead of select?
CONFIG_RELOCATABLE has no dependencies so select should be safe, and
depends means CONFIG_EFI vanishes until you turn on something that seems
entirely unrelated. I've no problem with it being depends, but this
seems friendlier.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 14:41 ` Peter Jones
@ 2011-06-09 15:23 ` H. Peter Anvin
2011-06-09 15:35 ` Matthew Garrett
0 siblings, 1 reply; 7+ messages in thread
From: H. Peter Anvin @ 2011-06-09 15:23 UTC (permalink / raw)
To: Peter Jones; +Cc: Matthew Garrett, x86, linux-kernel
On 06/09/2011 07:41 AM, Peter Jones wrote:
>>
>> Can we make this a depends on instead of select?
>
> Seems weird to me - when you're configuring the kernel, you're more likely
> to know that you want EFI than to remember that that requires relocation.
>
Yes, but "select" is handled very poorly by Kconfig.
-hpa
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE
2011-06-09 15:23 ` H. Peter Anvin
@ 2011-06-09 15:35 ` Matthew Garrett
0 siblings, 0 replies; 7+ messages in thread
From: Matthew Garrett @ 2011-06-09 15:35 UTC (permalink / raw)
To: H. Peter Anvin; +Cc: Peter Jones, x86, linux-kernel
On Thu, Jun 09, 2011 at 08:23:48AM -0700, H. Peter Anvin wrote:
> On 06/09/2011 07:41 AM, Peter Jones wrote:
> >>
> >> Can we make this a depends on instead of select?
> >
> > Seems weird to me - when you're configuring the kernel, you're more likely
> > to know that you want EFI than to remember that that requires relocation.
> >
>
> Yes, but "select" is handled very poorly by Kconfig.
I think it's safe in this case.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-06-09 15:35 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-09 14:32 [PATCH] x86: CONFIG_EFI should select CONFIG_RELOCATABLE Matthew Garrett
2011-06-09 14:34 ` Peter Jones
2011-06-09 14:37 ` H. Peter Anvin
2011-06-09 14:41 ` Peter Jones
2011-06-09 15:23 ` H. Peter Anvin
2011-06-09 15:35 ` Matthew Garrett
2011-06-09 14:47 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox