From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79610C433F5 for ; Wed, 8 Sep 2021 17:22:54 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 60B0161131 for ; Wed, 8 Sep 2021 17:22:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 60B0161131 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id A581F82F28; Wed, 8 Sep 2021 19:22:50 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.b="fbHupHD9"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 859FA832F0; Wed, 8 Sep 2021 19:22:49 +0200 (CEST) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2053882BB2 for ; Wed, 8 Sep 2021 19:22:46 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmx.de Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=xypron.glpk@gmx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1631121763; bh=VQOJxUUH2NNKi4Xq/Oa3g9GLrbL8kM28fFLCB7UdSuk=; h=X-UI-Sender-Class:Subject:To:Cc:References:From:Date:In-Reply-To; b=fbHupHD9JiWRmnYYAok+53AJYS1OZyBXYpVWZeItg4qBblejceyx5/MlSYvOXiDBB T9y2a9Pj711kkc58UmeVGpTkq9qOukPo4GQ1FQfloiyJDX9C9rQbLhmwWRun4sK2z5 lm/qHVOe76REnbSrq2cc026lCHL2/iJjciiJ7gRc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.123.55] ([88.152.144.157]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDysg-1mGI2Z1JBs-009xcc; Wed, 08 Sep 2021 19:22:43 +0200 Subject: Re: [PATCH 02/35] x86: Create a new header for EFI To: Simon Glass , U-Boot Mailing List Cc: Ilias Apalodimas , Bin Meng , Tom Rini , Christian Melki References: <20210908133405.696481-1-sjg@chromium.org> <20210908073355.2.If4a31ab38420baccea0f0caf799c85966900e784@changeid> From: Heinrich Schuchardt Message-ID: Date: Wed, 8 Sep 2021 19:22:42 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <20210908073355.2.If4a31ab38420baccea0f0caf799c85966900e784@changeid> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-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kzSm7jwc8ONyifxmS7nZ/ixE4thOaeaL1O+Bz6Mmh6+r +sAr/X9CvOmc/3YkS5vsGGS/vJOVaorrA4b/ionFdQmLTWv+QCaYRbXUqQAIDVsW9mrRvUY8r 2o9kvDdUYUtxsm/Sq8/6mH/0QOj5nqoN/zAgbCO+0fJuU/nYUcw9UHaB8zD9LAZz6+kKSRLWy RgGKbMC9MRs62v45MvoHmoRTZjqicBYpoPoXhOFmfeD7PBAhz261t6/IuSrtTTuy+vRjkmEYw BhaPDYndWt7JK1UwaUZnFj6BA0EfsCJRqna4xeLnygsderSnXfnpOdZtUXWC1IoRdVh5eyl98 /gVR5t7j4TI/0c= X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On 9/8/21 3:33 PM, Simon Glass wrote: > The setup routines are called from zimage but don't really belong in the > zimage header. Add a new EFI header to house these. Add comments so it i= s > clear what the functions do. > > Signed-off-by: Simon Glass > --- > > arch/x86/include/asm/efi.h | 32 ++++++++++++++++++++++++++++++++ > arch/x86/include/asm/zimage.h | 3 --- > arch/x86/lib/zimage.c | 1 + > 3 files changed, 33 insertions(+), 3 deletions(-) > create mode 100644 arch/x86/include/asm/efi.h In the future we should be able to run the EFI app on any UEFI architecture. Given this background are the function definitions really x86 specific? Best regards Heinrich > > diff --git a/arch/x86/include/asm/efi.h b/arch/x86/include/asm/efi.h > new file mode 100644 > index 00000000000..c1735e4dc5f > --- /dev/null > +++ b/arch/x86/include/asm/efi.h > @@ -0,0 +1,32 @@ > +/* SPDX-License-Identifier: GPL-2.0+ */ > +/* > + * Copyright Google LLC > + */ > + > +#ifndef _ASM_EFI_H_ > +#define _ASM_EFI_H_ > + > +struct efi_info; > +struct screen_info; > + > +/** > + * setup_video() - Set up the screen info in the x86 setup > + * > + * This is needed so Linux can use the display (when U-Boot is an EFI p= ayload) > + * > + * @efi_info: Pointer to place to put the screen info in the x86 setup = base > + */ > +void setup_video(struct screen_info *screen_info); > + > +/** > + * setup_efi_info() - Set up the EFI info needed by Linux to boot > + * > + * This writes a suitable signature, table pointers, memory-map pointer= , etc. > + * These are needed for Linux to boot from U-Boot (when U-Boot is an EF= I > + * payload). > + * > + * @efi_info: Pointer to place to put the EFI info in the x86 setup bas= e > + */ > +void setup_efi_info(struct efi_info *efi_info); > + > +#endif > diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage= .h > index 6679767d16b..fa6e7f76e05 100644 > --- a/arch/x86/include/asm/zimage.h > +++ b/arch/x86/include/asm/zimage.h > @@ -72,7 +72,4 @@ int setup_zimage(struct boot_params *setup_base, char = *cmd_line, int auto_boot, > */ > void zimage_dump(struct boot_params *base_ptr); > > -void setup_video(struct screen_info *screen_info); > -void setup_efi_info(struct efi_info *efi_info); > - > #endif > diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c > index 9938c80a42b..7ce02226ef9 100644 > --- a/arch/x86/lib/zimage.c > +++ b/arch/x86/lib/zimage.c > @@ -29,6 +29,7 @@ > #include > #include > #include > +#include > #include > #ifdef CONFIG_SYS_COREBOOT > #include >