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=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 77D77C48BDF for ; Tue, 15 Jun 2021 21:11:02 +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 11E1F613B1 for ; Tue, 15 Jun 2021 21:11:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 11E1F613B1 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4CF79828E1; Tue, 15 Jun 2021 23:10:58 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=mymailcheap.com header.i=@mymailcheap.com header.b="lm8oeVlt"; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="jtxEHvCg"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ECD1F82917; Tue, 15 Jun 2021 23:10:55 +0200 (CEST) Received: from relay1.mymailcheap.com (relay1.mymailcheap.com [149.56.97.132]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D1A95828A4 for ; Tue, 15 Jun 2021 23:10:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=aosc.io Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=icenowy@aosc.io Received: from filter1.mymailcheap.com (filter1.mymailcheap.com [149.56.130.247]) by relay1.mymailcheap.com (Postfix) with ESMTPS id 8F9583F202; Tue, 15 Jun 2021 21:10:51 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by filter1.mymailcheap.com (Postfix) with ESMTP id 760852A0D2; Tue, 15 Jun 2021 17:10:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mymailcheap.com; s=default; t=1623791451; bh=6HOYdfDtK0gDJ4NagK5HgZeeWlllk77ijWz6YeTwaSw=; h=From:To:Cc:Subject:Date:From; b=lm8oeVltac48JOOYofnWhegC8o9JL5mMjwRHnllmOPVK0x5EDyR97vx8xfRgVExCe WKzP1igi0HqWY45et47Mmf6F7pUjG6NL/p2VHPGh3udVNkDZw/LxBmy03oazG3Ux0H XAcMJ4CcgHRKp1nbkaxCLfORWd8L4iBkxYRNGrks= Received: from filter1.mymailcheap.com ([127.0.0.1]) by localhost (filter1.mymailcheap.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mVHhNwc55Mdi; Tue, 15 Jun 2021 17:10:50 -0400 (EDT) Received: from mail20.mymailcheap.com (mail20.mymailcheap.com [51.83.111.147]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by filter1.mymailcheap.com (Postfix) with ESMTPS; Tue, 15 Jun 2021 17:10:50 -0400 (EDT) Received: from [213.133.102.83] (ml.mymailcheap.com [213.133.102.83]) by mail20.mymailcheap.com (Postfix) with ESMTP id A2F1341035; Tue, 15 Jun 2021 21:10:48 +0000 (UTC) Authentication-Results: mail20.mymailcheap.com; dkim=pass (1024-bit key; unprotected) header.d=aosc.io header.i=@aosc.io header.b="jtxEHvCg"; dkim-atps=neutral AI-Spam-Status: Not processed Received: from ice-e5v2.lan (unknown [59.41.163.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mail20.mymailcheap.com (Postfix) with ESMTPSA id CCE9A41035; Tue, 15 Jun 2021 21:10:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aosc.io; s=default; t=1623791439; bh=6HOYdfDtK0gDJ4NagK5HgZeeWlllk77ijWz6YeTwaSw=; h=From:To:Cc:Subject:Date:From; b=jtxEHvCg2/lajd/McpJ7R4/r/d9egvsW1EAGjqTKyKQKZmkISNr4kWgaZLnpTzH/7 B/6+yD/CebQJubl5viMWz95i3PL5aS07FjXabXlJj7+8chl3qGYFil5187WqLCml/e 1cMO89BnoyyxjVe6oLhchlPfrjK5D8HpXgFcIR9g= From: Icenowy Zheng To: Heinrich Schuchardt , Alexander Graf Cc: u-boot@lists.denx.de, Icenowy Zheng Subject: [PATCH] efi_loader: allow to disable GOP support Date: Wed, 16 Jun 2021 05:10:28 +0800 Message-Id: <20210615211028.287546-1-icenowy@aosc.io> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Server: mail20.mymailcheap.com X-Spamd-Result: default: False [4.90 / 20.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(0.00)[aosc.io:s=default]; RECEIVED_SPAMHAUS_PBL(0.00)[59.41.163.201:received]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_ENVRCPT(0.00)[gmx.de]; R_MISSING_CHARSET(2.50)[]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BROKEN_CONTENT_TYPE(1.50)[]; TO_DN_SOME(0.00)[]; R_SPF_SOFTFAIL(0.00)[~all]; DMARC_NA(0.00)[aosc.io]; ML_SERVERS(-3.10)[213.133.102.83]; DKIM_TRACE(0.00)[aosc.io:+]; MID_CONTAINS_FROM(1.00)[]; FREEMAIL_TO(0.00)[gmx.de,csgraf.de]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:24940, ipnet:213.133.96.0/19, country:DE]; RCVD_COUNT_TWO(0.00)[2]; HFILTER_HELO_BAREIP(3.00)[213.133.102.83,1] X-Rspamd-Queue-Id: A2F1341035 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 Sometimes EFI GOP support may be not wanted (e.g. because the operating system cannot operate well with it) even if video support in U-Boot is needed. Allow to disable EFI GOP support with a Kconfig option. Signed-off-by: Icenowy Zheng --- lib/efi_loader/Kconfig | 8 ++++++++ lib/efi_loader/Makefile | 3 +-- lib/efi_loader/efi_setup.c | 11 ++++++----- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/efi_loader/Kconfig b/lib/efi_loader/Kconfig index 6242caceb7..5ba0ce6a44 100644 --- a/lib/efi_loader/Kconfig +++ b/lib/efi_loader/Kconfig @@ -282,6 +282,14 @@ config EFI_HAVE_RUNTIME_RESET depends on ARCH_BCM283X || FSL_LAYERSCAPE || PSCI_RESET || \ SANDBOX || SYSRESET_X86 +config EFI_GOP_PROTOCOL + bool "EFI_GOP_PROTOCOL support" + default y + depends on DM_VIDEO || LCD + help + Provide a EFI_GOP_PROTOCOL implementation using the graphics + hardware initialized by U-Boot. + config EFI_GRUB_ARM32_WORKAROUND bool "Workaround for GRUB on 32bit ARM" default n if ARCH_BCM283X || ARCH_SUNXI || ARCH_QEMU diff --git a/lib/efi_loader/Makefile b/lib/efi_loader/Makefile index fd344cea29..826563d9a7 100644 --- a/lib/efi_loader/Makefile +++ b/lib/efi_loader/Makefile @@ -54,8 +54,7 @@ obj-$(CONFIG_EFI_VARIABLES_PRESEED) += efi_var_seed.o endif obj-y += efi_watchdog.o obj-$(CONFIG_EFI_ESRT) += efi_esrt.o -obj-$(CONFIG_LCD) += efi_gop.o -obj-$(CONFIG_DM_VIDEO) += efi_gop.o +obj-$(CONFIG_EFI_GOP_PROTOCOL) += efi_gop.o obj-$(CONFIG_PARTITIONS) += efi_disk.o obj-$(CONFIG_NET) += efi_net.o obj-$(CONFIG_GENERATE_ACPI_TABLE) += efi_acpi.o diff --git a/lib/efi_loader/efi_setup.c b/lib/efi_loader/efi_setup.c index 3c5cf9a435..98deb63777 100644 --- a/lib/efi_loader/efi_setup.c +++ b/lib/efi_loader/efi_setup.c @@ -254,11 +254,12 @@ efi_status_t efi_init_obj_list(void) if (ret != EFI_SUCCESS) goto out; -#if defined(CONFIG_LCD) || defined(CONFIG_DM_VIDEO) - ret = efi_gop_register(); - if (ret != EFI_SUCCESS) - goto out; -#endif + if (IS_ENABLED(CONFIG_EFI_GOP_PROTOCOL)) { + ret = efi_gop_register(); + if (ret != EFI_SUCCESS) + goto out; + } + #ifdef CONFIG_NET ret = efi_net_register(); if (ret != EFI_SUCCESS) -- 2.30.2