From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1pwQbD-0000aO-Fc for mharc-grub-devel@gnu.org; Tue, 09 May 2023 12:54:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQbB-0000a7-U6 for grub-devel@gnu.org; Tue, 09 May 2023 12:54:01 -0400 Received: from dfw.source.kernel.org ([139.178.84.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pwQb9-0003X5-Qi for grub-devel@gnu.org; Tue, 09 May 2023 12:54:01 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A7EFB62707; Tue, 9 May 2023 16:53:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 127C3C433D2; Tue, 9 May 2023 16:53:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683651230; bh=4MNkZj6V3sJodXmBJ5u7Iak9ud4czP9tFmT6KB/+fE8=; h=From:To:Cc:Subject:Date:From; b=Eh+1Vmvuw/lMGF+HihkvUxg6+LuIzEZiVkzKjmE3ui+Larfv/eeXYCjrwKxq++/Rt IvkrGM5w5kIBKkOjYsKMY3ygq3crSLPlBMKHRljDRaE7IP9STAo8q0scxjKMpPVEmT QOT/4QKG5/cuuQOipw9SmnNT6PhIUoSjHaYN37/WfDG6andnNbXimi9/osNekTHIzf lCiMABMlFGgfPYr8Kk4tdkGNq/rjS7sdb6gG4x7NZUWJOXdCGstfmEqME78KZg/b0p 3T9GzIf0b8hHuRD3lfDr42b5qhhryjo1xb8s/dVHTr1VfYH9MDiptVAI2P06WzId4c rGSfH1Lg28gfg== From: Ard Biesheuvel To: grub-devel@gnu.org Cc: dkiper@net-space.pl, Ard Biesheuvel Subject: [PATCH 0/5] efi: Implement generic EFI boot for x86_64 Date: Tue, 9 May 2023 18:53:36 +0200 Message-Id: <20230509165341.1609558-1-ardb@kernel.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2155; i=ardb@kernel.org; h=from:subject; bh=4MNkZj6V3sJodXmBJ5u7Iak9ud4czP9tFmT6KB/+fE8=; b=owGbwMvMwCFmkMcZplerG8N4Wi2JISWqqq/MXMb+tYzj1Mu71lTxdS1hbp634rrv0bXcuic3z D9R++JJRykLgxgHg6yYIovA7L/vdp6eKFXrPEsWZg4rE8gQBi5OAZiIziJGhh+tAX6tj+bs33// g+3Xn+Unjqxx6L2mKDxnjrfz50Sr6y8YGWaqdVnK7Vy7nG3t8k0hX4r/BNQvWmwskq1kIfLHJX2 9Fx8A X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.178.84.217; envelope-from=ardb@kernel.org; helo=dfw.source.kernel.org X-Spam_score_int: -70 X-Spam_score: -7.1 X-Spam_bar: ------- X-Spam_report: (-7.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_HI=-5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2023 16:54:02 -0000 Switch the x86_64-efi build to the generic EFI loader, which enters the Linux kernel via the EFI stub and provides the initrd via the LoadFile2 protocol. This unifies x86_64 with other EFI architectures, and removes the dependency on the setup header and struct bootparams. Do some preparatory cleanup first, so we no longer need to rely on the MS to SysV calling convention translation code. Ard Biesheuvel (5): efi: Make EFI PXE protocol methods non-callable efi: Add calling convention annotation to all prototypes efi: Drop all uses of efi_call_XX wrappers efi: Remove x86_64 call wrappers efi: Use generic EFI loader for x86_64 grub-core/Makefile.core.def | 7 +- grub-core/commands/acpi.c | 8 +- grub-core/commands/efi/efitextmode.c | 8 +- grub-core/commands/efi/lsefi.c | 5 +- grub-core/commands/efi/tpm.c | 21 +- grub-core/disk/efi/efidisk.c | 7 +- grub-core/kern/arm/efi/init.c | 12 +- grub-core/kern/efi/efi.c | 56 +- grub-core/kern/efi/init.c | 15 +- grub-core/kern/efi/mm.c | 19 +- grub-core/kern/i386/efi/tsc.c | 2 +- grub-core/kern/ia64/efi/init.c | 15 +- grub-core/kern/x86_64/efi/callwrap.S | 129 ---- grub-core/lib/efi/datetime.c | 9 +- grub-core/lib/efi/halt.c | 4 +- grub-core/lib/efi/relocator.c | 6 +- grub-core/loader/efi/appleloader.c | 8 +- grub-core/loader/efi/chainloader.c | 20 +- grub-core/loader/efi/linux.c | 12 + grub-core/mmap/efi/mmap.c | 16 +- grub-core/net/drivers/efi/efinet.c | 26 +- grub-core/term/efi/console.c | 29 +- grub-core/term/efi/serial.c | 18 +- grub-core/video/efi_gop.c | 18 +- grub-core/video/efi_uga.c | 8 +- include/grub/efi/api.h | 666 +++++++++----------- include/grub/efi/efi.h | 2 + include/grub/efi/tpm.h | 149 +++-- 28 files changed, 562 insertions(+), 733 deletions(-) delete mode 100644 grub-core/kern/x86_64/efi/callwrap.S -- 2.39.2