From: Matt Fleming <matt@console-pimps.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@kernel.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
Matt Fleming <matt.fleming@intel.com>,
Borislav Petkov <bp@suse.de>,
Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH v2] x86/efi: Fix 3DNow optimization build failure in EFI stub
Date: Tue, 5 Aug 2014 00:12:19 +0100 [thread overview]
Message-ID: <1407193939-27813-1-git-send-email-matt@console-pimps.org> (raw)
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_STUB 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>
---
v2: Only disallow CONFIG_X86_USE_3DNOW for EFI_STUB, not for the EFI
runtime services.
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 801ed36c2e49..7ea8aaaab7fc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1536,7 +1536,7 @@ config EFI
config EFI_STUB
bool "EFI stub support"
- depends on EFI
+ depends on EFI && !X86_USE_3DNOW
---help---
This kernel feature allows a bzImage to be loaded directly
by EFI firmware without the use of a bootloader.
--
1.9.0
next reply other threads:[~2014-08-04 23:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-04 23:12 Matt Fleming [this message]
2014-08-04 23:31 ` [tip:x86/efi] x86/efi: Fix 3DNow optimization build failure in EFI stub tip-bot for Matt Fleming
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=1407193939-27813-1-git-send-email-matt@console-pimps.org \
--to=matt@console-pimps.org \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt.fleming@intel.com \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
/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 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).