* [PATCH] x86/efi: Fix 3DNow optimization build failure in EFI stub
@ 2014-08-04 22:52 Matt Fleming
[not found] ` <1407192735-26368-1-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Matt Fleming @ 2014-08-04 22:52 UTC (permalink / raw)
To: H. Peter Anvin
Cc: Ingo Molnar, linux-efi, linux-kernel, Matt Fleming,
Borislav Petkov, Thomas Gleixner
From: Matt Fleming <matt.fleming@intel.com>
Building a 32-bit kernel with CONFIG_X86_USE_3DNOW and CONFIG_EFI_STUB
leads to the following build error,
drivers/firmware/efi/libstub/lib.a(efi-stub-helper.o): In function `efi_relocate_kernel':
efi-stub-helper.c:(.text+0xda5): undefined reference to `_mmx_memcpy'
This is due to the fact that the EFI boot stub pulls in the 3DNow
optimized versions of the memcpy() prototype from
arch/x86/include/asm/string_32.h, even though the _mmx_memcpy()
implementation isn't available in the EFI stub.
For now, predicate CONFIG_EFI on !CONFIG_X86_USE_3DNOW. This is most
definitely a temporary fix. A complete solution will involve selectively
including kernel headers/symbols into the early-boot execution
environment of the EFI boot stub, i.e. something analogous to the way
that the _SETUP symbol is used.
Previous attempts have been made to fix this kind of problem, though
none seem to have ever been merged,
http://lkml.kernel.org/r/20120329104822.GA17233@x1.osrc.amd.com
Clearly, this problem has been around for a long time.
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 801ed36c2e49..fcad2e15e92a 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1520,7 +1520,7 @@ config X86_SMAP
config EFI
bool "EFI runtime service support"
- depends on ACPI
+ depends on ACPI && !X86_USE_3DNOW
select UCS2_STRING
select EFI_RUNTIME_WRAPPERS
---help---
--
1.9.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/efi: Fix 3DNow optimization build failure in EFI stub
2014-08-04 22:52 [PATCH] x86/efi: Fix 3DNow optimization build failure in EFI stub Matt Fleming
@ 2014-08-04 23:06 ` H. Peter Anvin
0 siblings, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2014-08-04 23:06 UTC (permalink / raw)
To: Matt Fleming
Cc: Ingo Molnar, linux-efi-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, Matt Fleming,
Borislav Petkov, Thomas Gleixner
On 08/04/2014 03:52 PM, Matt Fleming wrote:
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 801ed36c2e49..fcad2e15e92a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1520,7 +1520,7 @@ config X86_SMAP
>
> config EFI
> bool "EFI runtime service support"
> - depends on ACPI
> + depends on ACPI && !X86_USE_3DNOW
> select UCS2_STRING
> select EFI_RUNTIME_WRAPPERS
> ---help---
>
As we discussed over IRC, should be EFI_STUB not EFI. Once that is fixed:
Acked-by: H. Peter Anvin <hpa-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
... in case Ingo or Thomas grabs it before I do.
-hpa
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] x86/efi: Fix 3DNow optimization build failure in EFI stub
@ 2014-08-04 23:06 ` H. Peter Anvin
0 siblings, 0 replies; 3+ messages in thread
From: H. Peter Anvin @ 2014-08-04 23:06 UTC (permalink / raw)
To: Matt Fleming
Cc: Ingo Molnar, linux-efi, linux-kernel, Matt Fleming,
Borislav Petkov, Thomas Gleixner
On 08/04/2014 03:52 PM, Matt Fleming wrote:
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 801ed36c2e49..fcad2e15e92a 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1520,7 +1520,7 @@ config X86_SMAP
>
> config EFI
> bool "EFI runtime service support"
> - depends on ACPI
> + depends on ACPI && !X86_USE_3DNOW
> select UCS2_STRING
> select EFI_RUNTIME_WRAPPERS
> ---help---
>
As we discussed over IRC, should be EFI_STUB not EFI. Once that is fixed:
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
... in case Ingo or Thomas grabs it before I do.
-hpa
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-04 23:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-04 22:52 [PATCH] x86/efi: Fix 3DNow optimization build failure in EFI stub Matt Fleming
[not found] ` <1407192735-26368-1-git-send-email-matt-HNK1S37rvNbeXh+fF434Mdi2O/JbrIOy@public.gmane.org>
2014-08-04 23:06 ` H. Peter Anvin
2014-08-04 23:06 ` H. Peter Anvin
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.