From patchwork Mon May 2 11:17:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 12834138 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5120EC433F5 for ; Mon, 2 May 2022 11:18:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+d3MjqaEqA5fPBve4Fp7Q029w+DeTN2YQeFFSzr0j14=; b=nC4pasNk5iBMZB G7xODYYD70+OzM/Xn+gBpL1x6ALHNzVOUOoB9j1Z6RNDyG46ztMjgCaf32SSC1p7vgAycA9WnP3S9 QWZEdogzETRjvN4L2ZUKuQZqVsoZ/D3DT6R1haT0W93ALHLH6uXwcLXAbYd36DnllKzUpomePXqKO Gl78Qjj2iIiFxusX29YHJGHikI/6JoARnH/5zZRcOippvw9j6vqp1ziQml/MQvsjdC5Iltcd3Wgn0 7z3MJ8Eztci7ryvzkeZPZz+r3+UtEM2APEnXjPZdv9HIokE9bBH5ERg4JjTktbyaozUNR5j/hWrgg nOuZedjLC9OQo48nQcVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlU3i-000umE-Fq; Mon, 02 May 2022 11:17:42 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nlU3Q-000ui3-FG for linux-arm-kernel@lists.infradead.org; Mon, 02 May 2022 11:17:25 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 332EBB8162C; Mon, 2 May 2022 11:17:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41F0FC385AF; Mon, 2 May 2022 11:17:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1651490242; bh=GkYFnxMu4KkGdGXijx6fJDyeOKqT+h0EwHNgiNnnBK8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fv//++GuSKeLCwJG0gn1sKviE01NtlO/W4IDmpeVyOgPI8GvzHiEiMWb1PdtbHTFp CJg2HCtZ11W3S0M3m1DEq5XVRiCh70TjR3BwYc6cBIr31Oezrmj0eZol7eV4KGdVgl ewNSwer5OWRd0E0Gu4BButn62mMXobZjd06FBoUsEH4lPRuc/LdN4rJfMTuIRQOBM9 5luOlQ1PSPJVCCpDDZ222wzRKLbMn4jAlKaMt98znzeB5jQX3nPV8kBZ11d52Up+kB orSqqAZrWGjtw4C+kpIR2wbOB7esOjOvlhGYh5yOYpyu2cZ2qd/yDdlE1k0/mJzsLz Vl9VBugZXaV+g== From: Ard Biesheuvel To: linux-efi@vger.kernel.org, linux-arch@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, will@kernel.org, Ard Biesheuvel , Arnd Bergmann , Huacai Chen Subject: [RFC PATCH 1/4] efi: stub: add prototypes for load_image and start_image Date: Mon, 2 May 2022 13:17:07 +0200 Message-Id: <20220502111710.4093567-2-ardb@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220502111710.4093567-1-ardb@kernel.org> References: <20220502111710.4093567-1-ardb@kernel.org> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1131; h=from:subject; bh=GkYFnxMu4KkGdGXijx6fJDyeOKqT+h0EwHNgiNnnBK8=; b=owEB7QES/pANAwAKAcNPIjmS2Y8kAcsmYgBib72xIBginCS26tW5lPV0Am+u4nhJKhJfv1OdqDDX FHO8zTCJAbMEAAEKAB0WIQT72WJ8QGnJQhU3VynDTyI5ktmPJAUCYm+9sQAKCRDDTyI5ktmPJL/kC/ 9aJ94BcWsWtSXHbvFgQFseIjMD/xVQlRiq0W0pgfRdZ74ZlP+i0B5JnOu0/2AhGBePPFgMJmsExJET RyGDtQ/S8mLOU3l1px97P09uJCStb6XI8Cwfw/f65W7v2KOEKyZbm+r8vcF0USzj1mddWj6C31gtus uYnjSkRAIYQZcucrEl6O9MTEHofL9qGxVtMtGeFabmbYg83sj8io0PzgutsIE5MZA504XPRIk71HAN 6lzSk82PAJ1EeUVAMBLcEdom6LQ9RXq+4Tf5A7dyw7l4ggMu5kgnEg5cVSnYekw6dgC6db4fjgmu6Q zPTKB2iYApDh3lfR5EOVzPDg+IT/GXvzzZORTU1sv/PTAOsWPEe7OAPF6JBqYfDP1A64KpkNMmXqnt NG5/1mYLJOKHhf2uXpqChn5IrDnLHsS/i7RuWHjZW29KLfsoLNKOmwh5RvEhxnhFYgvHrnBEi4csSi Zd7PwT4pyylClq8BwWZXtVV1z1PD1KvR/jszGgILmF5Qo= X-Developer-Key: i=ardb@kernel.org; a=openpgp; fpr=F43D03328115A198C90016883D200E9CA6329909 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220502_041724_690687_A38374D0 X-CRM114-Status: GOOD ( 11.88 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Define the correct prototypes for the load_image and start_image boot service pointers so we can call them from the EFI zboot code. Signed-off-by: Ard Biesheuvel --- drivers/firmware/efi/libstub/efistub.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/firmware/efi/libstub/efistub.h b/drivers/firmware/efi/libstub/efistub.h index a0477afaa55f..af51ccc01ce2 100644 --- a/drivers/firmware/efi/libstub/efistub.h +++ b/drivers/firmware/efi/libstub/efistub.h @@ -254,8 +254,12 @@ union efi_boot_services { efi_handle_t *); efi_status_t (__efiapi *install_configuration_table)(efi_guid_t *, void *); - void *load_image; - void *start_image; + efi_status_t (__efiapi *load_image)(bool, efi_handle_t, + efi_device_path_protocol_t *, + void *, unsigned long, + efi_handle_t *); + efi_status_t (__efiapi *start_image)(efi_handle_t, unsigned long *, + efi_char16_t **); efi_status_t __noreturn (__efiapi *exit)(efi_handle_t, efi_status_t, unsigned long,