From: Ard Biesheuvel <ardb+git@google.com>
To: linux-efi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, x86@kernel.org,
Ard Biesheuvel <ardb@kernel.org>,
Tom Lendacky <thomas.lendacky@amd.com>,
Dionna Amalie Glaze <dionnaglaze@google.com>,
Kevin Loughlin <kevinloughlin@google.com>
Subject: [RFC PATCH 3/6] x86/boot: Move EFI mixed mode startup code back under arch/x86
Date: Tue, 1 Apr 2025 15:34:20 +0200 [thread overview]
Message-ID: <20250401133416.1436741-11-ardb+git@google.com> (raw)
In-Reply-To: <20250401133416.1436741-8-ardb+git@google.com>
From: Ard Biesheuvel <ardb@kernel.org>
Linus expressed a strong preference for arch-specific asm code (i.e.,
virtually all of it) to reside under arch/ rather than anywhere else.
So move the EFI mixed mode startup code back, and put it under
arch/x86/boot/startup/ where all shared x86 startup code is going to
live.
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
arch/x86/boot/startup/Makefile | 3 +++
drivers/firmware/efi/libstub/x86-mixed.S => arch/x86/boot/startup/efi-mixed.S | 0
drivers/firmware/efi/libstub/Makefile | 1 -
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/boot/startup/Makefile b/arch/x86/boot/startup/Makefile
index 03519ef4869d..73946a3f6b3b 100644
--- a/arch/x86/boot/startup/Makefile
+++ b/arch/x86/boot/startup/Makefile
@@ -1,3 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
+KBUILD_AFLAGS += -D__DISABLE_EXPORTS
+
lib-$(CONFIG_X86_64) += la57toggle.o
+lib-$(CONFIG_EFI_MIXED) += efi-mixed.o
diff --git a/drivers/firmware/efi/libstub/x86-mixed.S b/arch/x86/boot/startup/efi-mixed.S
similarity index 100%
rename from drivers/firmware/efi/libstub/x86-mixed.S
rename to arch/x86/boot/startup/efi-mixed.S
diff --git a/drivers/firmware/efi/libstub/Makefile b/drivers/firmware/efi/libstub/Makefile
index d23a1b9fed75..2f173391b63d 100644
--- a/drivers/firmware/efi/libstub/Makefile
+++ b/drivers/firmware/efi/libstub/Makefile
@@ -85,7 +85,6 @@ lib-$(CONFIG_EFI_GENERIC_STUB) += efi-stub.o string.o intrinsics.o systable.o \
lib-$(CONFIG_ARM) += arm32-stub.o
lib-$(CONFIG_ARM64) += kaslr.o arm64.o arm64-stub.o smbios.o
lib-$(CONFIG_X86) += x86-stub.o smbios.o
-lib-$(CONFIG_EFI_MIXED) += x86-mixed.o
lib-$(CONFIG_X86_64) += x86-5lvl.o
lib-$(CONFIG_RISCV) += kaslr.o riscv.o riscv-stub.o
lib-$(CONFIG_LOONGARCH) += loongarch.o loongarch-stub.o
--
2.49.0.472.ge94155a9ec-goog
next prev parent reply other threads:[~2025-04-01 13:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 13:34 [RFC PATCH 0/6] x86: Refactor and consolidate startup code Ard Biesheuvel
2025-04-01 13:34 ` [RFC PATCH 1/6] x86/boot/compressed: Merge local pgtable.h include into asm/boot.h Ard Biesheuvel
2025-04-06 18:33 ` [tip: x86/boot] x86/boot/compressed: Merge the local pgtable.h include into <asm/boot.h> tip-bot2 for Ard Biesheuvel
2025-04-01 13:34 ` [RFC PATCH 2/6] x86/boot: Move 5-level paging trampoline into startup code Ard Biesheuvel
2025-04-06 18:33 ` [tip: x86/boot] x86/boot: Move the 5-level paging trampoline into /startup tip-bot2 for Ard Biesheuvel
2025-04-01 13:34 ` Ard Biesheuvel [this message]
2025-04-06 18:33 ` [tip: x86/boot] x86/boot: Move the EFI mixed mode startup code back under arch/x86, into startup/ tip-bot2 for Ard Biesheuvel
2025-04-07 7:38 ` Aithal, Srikanth
2025-04-07 8:30 ` Ard Biesheuvel
2025-04-07 9:41 ` Aithal, Srikanth
2025-04-09 11:54 ` Aithal, Srikanth
2025-04-09 12:00 ` Ingo Molnar
2025-04-01 13:34 ` [RFC PATCH 4/6] x86/boot: Move early GDT/IDT setup code " Ard Biesheuvel
2025-04-06 18:33 ` [tip: x86/boot] x86/boot: Move the " tip-bot2 for Ard Biesheuvel
2025-04-01 13:34 ` [RFC PATCH 5/6] x86/boot: Move early kernel mapping " Ard Biesheuvel
2025-04-06 18:32 ` [tip: x86/boot] x86/boot: Move the " tip-bot2 for Ard Biesheuvel
2025-04-06 18:51 ` [RFC PATCH 5/6] x86/boot: Move " Ingo Molnar
2025-04-06 19:24 ` Ard Biesheuvel
2025-04-01 13:34 ` [RFC PATCH 6/6] x86/boot: Move early SME init " Ard Biesheuvel
2025-04-06 18:32 ` [tip: x86/boot] x86/boot: Move the " tip-bot2 for Ard Biesheuvel
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=20250401133416.1436741-11-ardb+git@google.com \
--to=ardb+git@google.com \
--cc=ardb@kernel.org \
--cc=dionnaglaze@google.com \
--cc=kevinloughlin@google.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
--cc=x86@kernel.org \
/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