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=-19.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT 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 62B83C433F5 for ; Wed, 8 Sep 2021 13:41:00 +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 E51F46109F for ; Wed, 8 Sep 2021 13:40:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org E51F46109F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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 689368341A; Wed, 8 Sep 2021 15:36:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org 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; unprotected) header.d=chromium.org header.i=@chromium.org header.b="IYpwtF7c"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E168A83373; Wed, 8 Sep 2021 15:36:37 +0200 (CEST) Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 413A58335F for ; Wed, 8 Sep 2021 15:34:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-wr1-x432.google.com with SMTP id b6so3313126wrh.10 for ; Wed, 08 Sep 2021 06:34:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5fi9+fWeWXIJ2sjakyxKgb2GvExVRPPblOP9rMYy3Ts=; b=IYpwtF7cvk6q5a6eplEcLjZhNJydUA6MkxWxi9wfYLpl6dvx/LF4MfKWPMDhLY4Pn+ L2nSi6M+ql58Me35dDwFm29FGl0PvDa6GqdcrmnN/vrCz4ppQ9HWhmoIaxP2nr/3dsg6 57nL0PONT6cbqzTRHz6yeHFYE9uSTYtgc/5SM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5fi9+fWeWXIJ2sjakyxKgb2GvExVRPPblOP9rMYy3Ts=; b=Q+M4LRGupbUNuo7shtXOEb4b4VGQAM1mXaOBv+3KLTGuCoHg1a67alzjn13xKh2aHo fkzovBv7QTQUtPtQGqoGOLI3ZScFk1J6btajeOoRwKPKSXCOv2tLxjE8Mad0LbTJ7OZH gS1PT5Nr8kppwxaUURzGkQ9e41189ZTAPWNGIMSev47bs4LHyReOGUzkW5cS0Uw6C18c ggUZurViuxl4PQKh5/HmUbH0KN/UPosBNpLTGxt4looIeuC4Qte6ONQZPClEBfkJUrSs Ir+otsMMHndRA9t/brf2bDk5Lt5RbZsXbHuGevzcnY6wk96B0YKKfVM89gVXQl156t+6 y5vw== X-Gm-Message-State: AOAM533bH+bsYhNb26wLaSMjsOD1tUcL4SUcyGu9qJUgK2dwQQ9sm85x bLWGhHWzM/9LNJt4uxc39E7Yayh9O5A3jZVS X-Google-Smtp-Source: ABdhPJwTlnb3meEUlPXOLpdWNCJVvSbB8trYX8RJmEEhoQV1/SgmHSPB2wb8as+wNYEASlz0KFJ13g== X-Received: by 2002:adf:916f:: with SMTP id j102mr4127242wrj.422.1631108064426; Wed, 08 Sep 2021 06:34:24 -0700 (PDT) Received: from sjg1.roam.corp.google.com (82-69-54-180.dsl.in-addr.zen.co.uk. [82.69.54.180]) by smtp.gmail.com with ESMTPSA id l2sm2209065wmi.1.2021.09.08.06.34.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Sep 2021 06:34:24 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Ilias Apalodimas , Heinrich Schuchardt , Bin Meng , Tom Rini , Christian Melki , Simon Glass Subject: [PATCH 02/35] x86: Create a new header for EFI Date: Wed, 8 Sep 2021 07:33:32 -0600 Message-Id: <20210908073355.2.If4a31ab38420baccea0f0caf799c85966900e784@changeid> X-Mailer: git-send-email 2.33.0.153.gba50c8fa24-goog In-Reply-To: <20210908133405.696481-1-sjg@chromium.org> References: <20210908133405.696481-1-sjg@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 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 is 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 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 payload) + * + * @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 EFI + * payload). + * + * @efi_info: Pointer to place to put the EFI info in the x86 setup base + */ +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 -- 2.33.0.153.gba50c8fa24-goog