From patchwork Sun Jun 10 13:25:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927338 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="F0IR05u9"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cH52FbPz9rvt for ; Sun, 10 Jun 2018 23:21:21 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B7164C21C4A; Sun, 10 Jun 2018 13:20:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E3714C21E12; Sun, 10 Jun 2018 13:20:38 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id EFB2DC21E07; Sun, 10 Jun 2018 13:20:33 +0000 (UTC) Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by lists.denx.de (Postfix) with ESMTPS id 32AEBC21C3F for ; Sun, 10 Jun 2018 13:20:30 +0000 (UTC) Received: by mail-pf0-f193.google.com with SMTP id a22-v6so8841347pfo.12 for ; Sun, 10 Jun 2018 06:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VdJUtzjbCX6hsxFEDkHkqpf2xKq5nIP8IG/vWhYjj+I=; b=F0IR05u9KTsNA/veZF/pW3XlbT1kkk++yv9lXtNwKf8b9gpoZPpB09giPo6irE/+sT egY0BgmBccLSqDNtLZtDx6WqhulkeuWKvC0FZEqYfIqeI6vOe4A89ZDIK5xFVrZo7rkt ssXdA1HexFw1qedB6gA/kmrN8l8m956nfeBD3K8lGcNYK15ogvn6/st8ZvywEMvSxGlm ootlrbNluV1OiMqtIlRRlrQ+MTOoFV4xqkP2CG4lFbX0CGaVA9t2X4rIMYKksObNrhHr yj4NyEJkfqbxWmqP2oB5jP5N3fZM0d310ltSYiByHz6eGWhUa450oC8dodkK9eMBYczG p3xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VdJUtzjbCX6hsxFEDkHkqpf2xKq5nIP8IG/vWhYjj+I=; b=HJv2NM2cR3fmo/8pcANPQhMqbPzUCGFn4gWlHWzfhMPvWFUFLEq+nJ3xtOs48FCk/I 30tmLNdLU7McGJ9fWFWJtS0cs0dnc2Q2Jut67jxsP5kQ7SjUMtyFTyySguRkJZlYqF2r NmZ1OoReoQbA9z5W7tTUNHPnZIvdGjAj7np9+KTaXz0SNgM/I4hfJep79O+AXRSGE4Yd Zbf9rZGI05AqSuDcnrKKJiw/D4vZ+AbL3NjBtpZCTaYd6zUcxTAe80M17mNxQWu7Vyn8 W0gn1yzFgibQp6JM0eULvzVQGXutYW0r0ZWRFiJyG2A1jDQpSwn4NeovUkgdu7XV6KK/ uLiA== X-Gm-Message-State: APt69E3Kba0TA/rV5SUiaHQ+CCfR/MXSlvU6Rpb6ZUWFSSJUQfZJskj7 jU+UYEzwk8IbwWsJWN36tHo= X-Google-Smtp-Source: ADUXVKIeqSbfP+pAjmUo2lHVT0jRuMoHn4Weu0xhhhhGDkwXJ0heH4KRzz4nCGuNvT+Cjr7mOk/t3Q== X-Received: by 2002:a63:3807:: with SMTP id f7-v6mr11522984pga.446.1528636828454; Sun, 10 Jun 2018 06:20:28 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.27 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:27 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:00 -0700 Message-Id: <1528637118-32739-2-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Heinrich Schuchardt Subject: [U-Boot] [PATCH 01/18] x86: doc: Fix reference to EFI doc in U-Boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since commit f3b5056c4e72 ("efi_loader: split README.efi into two separate documents"), the original README.efi was renamed to README.u-boot_on_efi, but x86 doc still refers to the old one. Signed-off-by: Bin Meng --- doc/README.x86 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/README.x86 b/doc/README.x86 index 78664c3..865a965 100644 --- a/doc/README.x86 +++ b/doc/README.x86 @@ -1139,7 +1139,7 @@ application, with CONFIG_EFI_APP. The CONFIG_EFI_LOADER option, where U-Booot provides an EFI environment to the kernel (i.e. replaces UEFI completely but provides the same EFI run-time services) is not currently supported on x86. -See README.efi for details of EFI support in U-Boot. +See README.u-boot_on_efi for details of EFI support in U-Boot. 64-bit Support -------------- From patchwork Sun Jun 10 13:25:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927340 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hF/lfnzw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cKM0bNSz9rvt for ; Sun, 10 Jun 2018 23:23:18 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 91F75C21DA6; Sun, 10 Jun 2018 13:21:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B9088C21D56; Sun, 10 Jun 2018 13:20:48 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 42DBAC21E1A; Sun, 10 Jun 2018 13:20:36 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.denx.de (Postfix) with ESMTPS id 630EFC21D65 for ; Sun, 10 Jun 2018 13:20:31 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id 15-v6so8479731pge.2 for ; Sun, 10 Jun 2018 06:20:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=O376cNbKcuQoj7QbPDvMLeWZSY7w6/h3EyieBFbimr0=; b=hF/lfnzwKwT4ncDDx6PaHD4rzJpvgF3lFQN7r00/5tzC4VofWtk1FXa0EuUiDjDD7a sP5TWKrxiY1l6ga9NWuk8hJ3EiV/18ufNEHcpo9BaICRTd4tUeZKmRO5bUaHZOhPSetE xmXuFgfJMYKhopaWCI8Jy+rRMtsBaA2PXtZd5oNlsGTfj9DCeaw5/FqE4qBpc5BsSs4b TFddW1M32TbF7BgWe0Yc21dbiFBjUEQ97epdMoT0FKcOlL9FAyPcLeGErKUB7RO4+3IP RyEH/C2vWaScw8mFQeKsT/21V/I/OFA2Uo9LDUIy3kMqFuphv5X+yd8H4n97/eISvGNu Owow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=O376cNbKcuQoj7QbPDvMLeWZSY7w6/h3EyieBFbimr0=; b=RsGEg8iIkVG1WiRfvc5eDWKLGc/Uu8+CrppNVWQc+HEOHBPvA+V9Do7SZgE+rJfTDw Ocwh0YsXahnsVNhqhA3MfkseE+9U5x6g49OHhdHSPAy8Az1osk1F9KEiNkczeKhh3X68 dNPRahVHFG2BOrcbtmN+qt7rEeq3DGgORSdBrdOJz49eA01XZ9rlEH5WuEUwKMy86foA LuwDWGlG4KBqC0YBwR40S8Mnlgz2FdaBgb2WrEktHoql3Lo1b/Kg87rCHIG8n+IRla/W MnlKQ2IopDWcCSf/P1ctEvrrD+z3ZJ8+b4CvvUBCyTkb/6K9zjV0PHHdJzSC5CsT3JA8 f0RA== X-Gm-Message-State: APt69E1s9amB8mC36LzTTmf6KlT6vlMe87r9wbXTkE042+9NReGzCJRX 9BvPmpdlAgTWynW/1lIfQI4= X-Google-Smtp-Source: ADUXVKJ1X3dZ5bNCbJZqwYX4phBfz5XgQgchXZw1FLaeQ1ti84+JFAk/+oEkq40OAAuQ5ka1bQcTww== X-Received: by 2002:a63:12:: with SMTP id 18-v6mr11802260pga.121.1528636830023; Sun, 10 Jun 2018 06:20:30 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.28 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:29 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:01 -0700 Message-Id: <1528637118-32739-3-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 02/18] x86: Conditionally build the pinctrl_ich6 driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The pinctrl_ich6 driver is currently unconditionally built for all x86 boards. Let's use a Kconfig option to control the build. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/Kconfig | 6 ++++++ arch/x86/cpu/baytrail/Kconfig | 1 + arch/x86/cpu/ivybridge/Kconfig | 1 + arch/x86/lib/Makefile | 2 +- 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index c145799..460aed6 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -744,6 +744,12 @@ config I8259_PIC slave) interrupt controllers. Include this to have U-Boot set up the interrupt correctly. +config PINCTRL_ICH6 + bool + help + Intel ICH6 compatible chipset pinctrl driver. It needs to work + together with the ICH6 compatible gpio driver. + config I8254_TIMER bool default y diff --git a/arch/x86/cpu/baytrail/Kconfig b/arch/x86/cpu/baytrail/Kconfig index ac58b03..022a9f2 100644 --- a/arch/x86/cpu/baytrail/Kconfig +++ b/arch/x86/cpu/baytrail/Kconfig @@ -12,6 +12,7 @@ config INTEL_BAYTRAIL imply AHCI_PCI imply ICH_SPI imply INTEL_ICH6_GPIO + imply PINCTRL_ICH6 imply MMC imply MMC_PCI imply MMC_SDHCI diff --git a/arch/x86/cpu/ivybridge/Kconfig b/arch/x86/cpu/ivybridge/Kconfig index e31c33c..ea25ff3 100644 --- a/arch/x86/cpu/ivybridge/Kconfig +++ b/arch/x86/cpu/ivybridge/Kconfig @@ -13,6 +13,7 @@ config NORTHBRIDGE_INTEL_IVYBRIDGE imply AHCI_PCI imply ICH_SPI imply INTEL_ICH6_GPIO + imply PINCTRL_ICH6 imply SCSI imply SCSI_AHCI imply SPI_FLASH diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 51d451f..2adb236 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -24,7 +24,7 @@ obj-$(CONFIG_ENABLE_MRC_CACHE) += mrccache.o obj-y += northbridge-uclass.o obj-$(CONFIG_I8259_PIC) += i8259.o obj-$(CONFIG_I8254_TIMER) += i8254.o -obj-y += pinctrl_ich6.o +obj-$(CONFIG_PINCTRL_ICH6) += pinctrl_ich6.o obj-y += pirq_routing.o obj-y += relocate.o obj-y += physmem.o From patchwork Sun Jun 10 13:25:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927342 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ASCJpMFg"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cMH1Jcrz9rvt for ; Sun, 10 Jun 2018 23:24:58 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id B3F18C21D4A; Sun, 10 Jun 2018 13:22:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 39D61C21DA1; Sun, 10 Jun 2018 13:21:03 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id BF6BEC21C6A; Sun, 10 Jun 2018 13:20:37 +0000 (UTC) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by lists.denx.de (Postfix) with ESMTPS id A8CDCC21DCA for ; Sun, 10 Jun 2018 13:20:32 +0000 (UTC) Received: by mail-pg0-f65.google.com with SMTP id e11-v6so8484932pgq.0 for ; Sun, 10 Jun 2018 06:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=YKFIc2ZmtrkPjRUQ9QHvGO4ZAXxvum3TOFL3pBgRk60=; b=ASCJpMFgHi86gb2CTSFkQaLHqLZMHHwr7ok/n9q6RjThdUMkQ15U342FHrnfXhtpuu M0QD1uUJPTaN/OQgPew9usuMBOXjrainzZY0cb50bu+X8aJ6euJKzWwIPw/JX5yEHfeF NTRyMul+UxzxlKqPkBO7r/yzxKAcDclfxkAnUToy4b+Zpkty3RLIhLvwN86srckNvAet 7ZN9/MjnWVP7khH88W1VLdHwI7GHQ1gXBNYNH1P2BM79FJJ3QEv5UjTkpMFVylR/QtaK nEyso0PMvjV5kuhIDNXZ+8Fbn3WvvUwtD6qUYM10eMK8qOEUNMUeJXwMull9ACB0xcWX g08Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=YKFIc2ZmtrkPjRUQ9QHvGO4ZAXxvum3TOFL3pBgRk60=; b=IXRHgPaH2tYYK743M0ttZarAKRt0Ke1f8uKF81dg6GbtwrdEmC35JtKN/RFFoT/5Mu 1TY1IRbJie/J/YIsvJFBrl1fODPEHgX7sBo8Pq9DrUbt/GsYdU+hzJqAnq2gCh+EOqnl 1Uz0vMGchpvseyTYlNpZq9TsPsR1xhB9IoI0SKOLhYRYQlpT3PO4vF7LSR7MQfhpPQPE LAb5S2PeObSAl/nU52/m2heyhppKSSr7TQscJiJZQpNp1y/pzLeAF0hBmKpI6mYUtn3w QVhjpD52w0dah5PM3Z8ad7xUaqsnffk8QRUlsbVaD5FM6QH2vYRtyS7R3ieJVX/Uip5L jd4Q== X-Gm-Message-State: APt69E28V4B6I0w3kx5tnqRkif8J/+ppV8pfsj6LHilGfw/YLXiddXtn emSA8/gFqMuN7Zwq0amjhKerkA== X-Google-Smtp-Source: ADUXVKIdb0mYM5UC6Kh7NxCu3CQitpr8buleqaGZd/y7EHDZ09HAh7C6BFhmjyn0s90WNyEe9+GLtQ== X-Received: by 2002:a63:87c8:: with SMTP id i191-v6mr11604486pge.124.1528636831371; Sun, 10 Jun 2018 06:20:31 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.30 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:30 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:02 -0700 Message-Id: <1528637118-32739-4-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 03/18] x86: efi: app: Fix broken EFI application X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The EFI application does not boot currently. It's due to the call to syscon_get_by_driver_data() in cpu_init_r() maps to nowhere as CONFIG_SYSCON is not included in the configuration. EFI application is built as a shared library, so GCC won't complain during the build process if some symbols are not found. GCC will simply put these symbols into the .plt section and expect dynamic loader to fix these up. While we are here, remove some commands and drivers that are not needed at present. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- configs/efi-x86_defconfig | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_defconfig index 4cf5554..741a169 100644 --- a/configs/efi-x86_defconfig +++ b/configs/efi-x86_defconfig @@ -11,12 +11,8 @@ CONFIG_DISPLAY_BOARDINFO_LATE=y CONFIG_LAST_STAGE_INIT=y CONFIG_HUSH_PARSER=y # CONFIG_CMD_BOOTM is not set -CONFIG_CMD_GPIO=y CONFIG_CMD_PART=y -CONFIG_CMD_SF=y # CONFIG_CMD_SF_TEST is not set -CONFIG_CMD_SPI=y -CONFIG_CMD_USB=y # CONFIG_CMD_NET is not set CONFIG_CMD_TIME=y CONFIG_CMD_EXT2=y @@ -28,12 +24,12 @@ CONFIG_MAC_PARTITION=y CONFIG_ISO_PARTITION=y CONFIG_EFI_PARTITION=y CONFIG_OF_EMBED=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y # CONFIG_DM_ETH is not set CONFIG_DEBUG_EFI_CONSOLE=y CONFIG_DEBUG_UART_BASE=0 CONFIG_DEBUG_UART_CLOCK=0 -CONFIG_SPI=y -CONFIG_ICH_SPI=y # CONFIG_REGEX is not set CONFIG_EFI=y # CONFIG_EFI_LOADER is not set From patchwork Sun Jun 10 13:25:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927344 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="hAa8MQPQ"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cQ74pH4z9rvt for ; Sun, 10 Jun 2018 23:27:27 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 38D19C21DEC; Sun, 10 Jun 2018 13:21:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D9594C21E07; Sun, 10 Jun 2018 13:20:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A235EC21DCA; Sun, 10 Jun 2018 13:20:39 +0000 (UTC) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by lists.denx.de (Postfix) with ESMTPS id 33985C21DED for ; Sun, 10 Jun 2018 13:20:34 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id d2-v6so8471762pga.13 for ; Sun, 10 Jun 2018 06:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DO8w1qo9gSJwOs13cMzPf1s69115PimDdU9EtRjuDgg=; b=hAa8MQPQTC2PfZltv0xZwdiFUR2YteH/yAkAja7pY9i56ZDjC9aT0zy6iOwIbs2Ct+ akR8/U5XIR+4Kt5mYtHjAEG+gcsD4LigAwcB9C8ksLFB6zx61MWlIWJ8By1I+w82Qx6L Oj4yDhQNYkwol99+22XaBz5ul/sg2pXeIbnNLwzynaPHP6nS7N+mQdgluMA52LMMlogX ZLz6w+YvPGCO0i6giEYN4CdsxS03Pr9rjAn9Ggb3GhgovqPQ2Pl2XNQQiI+fnbWUVf+w 6j0iR3p4PCclwxhDIipb6t73VHbLOtRhajrAIeKW1VstBt80f528jhPts+Idu4VGvK97 /LIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=DO8w1qo9gSJwOs13cMzPf1s69115PimDdU9EtRjuDgg=; b=SEjV7FxLTqt1a7mI8DW/YgnoecQhblS4nw2P3kAuwYVOV91af0OGNULXcekcrVFsRi RpRKhNpkWzSCnBtxHgSzijvzS17vMax0DdPo0cUGKsvWtD9W42ou1iKv1jsKsbe36cBC M+XJUidLZR4vsRfYGYDV3APyRGt5EWnVkVFRKEtxdaD7o7aS7LmIhlzpAfBa0DEEklfC 00ISInDfH2d5s8unxI/0sgJEmb5TLXX20808MeOhlIre8hGc+vwjcvlIoPmI/KsRUmwz SmtCSzrKJtP/W+8JbWOaTHWUE02yhdLO7LWVIrf5cgn4nFzzj7R3RqGxfZu8OK6LiNXM YwKQ== X-Gm-Message-State: APt69E1yBBFVDwCN+bzqQq+IZQEZBAytipkaxeBjVEZKCBXD6sA/skUA 2Mv49aOLRv9qUuoLBg473XSOmw== X-Google-Smtp-Source: ADUXVKI751CrO44zchW+1RT0iHkT1eWMnEfQgJZD6xhZP87bRmKrvq9UFdp1hHecxTujwTe7vSsg9Q== X-Received: by 2002:a65:6346:: with SMTP id p6-v6mr11467159pgv.281.1528636832866; Sun, 10 Jun 2018 06:20:32 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.31 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:31 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:03 -0700 Message-Id: <1528637118-32739-5-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Alexander Graf Subject: [U-Boot] [PATCH 04/18] x86: efi: payload: Enforce toolchain to generate 64-bit EFI payload stub codes X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Attempting to use a toolchain that is preconfigured to generate code for the 32-bit architecture (i386), for example, the i386-linux-gcc toolchain on kernel.org, to compile the 64-bit EFI payload does not build. This updates the makefile fragments to ensure '-m64' is passed to toolchain when building the 64-bit EFI payload stub codes. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/Makefile | 3 ++- arch/x86/lib/Makefile | 4 ++-- lib/efi/Makefile | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index d5a17d0..af9e26c 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -18,7 +18,8 @@ obj-y += cpu.o cpu_x86.o ifndef CONFIG_$(SPL_)X86_64 AFLAGS_REMOVE_call32.o := -mregparm=3 \ $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32) -AFLAGS_call32.o := -fpic -fshort-wchar +AFLAGS_call32.o := -fpic -fshort-wchar \ + $(if $(CONFIG_EFI_STUB_64BIT),-m64) extra-y += call32.o endif diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 2adb236..112ac3d 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -58,10 +58,10 @@ CFLAGS_reloc_ia32_efi.o += -fpic -fshort-wchar # When building for 64-bit we must remove the i386-specific flags CFLAGS_REMOVE_reloc_x86_64_efi.o += -mregparm=3 -march=i386 -m32 -CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar +CFLAGS_reloc_x86_64_efi.o += -fpic -fshort-wchar -m64 AFLAGS_REMOVE_crt0_x86_64_efi.o += -mregparm=3 -march=i386 -m32 -AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar +AFLAGS_crt0_x86_64_efi.o += -fpic -fshort-wchar -m64 extra-$(CONFIG_EFI_STUB_32BIT) += crt0_ia32_efi.o reloc_ia32_efi.o extra-$(CONFIG_EFI_STUB_64BIT) += crt0_x86_64_efi.o reloc_x86_64_efi.o diff --git a/lib/efi/Makefile b/lib/efi/Makefile index 18d081a..f1a3929 100644 --- a/lib/efi/Makefile +++ b/lib/efi/Makefile @@ -7,9 +7,11 @@ obj-$(CONFIG_EFI_STUB) += efi_info.o CFLAGS_REMOVE_efi_stub.o := -mregparm=3 \ $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32) -CFLAGS_efi_stub.o := -fpic -fshort-wchar -DEFI_STUB +CFLAGS_efi_stub.o := -fpic -fshort-wchar -DEFI_STUB \ + $(if $(CONFIG_EFI_STUB_64BIT),-m64) CFLAGS_REMOVE_efi.o := -mregparm=3 \ $(if $(CONFIG_EFI_STUB_64BIT),-march=i386 -m32) -CFLAGS_efi.o := -fpic -fshort-wchar -DEFI_STUB +CFLAGS_efi.o := -fpic -fshort-wchar -DEFI_STUB \ + $(if $(CONFIG_EFI_STUB_64BIT),-m64) extra-$(CONFIG_EFI_STUB) += efi_stub.o efi.o From patchwork Sun Jun 10 13:25:04 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927339 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="JWUT+KuS"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cJ715CNz9rvt for ; Sun, 10 Jun 2018 23:22:15 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id BEE24C21DAF; Sun, 10 Jun 2018 13:21:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B132AC21E15; Sun, 10 Jun 2018 13:20:52 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7B819C21E0D; Sun, 10 Jun 2018 13:20:39 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.denx.de (Postfix) with ESMTPS id A1566C21DFB for ; Sun, 10 Jun 2018 13:20:35 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id q4-v6so7415755pgr.1 for ; Sun, 10 Jun 2018 06:20:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GDlaN7CiF3TuWV4ZTC0FGgRD313C1GyNXsg1OR40oc0=; b=JWUT+KuS9PeB8mei6QsDhUErfSRaDubuqLlJgNtLig/9IHeBhkrLG8li5118o/LMOb J67o8eFF/kZDMfdtoFdVj4V3teKJkDorq+9f+33HaiLolxdrQRBJSJ07g8zeF/CDj8OX /QApNZ6sLxeFeJCKP/lki7VvMD08pexd+v0QPVL1MBnW6fX30z9LU893TWbTa+D90RD6 XUmiAxWVT5rDY1EyfRhWyEiq/ICKU/lLedUlNx09L4GGK56INkrW4/Le+n7K+o7GAsqo hiM32a9UxkcFr1asM0id5BWY/ohoFvOtnU6JWWp5ULJGcCwEIwYI0oo2bckbziRmLSZ+ A8YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GDlaN7CiF3TuWV4ZTC0FGgRD313C1GyNXsg1OR40oc0=; b=osm3njnB6EJGkVpsFFNu1vVFifk6U3Ds3JCr8Kf2GIx/70gqEiUTTqVK1WssXetKqG T0+cxCJ2CsZdyE6xSM/L2PISwD4g5wKfNQanAug6jL0DJO2yWNyo3L7ZKyvB9I75aUpr uHi2ADthFKFrXb1UPWkXX2KdzovfE8VJp3tPg4c2j4cpW8TizWpin/JFSmOzLxt3ZkPm 2arEsuxLski4gQskyULgTf2j08ZHI9F/n+N71szCOrPkwWRiOS+G2LxSRRAQtVQSOOry m/iFUrBrthlwjGDSgrZlIJ3qxfh5NgfjWmScVWO+oVp/ij9ADS8WJFgvBH2fojvp37zN 7u8g== X-Gm-Message-State: APt69E3YF/ljaWvSxYQ394v+e4U1uYeoJQZj6mWJuJTgpbb1mR1S51Yi 8+G3b1/6OWvvNxzPM7k+fAy+Ww== X-Google-Smtp-Source: ADUXVKIGo+i2a9c5I/6nnTMAI0TEDJhXn9ihJ3K9/l4+XbjlPvQMNxuuvJ8kXlu2puSJRHtW1JsWqQ== X-Received: by 2002:a65:4081:: with SMTP id t1-v6mr11792878pgp.32.1528636834357; Sun, 10 Jun 2018 06:20:34 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.32 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:33 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:04 -0700 Message-Id: <1528637118-32739-6-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Alexander Graf Subject: [U-Boot] [PATCH 05/18] efi: Fix efi_uintn_t for 64-bit EFI payload X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Since commit bb0bb91cf0aa ("efi_stub: Use efi_uintn_t"), EFI x86 64-bit payload does not work anymore. The call to GetMemoryMap() in efi_stub.c fails with return code EFI_INVALID_PARAMETER. Since the payload itself is still 32-bit U-Boot, efi_uintn_t gets wrongly interpreted as int, but it should actually be long in a 64-bit EFI environment. Fixes: bb0bb91cf0aa ("efi_stub: Use efi_uintn_t") Signed-off-by: Bin Meng --- include/efi_api.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/efi_api.h b/include/efi_api.h index 64c27e4..d1158de 100644 --- a/include/efi_api.h +++ b/include/efi_api.h @@ -28,7 +28,11 @@ enum efi_timer_delay { EFI_TIMER_RELATIVE = 2 }; +#if defined(CONFIG_EFI_STUB_64BIT) && defined(EFI_STUB) +#define efi_uintn_t unsigned long +#else #define efi_uintn_t size_t +#endif typedef uint16_t *efi_string_t; #define EVT_TIMER 0x80000000 From patchwork Sun Jun 10 13:25:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927345 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="InUO7mLp"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cQ93FmVz9rvt for ; Sun, 10 Jun 2018 23:27:29 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 0F940C21C51; Sun, 10 Jun 2018 13:21:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id A2FE9C21D65; Sun, 10 Jun 2018 13:20:55 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 52179C21DD3; Sun, 10 Jun 2018 13:20:41 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id 4DD42C21E0B for ; Sun, 10 Jun 2018 13:20:37 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j20-v6so8843836pff.10 for ; Sun, 10 Jun 2018 06:20:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gaiOJQhsp0VDjZisB4cJVW9RxFXgbCaqvtnuPHvRSEU=; b=InUO7mLpGw/jf+mVRSNPVy8tzSlWZhjM0LrSNr+watxTTnk+6PLz4+hcbJ7pSufxGa x1w4KqJ3iG/8b+jKCDpTgO/fEH+cSpHQbN/i6QVFbXQlQzHRltzikDeD9RrtNjpFaOUa honheQKlQKbWkEBeCwjBfnGcQBGpgbZPr/SMfGDPDySTlbtiUCyICvO6/7c4C3fxMD41 GKDzZ3c2QkGCFzl3fNnm2iVRfGjAPu8C5kzUpyZEMBBlueMCqi4YgDYkF4sIKYoG3ZX0 B7L+YeruujW3by0HIzN4/c3wUOg3CjEE1U55k+Q5/vClK0rzcvJ40lRCG/cnzUb1rmdz Nbjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gaiOJQhsp0VDjZisB4cJVW9RxFXgbCaqvtnuPHvRSEU=; b=Q8qeXbKN09SJklOMHkOK3mJkgNGIcj1VyUbpEMsz7meYyI7QKDCz+ATfSjhFqp3E2I TkBfbuJGgV0DdD1xO3YdkUsGkDpZ0bHdry+w/qDfjL3vldUUEaEcZ4Z7OLjh2jqOaAz2 LryOKewfdxtpBZLg9xuTmkYxKTEpj68vezwjIYI+SHYqjY51VahcAq9dQLoBN6EuNOj9 NxqMEQJICcJj/P49S9+xJydL4P/WO234A2iyHOG1j5RNOmaKv9Ln7+bCmiYapkQYTtZ7 Eq8yO9lu4dhKhaEKpsu6lgx4VNNSwj2E7A7FHu+/nBhWggbwvb3Pr5fxV8lbJ6JLlcBT TBIw== X-Gm-Message-State: APt69E3rM21zZEVDTogVJKi2AUtNsdoqevssUKvnNU2gFG3ddjAxiVs+ fEaCNgBopZEet0u0uqBFvfL6vg== X-Google-Smtp-Source: ADUXVKIeZPy9tWkyegytqb8SsJ+o1PUSN2J2UdBKpRs5m+vzNSF30FnfVmHMvHFozU0c160OKvb7LA== X-Received: by 2002:a63:61d6:: with SMTP id v205-v6mr11560631pgb.432.1528636835814; Sun, 10 Jun 2018 06:20:35 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.34 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:34 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:05 -0700 Message-Id: <1528637118-32739-7-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 06/18] dm: pci: Make ranges dt property optional X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Christian Gmeiner If we use U-Boot as coreboot payload with a generic dts without any ranges specified we fail in pci pre_probe and our pci bus is not usable. So convert decode_regions(..) into a void function and do the simple error handling there. Signed-off-by: Christian Gmeiner Reviewed-by: Bin Meng [bmeng: fixed 'u-boot' in the commit message and checkpatch warning] Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/pci/pci-uclass.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index 1cd1e40..de4c71b 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -810,8 +810,8 @@ error: return ret; } -static int decode_regions(struct pci_controller *hose, ofnode parent_node, - ofnode node) +static void decode_regions(struct pci_controller *hose, ofnode parent_node, + ofnode node) { int pci_addr_cells, addr_cells, size_cells; int cells_per_record; @@ -820,8 +820,11 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node, int i; prop = ofnode_get_property(node, "ranges", &len); - if (!prop) - return -EINVAL; + if (!prop) { + debug("%s: Cannot decode regions\n", __func__); + return; + } + pci_addr_cells = ofnode_read_simple_addr_cells(node); addr_cells = ofnode_read_simple_addr_cells(parent_node); size_cells = ofnode_read_simple_size_cells(node); @@ -883,7 +886,7 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node, bd_t *bd = gd->bd; if (!bd) - return 0; + return; for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) { if (bd->bi_dram[i].size) { @@ -908,13 +911,12 @@ static int decode_regions(struct pci_controller *hose, ofnode parent_node, base, size, PCI_REGION_MEM | PCI_REGION_SYS_MEMORY); #endif - return 0; + return; } static int pci_uclass_pre_probe(struct udevice *bus) { struct pci_controller *hose; - int ret; debug("%s, bus=%d/%s, parent=%s\n", __func__, bus->seq, bus->name, bus->parent->name); @@ -923,12 +925,7 @@ static int pci_uclass_pre_probe(struct udevice *bus) /* For bridges, use the top-level PCI controller */ if (!device_is_on_pci_bus(bus)) { hose->ctlr = bus; - ret = decode_regions(hose, dev_ofnode(bus->parent), - dev_ofnode(bus)); - if (ret) { - debug("%s: Cannot decode regions\n", __func__); - return ret; - } + decode_regions(hose, dev_ofnode(bus->parent), dev_ofnode(bus)); } else { struct pci_controller *parent_hose; From patchwork Sun Jun 10 13:25:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927353 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="KrvtENvt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cTH5cKlz9rvt for ; Sun, 10 Jun 2018 23:30:11 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 59BC8C21C8B; Sun, 10 Jun 2018 13:22:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 69EDCC21D8A; Sun, 10 Jun 2018 13:21:05 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2E8FCC21D8A; Sun, 10 Jun 2018 13:20:43 +0000 (UTC) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by lists.denx.de (Postfix) with ESMTPS id 86697C21DA6 for ; Sun, 10 Jun 2018 13:20:38 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id z24-v6so8852847pfe.7 for ; Sun, 10 Jun 2018 06:20:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RauLWOQ8bOusAbbB93RbiIHmZRjviF6mYoAteNT0M8g=; b=KrvtENvt0HX8YmkNs41RkV5DGL/HHt1lsk74GO3E/dpmZ9PCTbP2DjWX8rehMse9x2 H9OIqo4Id2HjJtKwpM36yBB8cxcsPf4iUDRRQQs1ClOt70mg+UynEFJtxsnB6Hc3HJxm 4Ru1zDXYO57ZI78V02UAP5F3sKx4FceG3VWZuaDIuBw21HF4DZF1DanAeGKxYsx9WlnR MjY+KH53nl9W2a8zC/rMZB2a8F3DBnXDoLrIsSP2+lnBOuLCJYb5haTpx3bOpcE6s2sE cJOEFmBcpaj9UPST/V8JFn8wTZt+0VXjmsniRY5eF76tupD4mHLfdMOQC5NUGCmhJhAM 4V2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RauLWOQ8bOusAbbB93RbiIHmZRjviF6mYoAteNT0M8g=; b=TGsvLXhekfG+A1KOnffmLjkHAsr+zpnhl68yL2a4LKIleVVZz+nBoiI6DQikGCJlOX g1zI7d24VqN+zV4SW9FbTsdLdbMxpBfKkvR8hdMIsb+/xY3MkFJKdsE0dY0vydZZO+vg l1tep1WmJHu+2g9n7Nh0yz7RoMgZnOGtHBX7C1OHspiptJxolcqpewAkb45KYoy+uC7S 2YhiSOvZRgmPAsinzDRaNTjUPUdDbr1pwFej8BZ6vRLtflbbSA/Gecb/IKa4QBvt+rRP bCAXXYcbNTZg9yfOLe87MO3cvrS/3bK1gLNPGK8xZMmCNOp063vA/NCvK4oh069xx24B g25A== X-Gm-Message-State: APt69E3DIpg1HK7LFQakUP28Mz5IV48hll+Q0Fs86mjFf1Ld+FJSe0bn MaN37KL2vBQrrTwQYF5AsNzFMQ== X-Google-Smtp-Source: ADUXVKKDEqXRHyPCWnj6cUxE6G8KIFYRUd4lQ+ajwCu/8Tz8ruUpNEXZDWttEa7F8DqJ2IGjthSa+A== X-Received: by 2002:a63:5ec4:: with SMTP id s187-v6mr11369984pgb.72.1528636837241; Sun, 10 Jun 2018 06:20:37 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.35 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:36 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:06 -0700 Message-Id: <1528637118-32739-8-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 07/18] dm: pci: Use a 1:1 mapping for bus <-> phy addresses X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Christian Gmeiner If U-Boot gets used as coreboot payload all pci resources got assigned by coreboot. If a dts without any pci ranges gets used the dm is not able to access pci device memory. To get things working make use of a 1:1 mapping for bus <-> phy addresses. This change makes it possible to get the e1000 U-Boot driver working on a sandybridge device where U-Boot is used as coreboot payload. Signed-off-by: Christian Gmeiner Reviewed-by: Bin Meng [bmeng: fixed 'u-boot' in the commit message] Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- drivers/pci/pci-uclass.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index de4c71b..46e9c71 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -1182,6 +1182,11 @@ static int _dm_pci_bus_to_phys(struct udevice *ctlr, struct pci_region *res; int i; + if (hose->region_count == 0) { + *pa = bus_addr; + return 0; + } + for (i = 0; i < hose->region_count; i++) { res = &hose->regions[i]; @@ -1245,6 +1250,11 @@ int _dm_pci_phys_to_bus(struct udevice *dev, phys_addr_t phys_addr, ctlr = pci_get_controller(dev); hose = dev_get_uclass_priv(ctlr); + if (hose->region_count == 0) { + *ba = phys_addr; + return 0; + } + for (i = 0; i < hose->region_count; i++) { res = &hose->regions[i]; From patchwork Sun Jun 10 13:25:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927347 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ei8Xcnwc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cRQ1BMQz9s01 for ; Sun, 10 Jun 2018 23:28:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id A785EC21DF8; Sun, 10 Jun 2018 13:25:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 24B00C21E49; Sun, 10 Jun 2018 13:21:49 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0C2C9C21E38; Sun, 10 Jun 2018 13:20:44 +0000 (UTC) Received: from mail-pf0-f196.google.com (mail-pf0-f196.google.com [209.85.192.196]) by lists.denx.de (Postfix) with ESMTPS id 1DF32C21DE8 for ; Sun, 10 Jun 2018 13:20:40 +0000 (UTC) Received: by mail-pf0-f196.google.com with SMTP id j20-v6so8843858pff.10 for ; Sun, 10 Jun 2018 06:20:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=MrNou9auPFm9FKRkRu+HU2T08frRVOtlzk5xoUQB3hU=; b=Ei8Xcnwcl0w98tMiGbWWagurVe5KZOm8ul33U/ClUI4BOoZKzc5qsrSugYNmGWtx9Q WvxR5TStlsoALyKMpJUkgN7vf7huFhmEziQWPbjcWaHfbTfPVgIF8PqYHdM2PwvgWeNV UkCuvSB+eiiWG0bD/f3r2k3f/dy+7BVYjQkSLi8pvkmjaVbA7JxqQ4kM+0nIebWHJhXS q7oJ9JKOKLZaqWwbPHwRGZAkt3yRVddr38W6qCybox8hJjeQMumaAFrPLxHzBoNT/0+q 9yZcVANKsKVldygM39yeKOYHTsQJQcgUMw1Djat5YmgmMnOhHRP163JZwJK9DyzkBfiw 8ehQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=MrNou9auPFm9FKRkRu+HU2T08frRVOtlzk5xoUQB3hU=; b=XjWnNAGfMxWTQDWpHEfIOjG4QZvew/1HxtCj0EaAF3JpLDu6hFovLDK0s76we40VU1 BDTZJKCncidfTksSumH4LrZYhb18MrRgZ87fD7YpcmSi/AfvnxwVQ/ie88TlgESvj1UO oogBxC2qq8S3pPDA8KOQb6F/VW1dm3hhwDvI54yqxYlcZibKYb8SeV2eUYWTeVkch+EE NS7KSzLeh3URxPmfZWK4hZ2RqIJ5gtsqgsareycx0DLXXyqUYtC9bcp+qOfK4k+E4ls6 6Qf9v8T38bwXvXBcxD3QmN0wguLVkpaT/2vvyEIP5x0OcDD3RJoxdjazEv40EirieNX2 kDJw== X-Gm-Message-State: APt69E0HPoO52fryM8uO8nbzI0+Eb0maXAXp6WAGLe3hJfLuU3oeDVZd kHkTxYzkDLtzHP+tHldqxn8= X-Google-Smtp-Source: ADUXVKL3cGK79lrI924NyVOnWebaeUqDGrIHuN+liM5jjwqJ/PSsu+uuoGbCZ3GSIUYN5mWsmUcKpQ== X-Received: by 2002:a63:a702:: with SMTP id d2-v6mr11826699pgf.246.1528636838774; Sun, 10 Jun 2018 06:20:38 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.37 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:37 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:07 -0700 Message-Id: <1528637118-32739-9-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 08/18] x86: efi: Refactor the directory of EFI app and payload support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" At present the EFI application and payload support codes in the x86 directory is distributed in a hybrid way. For example, the Kconfig options for both app and payload are in arch/x86/lib/efi/Kconfig, but the source codes in the same directory get built only for CONFIG_EFI_STUB. This refactors the codes by consolidating all the EFI support codes into arch/x86/cpu/efi, just like other x86 targets. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/Kconfig | 3 +-- arch/x86/cpu/Makefile | 2 +- arch/x86/{lib => cpu}/efi/Kconfig | 0 arch/x86/cpu/efi/Makefile | 7 +++++++ arch/x86/{lib => cpu}/efi/car.S | 0 arch/x86/{lib/efi/efi.c => cpu/efi/payload.c} | 0 arch/x86/lib/Makefile | 1 - arch/x86/lib/efi/Makefile | 7 ------- 8 files changed, 9 insertions(+), 11 deletions(-) rename arch/x86/{lib => cpu}/efi/Kconfig (100%) rename arch/x86/{lib => cpu}/efi/car.S (100%) rename arch/x86/{lib/efi/efi.c => cpu/efi/payload.c} (100%) delete mode 100644 arch/x86/lib/efi/Makefile diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 460aed6..43fa30b 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -112,6 +112,7 @@ source "arch/x86/cpu/braswell/Kconfig" source "arch/x86/cpu/broadwell/Kconfig" source "arch/x86/cpu/coreboot/Kconfig" source "arch/x86/cpu/ivybridge/Kconfig" +source "arch/x86/cpu/efi/Kconfig" source "arch/x86/cpu/qemu/Kconfig" source "arch/x86/cpu/quark/Kconfig" source "arch/x86/cpu/queensbay/Kconfig" @@ -781,6 +782,4 @@ config HIGH_TABLE_SIZE Increse it if the default size does not fit the board's needs. This is most likely due to a large ACPI DSDT table is used. -source "arch/x86/lib/efi/Kconfig" - endmenu diff --git a/arch/x86/cpu/Makefile b/arch/x86/cpu/Makefile index af9e26c..f862d8c 100644 --- a/arch/x86/cpu/Makefile +++ b/arch/x86/cpu/Makefile @@ -29,7 +29,7 @@ obj-$(CONFIG_INTEL_BAYTRAIL) += baytrail/ obj-$(CONFIG_INTEL_BRASWELL) += braswell/ obj-$(CONFIG_INTEL_BROADWELL) += broadwell/ obj-$(CONFIG_SYS_COREBOOT) += coreboot/ -obj-$(CONFIG_EFI_APP) += efi/ +obj-$(CONFIG_EFI) += efi/ obj-$(CONFIG_QEMU) += qemu/ obj-$(CONFIG_NORTHBRIDGE_INTEL_IVYBRIDGE) += ivybridge/ obj-$(CONFIG_INTEL_QUARK) += quark/ diff --git a/arch/x86/lib/efi/Kconfig b/arch/x86/cpu/efi/Kconfig similarity index 100% rename from arch/x86/lib/efi/Kconfig rename to arch/x86/cpu/efi/Kconfig diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile index 06d0480..32c2dde 100644 --- a/arch/x86/cpu/efi/Makefile +++ b/arch/x86/cpu/efi/Makefile @@ -2,5 +2,12 @@ # # Copyright (c) 2015 Google, Inc +ifdef CONFIG_EFI_APP obj-y += efi.o obj-y += sdram.o +endif + +ifdef CONFIG_EFI_STUB +obj-y += car.o +obj-y += payload.o +endif diff --git a/arch/x86/lib/efi/car.S b/arch/x86/cpu/efi/car.S similarity index 100% rename from arch/x86/lib/efi/car.S rename to arch/x86/cpu/efi/car.S diff --git a/arch/x86/lib/efi/efi.c b/arch/x86/cpu/efi/payload.c similarity index 100% rename from arch/x86/lib/efi/efi.c rename to arch/x86/cpu/efi/payload.c diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 112ac3d..ba83ce2 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -14,7 +14,6 @@ endif obj-y += cmd_boot.o obj-$(CONFIG_SEABIOS) += coreboot_table.o obj-y += early_cmos.o -obj-$(CONFIG_EFI) += efi/ obj-y += e820.o obj-y += init_helpers.o obj-y += interrupts.o diff --git a/arch/x86/lib/efi/Makefile b/arch/x86/lib/efi/Makefile deleted file mode 100644 index f6c6523..0000000 --- a/arch/x86/lib/efi/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0+ -# -# (C) Copyright 2002-2006 -# Wolfgang Denk, DENX Software Engineering, wd@denx.de. - -obj-$(CONFIG_EFI_STUB) += car.o -obj-$(CONFIG_EFI_STUB) += efi.o From patchwork Sun Jun 10 13:25:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927346 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Zusz1/Ob"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cRD47Qxz9s01 for ; Sun, 10 Jun 2018 23:28:24 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 30C21C21DA6; Sun, 10 Jun 2018 13:23:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 95031C21E02; Sun, 10 Jun 2018 13:21:28 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 20B5EC21DED; Sun, 10 Jun 2018 13:20:48 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.denx.de (Postfix) with ESMTPS id 906A9C21D83 for ; Sun, 10 Jun 2018 13:20:41 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id l65-v6so8473743pgl.8 for ; Sun, 10 Jun 2018 06:20:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=DLHRoIYTgIEw4sCM6I8plXYDT/gg4UG7s5qIwhNbIX8=; b=Zusz1/ObSwNyUJzB3jGkBXQfFanUP5QNiCjgJaxS9MKhlZqNr5zkcpEFFTSunIeVm0 cmR1xoMoOBolgiY5XenZjiEmLQ4dPk1l2V6Vw4yK7Ag/owNE1prakVoTb8m6yDJSetP+ 4ZBnOQ7kjqSoSoY64e6wYLErM712BMXqOoFmeIQ0wlXUEfHZNQYgX+/9aVltPo5Cioho TLJ3euPR3T2bla8342kZZmrBVPORRRJTvcNYFWQHQXURh5czJ7oHIGs967fpNiw9Y824 zoJM03o55nY1W09scx2ESCeMZesj/9XCe0JnwJ2inO40pgc8wufgc5nRAYB5YKy75acW nxDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=DLHRoIYTgIEw4sCM6I8plXYDT/gg4UG7s5qIwhNbIX8=; b=o5R8tlU71FQ0/BwuMcgR28lvLGIuw6Wm4oUWD6TdLmFJ54F7t5Oy4qaTAFgiCtf/bJ 2WqOY/UlXPolIXbPvwGvyOexw369cHobUpQu6Zpmqz30dZAXhA0BWLvEcSYpku33fvfQ M3xqMhZhbhb7F6KTLgjxm3sOhzSU3M7eNqRmFyX5mTP5lFCzZf4sHa6wDFx7U7J5QsAs IyVT3BG4qgElWAIFjAW/XsegtUMUqwAhmrHc1nWEVd+7NH0VaiLTtz0BOyIE98AhIsAt kAe3jS3/tsj6ApGyTDlYpkI2RuDdCmLKXWcoRX3mrh5pJjGpCZZ0DQj7iTk7hDwuEu4s ADUQ== X-Gm-Message-State: APt69E2OpJc+xGPZJxgOGr70sFpwUUqK67fx01pcKvC1ID7X1ave9by4 3vvPRQCNgBHe/182flSgV8LYMw== X-Google-Smtp-Source: ADUXVKJsnEjkpSbsflumeOyDzJMlFL4uIAe+Q/zIAOKq9daL2ZyCe0pfgj52lwpepJlMZy/whOaQag== X-Received: by 2002:a63:648:: with SMTP id 69-v6mr11620726pgg.205.1528636840314; Sun, 10 Jun 2018 06:20:40 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.38 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:39 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:08 -0700 Message-Id: <1528637118-32739-10-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 09/18] x86: efi: payload: Add arch_cpu_init() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This adds arch_cpu_init() to the payload codes, in preparation for supporting a generic efi payload. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/efi/payload.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/cpu/efi/payload.c b/arch/x86/cpu/efi/payload.c index 81fb8b5..9fd9f57 100644 --- a/arch/x86/cpu/efi/payload.c +++ b/arch/x86/cpu/efi/payload.c @@ -5,11 +5,9 @@ */ #include -#include #include #include -#include -#include +#include DECLARE_GLOBAL_DATA_PTR; @@ -126,6 +124,13 @@ int dram_init_banksize(void) return 0; } +int arch_cpu_init(void) +{ + post_code(POST_CPU_INIT); + + return x86_cpu_init_f(); +} + int checkcpu(void) { return 0; From patchwork Sun Jun 10 13:25:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927348 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="R0qHG3Y2"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cS13LVvz9rvt for ; Sun, 10 Jun 2018 23:29:05 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id C871EC21C8B; Sun, 10 Jun 2018 13:23:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 92B6BC21DB6; Sun, 10 Jun 2018 13:21:37 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2E5C3C21D56; Sun, 10 Jun 2018 13:20:48 +0000 (UTC) Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) by lists.denx.de (Postfix) with ESMTPS id 0CF38C21E0D for ; Sun, 10 Jun 2018 13:20:43 +0000 (UTC) Received: by mail-pg0-f51.google.com with SMTP id l65-v6so8473751pgl.8 for ; Sun, 10 Jun 2018 06:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Dx8n1q+Eyyfyek7ca9Cd37l7F+SIX29mZI7NMW1+drc=; b=R0qHG3Y2XKslOtnBSj9DDolPDbyIVqtlu4scRoRVKeluXNaYWgf2ToTopk7Fk0Mb7w dCDGA3sbe2OZ6QuahyO2FXhEOSeB0uECRcGRKjqNuvlCWWsJNxcln5aZmCHb04Vqnekt Jeqkmfrvc8ejmhN29IaI6F7aKavWGAy+cEr/nqPfVWXlqvlXlNtK//uQAkm5odsROaNn CTkElTKOxVO100OIZdQdCAlm+ByHeOfIHwIHquwV6NPbHXQryX1UaLPgpYUWpzfdybn3 YP5UGj24XYuyR5i/eoTexilUM0Tem7FO+ZNO/4LMBMXOeUOarEWSoVn/pFo5VRBBoeVn R2bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Dx8n1q+Eyyfyek7ca9Cd37l7F+SIX29mZI7NMW1+drc=; b=tB9r0UzyQeRjptr3DTCkbhymy5l0o/zlBDGcQ/Y+TmAW6+31Wuy+A59Y2OdnnbmA/i GDG0LTwmvTxXBkKZ1wwNQyMdJudtwwK7IY4Z7y8Nd46SmMZyhDcpEAXFRsGjPUKbw5xe Zku4rmFAcWKtiOxCJcm5nMZwlKXj+8gqMeYMUU9RV3IHJykS5Qh0DYr+DWzfMmvDVbEZ rpb51N1WGd4xVVl9UjgoS2aw58muO/nuzsrK9/hIW2MxwmQvZTP0h3E4KHd17JT6Rq5O c7aECwsq0BTjfgAblr2rsfDLrQpwAZPMlqmGW2F9LXMvGFvp6ZKIxxU1kgofwgzhK/Ti 8RSQ== X-Gm-Message-State: APt69E1Tw8YiynmtU/ayd7gRQrwbSS7rTL5OBjljAPFj+/CaUamIK8ZW S7h5u+Lnw9bPmUeR1Vruh4Y= X-Google-Smtp-Source: ADUXVKIySxVhTCnVW3OLW7iBhXkN5avza6ReDu4thTeneQ2qJ/2LS5r9RZWAo2ZQAVysBZDHVODtLQ== X-Received: by 2002:a63:7c55:: with SMTP id l21-v6mr11760559pgn.352.1528636841764; Sun, 10 Jun 2018 06:20:41 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.40 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:40 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:09 -0700 Message-Id: <1528637118-32739-11-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Alexander Graf Subject: [U-Boot] [PATCH 10/18] x86: efi: payload: Minor clean up on error message output X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If GetMemoryMap() fails, we really want to know EFI_BITS_PER_LONG instead of BITS_PER_LONG. A space and LF are added in places where error message is output to improve readability. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- lib/efi/efi_stub.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 3138739..09023a2 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -281,7 +281,8 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) ret = efi_init(priv, "Payload", image, sys_table); if (ret) { - printhex2(ret); puts(" efi_init() failed\n"); + printhex2(ret); + puts(" efi_init() failed\n"); return ret; } global_priv = priv; @@ -294,7 +295,8 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) size = 0; ret = boot->get_memory_map(&size, NULL, &key, &desc_size, &version); if (ret != EFI_BUFFER_TOO_SMALL) { - printhex2(BITS_PER_LONG); + printhex2(EFI_BITS_PER_LONG); + putc(' '); printhex2(ret); puts(" No memory map\n"); return ret; @@ -303,7 +305,7 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) desc = efi_malloc(priv, size, &ret); if (!desc) { printhex2(ret); - puts(" No memory for memory descriptor: "); + puts(" No memory for memory descriptor\n"); return ret; } ret = setup_info_table(priv, size + 128); From patchwork Sun Jun 10 13:25:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927354 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="I5NIZnFc"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cTy5tLPz9ryk for ; Sun, 10 Jun 2018 23:30:46 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 6CCD8C21D4A; Sun, 10 Jun 2018 13:24:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BDF75C21E2C; Sun, 10 Jun 2018 13:21:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 5C730C21D4A; Sun, 10 Jun 2018 13:20:49 +0000 (UTC) Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by lists.denx.de (Postfix) with ESMTPS id A8BA0C21DC1 for ; Sun, 10 Jun 2018 13:20:44 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id w17-v6so10799425pll.9 for ; Sun, 10 Jun 2018 06:20:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=zhoi8bw92UB/p78AzDOcjgkGUWcevDJ7ASPKVyzMQSs=; b=I5NIZnFcLmGsgSx8sQVjcPqfH0e2k6MrykjHn8DFBIqZw9tYW09um2wNZliOStu/O1 hJ6negHs09INVMtarjJyy+VNz9JjmPuZuqWLLR2ZMgA9a/XNW5Isj7UMxdJLXkPxjQym 5SO5WCS6iVOwV4mUjjVWijgIlB6jNtFSX5P+IBoEnfYBHBUQN8ut22Pfzsj/9eX6l0Zm TRPFAvE/j1++H3Px2j1qbz3BRcHOhrYh5YVWaIKAU0o5emkE+x3PwjJW6UfNUumX+XRS 0CUJhE7RtpxozUPeaVh9OOXv90sPnlUd1ohDAsFCmw6nW/5lkGBbRicvnB9FKpCak+tr R/0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=zhoi8bw92UB/p78AzDOcjgkGUWcevDJ7ASPKVyzMQSs=; b=Z8+CC90W2oR6qc7F28qdlfNf0efmP2FJOdiGJih/qpLMWyQcOzZclh29GC1Oqz4aqM XRAtj4grcHW02VKaebpV7yCAkT+U7OC7CK0brhZbCIV/X20gLGOtnRee6HLpF+a2B47p MMTRpln2XC/bdVpEn6/xYOuz0p1LStNuzpNSn1zYr3fylIyM8bhdaFC7hhf+AwExdbdw pCgbYulQ1G788ttoYdLvH4hIlln70mKSnFnZLRIQfNY4Rj7CTBWmwsuGaMSmy+weBPif mBjWpUzTuWv3JG51TiRo7dYV6pnKLM48Q3EX1gAtuRaXg4bemRp6OrkIkguItggTznX/ BgmQ== X-Gm-Message-State: APt69E3QSANBp0eiY2Xnft+K9hGmReO3EheE/cO+wzIWAwcW8T9kQ4gl yEgrD5727y8rh6DHY1T7rhDrqg== X-Google-Smtp-Source: ADUXVKL9fkIJ8GDu3Yh8m7f476A+HKkUuVTdHX41+fz1g2fakq3d082Qh51ZPmBvFhwDhB+6QML0DQ== X-Received: by 2002:a17:902:5a1:: with SMTP id f30-v6mr14413545plf.167.1528636843267; Sun, 10 Jun 2018 06:20:43 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.41 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:42 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:10 -0700 Message-Id: <1528637118-32739-12-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 11/18] x86: Add generic EFI payload support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" It is possible to create a generic EFI payload for all x86 boards. The payload is configured to include as many generic drivers as possible. All stuff that touches low-level initialization are not allowed as such is the EFI BIOS's responsibility. Platform specific drivers (like gpio, spi, etc) are not included. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/dts/Makefile | 1 + arch/x86/dts/efi-x86_payload.dts | 36 +++++++++++++++++++++++++++++++++ board/efi/Kconfig | 9 +++++++++ board/efi/efi-x86_payload/Kconfig | 38 +++++++++++++++++++++++++++++++++++ board/efi/efi-x86_payload/MAINTAINERS | 7 +++++++ board/efi/efi-x86_payload/Makefile | 5 +++++ board/efi/efi-x86_payload/start.S | 8 ++++++++ configs/efi-x86_payload32_defconfig | 35 ++++++++++++++++++++++++++++++++ configs/efi-x86_payload64_defconfig | 36 +++++++++++++++++++++++++++++++++ include/configs/efi-x86_payload.h | 32 +++++++++++++++++++++++++++++ 10 files changed, 207 insertions(+) create mode 100644 arch/x86/dts/efi-x86_payload.dts create mode 100644 board/efi/efi-x86_payload/Kconfig create mode 100644 board/efi/efi-x86_payload/MAINTAINERS create mode 100644 board/efi/efi-x86_payload/Makefile create mode 100644 board/efi/efi-x86_payload/start.S create mode 100644 configs/efi-x86_payload32_defconfig create mode 100644 configs/efi-x86_payload64_defconfig create mode 100644 include/configs/efi-x86_payload.h diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile index 7379774..9872c04 100644 --- a/arch/x86/dts/Makefile +++ b/arch/x86/dts/Makefile @@ -11,6 +11,7 @@ dtb-y += bayleybay.dtb \ dfi-bt700-q7x-151.dtb \ edison.dtb \ efi.dtb \ + efi-x86_payload.dtb \ galileo.dtb \ minnowmax.dtb \ qemu-x86_i440fx.dtb \ diff --git a/arch/x86/dts/efi-x86_payload.dts b/arch/x86/dts/efi-x86_payload.dts new file mode 100644 index 0000000..137bde5 --- /dev/null +++ b/arch/x86/dts/efi-x86_payload.dts @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018, Bin Meng + * + * Generic EFI payload device tree for x86 targets + */ + +/dts-v1/; + +/include/ "skeleton.dtsi" +/include/ "serial.dtsi" +/include/ "keyboard.dtsi" +/include/ "rtc.dtsi" +/include/ "tsc_timer.dtsi" + +/ { + model = "EFI x86 Payload"; + compatible = "efi,x86-payload"; + + aliases { + serial0 = &serial; + }; + + config { + silent_console = <0>; + }; + + chosen { + stdout-path = "/serial"; + }; + + pci { + compatible = "pci-x86"; + u-boot,dm-pre-reloc; + }; +}; diff --git a/board/efi/Kconfig b/board/efi/Kconfig index 6f86a48..d37f6ff 100644 --- a/board/efi/Kconfig +++ b/board/efi/Kconfig @@ -12,8 +12,17 @@ config TARGET_EFI takes over once the RAM, video and CPU are fully running. U-Boot is loaded as an application from EFI. +config TARGET_EFI_PAYLOAD + bool "efi payload" + help + This target is used for running U-Boot on top of EFI. In + this case EFI does the early initialisation, and U-Boot + takes over once the RAM, video and CPU are fully running. + U-Boot is loaded as a payload from EFI. + endchoice source "board/efi/efi-x86/Kconfig" +source "board/efi/efi-x86_payload/Kconfig" endif diff --git a/board/efi/efi-x86_payload/Kconfig b/board/efi/efi-x86_payload/Kconfig new file mode 100644 index 0000000..dcf4de8 --- /dev/null +++ b/board/efi/efi-x86_payload/Kconfig @@ -0,0 +1,38 @@ +if TARGET_EFI_PAYLOAD + +config SYS_BOARD + default "efi-x86_payload" + +config SYS_VENDOR + default "efi" + +config SYS_SOC + default "efi" + +config SYS_CONFIG_NAME + default "efi-x86_payload" + +config SYS_TEXT_BASE + default 0x00200000 + +config BOARD_SPECIFIC_OPTIONS # dummy + def_bool y + imply SYS_NS16550 + imply SCSI + imply SCSI_AHCI + imply AHCI_PCI + imply MMC + imply MMC_PCI + imply MMC_SDHCI + imply MMC_SDHCI_SDMA + imply USB + imply USB_EHCI_HCD + imply USB_XHCI_HCD + imply USB_STORAGE + imply USB_KEYBOARD + imply E1000 + imply ETH_DESIGNWARE + imply PCH_GBE + imply RTL8169 + +endif diff --git a/board/efi/efi-x86_payload/MAINTAINERS b/board/efi/efi-x86_payload/MAINTAINERS new file mode 100644 index 0000000..abf3a15 --- /dev/null +++ b/board/efi/efi-x86_payload/MAINTAINERS @@ -0,0 +1,7 @@ +EFI-X86_PAYLOAD BOARD +M: Bin Meng +S: Maintained +F: board/efi/efi-x86_payload/ +F: include/configs/efi-x86_payload.h +F: configs/efi-x86_payload32_defconfig +F: configs/efi-x86_payload64_defconfig diff --git a/board/efi/efi-x86_payload/Makefile b/board/efi/efi-x86_payload/Makefile new file mode 100644 index 0000000..6982340 --- /dev/null +++ b/board/efi/efi-x86_payload/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# Copyright (C) 2018, Bin Meng + +obj-y += start.o diff --git a/board/efi/efi-x86_payload/start.S b/board/efi/efi-x86_payload/start.S new file mode 100644 index 0000000..f7eaa7c --- /dev/null +++ b/board/efi/efi-x86_payload/start.S @@ -0,0 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018, Bin Meng + */ + +.globl early_board_init +early_board_init: + jmp early_board_init_ret diff --git a/configs/efi-x86_payload32_defconfig b/configs/efi-x86_payload32_defconfig new file mode 100644 index 0000000..7f0cab0 --- /dev/null +++ b/configs/efi-x86_payload32_defconfig @@ -0,0 +1,35 @@ +CONFIG_X86=y +CONFIG_VENDOR_EFI=y +CONFIG_DEFAULT_DEVICE_TREE="efi-x86_payload" +CONFIG_TARGET_EFI_PAYLOAD=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_LAST_STAGE_INIT=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_IDE=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +# CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_MAC_PARTITION=y +CONFIG_ISO_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y +# CONFIG_PCI_PNP is not set +CONFIG_EFI=y +CONFIG_EFI_STUB=y diff --git a/configs/efi-x86_payload64_defconfig b/configs/efi-x86_payload64_defconfig new file mode 100644 index 0000000..8d7f3f0 --- /dev/null +++ b/configs/efi-x86_payload64_defconfig @@ -0,0 +1,36 @@ +CONFIG_X86=y +CONFIG_VENDOR_EFI=y +CONFIG_DEFAULT_DEVICE_TREE="efi-x86_payload" +CONFIG_TARGET_EFI_PAYLOAD=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_USE_BOOTARGS=y +CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" +CONFIG_SYS_CONSOLE_INFO_QUIET=y +CONFIG_DISPLAY_BOARDINFO_LATE=y +CONFIG_LAST_STAGE_INIT=y +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_FLASH is not set +CONFIG_CMD_IDE=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PART=y +CONFIG_CMD_USB=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_DHCP=y +# CONFIG_CMD_NFS is not set +CONFIG_CMD_PING=y +CONFIG_CMD_TIME=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_CMD_FS_GENERIC=y +CONFIG_MAC_PARTITION=y +CONFIG_ISO_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_REGMAP=y +CONFIG_SYSCON=y +# CONFIG_PCI_PNP is not set +CONFIG_EFI=y +CONFIG_EFI_STUB=y +CONFIG_EFI_STUB_64BIT=y diff --git a/include/configs/efi-x86_payload.h b/include/configs/efi-x86_payload.h new file mode 100644 index 0000000..9c62fd2 --- /dev/null +++ b/include/configs/efi-x86_payload.h @@ -0,0 +1,32 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2018, Bin Meng + */ + +/* + * board/config.h - configuration options, board specific + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include + +#define CONFIG_SYS_MONITOR_LEN (1 << 20) + +#define CONFIG_STD_DEVICES_SETTINGS "stdin=serial,i8042-kbd\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" + +/* ATA/IDE support */ +#define CONFIG_SYS_IDE_MAXBUS 2 +#define CONFIG_SYS_IDE_MAXDEVICE 4 +#define CONFIG_SYS_ATA_BASE_ADDR 0 +#define CONFIG_SYS_ATA_DATA_OFFSET 0 +#define CONFIG_SYS_ATA_REG_OFFSET 0 +#define CONFIG_SYS_ATA_ALT_OFFSET 0 +#define CONFIG_SYS_ATA_IDE0_OFFSET 0x1f0 +#define CONFIG_SYS_ATA_IDE1_OFFSET 0x170 +#define CONFIG_ATAPI + +#endif /* __CONFIG_H */ From patchwork Sun Jun 10 13:25:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927352 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="lvGSdIKj"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cT83f9Bz9ryk for ; Sun, 10 Jun 2018 23:30:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 07465C21DA6; Sun, 10 Jun 2018 13:25:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E400EC21D56; Sun, 10 Jun 2018 13:22:06 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21A84C21DCA; Sun, 10 Jun 2018 13:20:50 +0000 (UTC) Received: from mail-pl0-f65.google.com (mail-pl0-f65.google.com [209.85.160.65]) by lists.denx.de (Postfix) with ESMTPS id EAE80C21DB5 for ; Sun, 10 Jun 2018 13:20:45 +0000 (UTC) Received: by mail-pl0-f65.google.com with SMTP id n10-v6so10800624plp.0 for ; Sun, 10 Jun 2018 06:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=Fz5PVblBGtoUVpjeBLEXFcdaKgDaZksBTsthtKToz2w=; b=lvGSdIKjhiW9qbDCKHX6osXXUSSFlzBWunc3r/2M267NZwQrTUCkErYEMhJWYglQ0T xSMoULLcs2dIek4nN0jZ+EXQqy7g0nAKHxy4+NWbNlnLuufwi8yxw4kqAmn8tr7D5ZzV AEZWZDL7wTXaWcUqYXlxWYAMqOM9bjK9voFTE2RQr1yJ5jt486KgFujgtyyv/BvG3stJ 6TI60/uh0f2kTEk9Er7aRa5X6A7G4N0rbggGSKsfyKgiHvOQG1axSRYgFUOJjD3zag7R Ae4bS40x9aQdtOB4HrCWcY/8E/ZS9a+WghI6Cg/LGyu0XuYe3QvmjfX+IYWKLhFAswgd T8YQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=Fz5PVblBGtoUVpjeBLEXFcdaKgDaZksBTsthtKToz2w=; b=rf+6lz0+tB2ZqHfSpse7DnXw6sfR8XROIDQ/RLMJyR0Zsl+sIjjvR+lIQ7oB/Tnv3j IKG4t+9KPw7vL12n+lTm6Lur0cmsaR/MYaCWhd6mQ9YWeLQC9KpzPcqlVmxQBm5otMlu yT2KluFhKMXJZmBrXTQaDpA4pA8BLA8ZGU5Zr9UijlbnJ549MK6d16riPTxY1ZdGp6k9 pw4bwoEQmHadmhxmqFaizeGqmAFjJuzMDOpkMksQxUMJWuY5k/5c3x93YT181UPsvyPA dxZnySR0PJQP3ZoIcaFOrnkOCRV3+SMafeBrVRpnnCfDI/ha7D5p2TjyYq2NVFcXpxuV amhA== X-Gm-Message-State: APt69E1q/3JIi6JKft/1UAd/IviJUOZFicC2gBFeEL8EYgUUGDWt4dZG v2KeD16S+ZsWKdh/UWnrTxE= X-Google-Smtp-Source: ADUXVKLlKhwg8n4rkpdR87DPnshEmDdajmZIChJr+rD7zDhgSZ7NyCacIPCV9mj4G0ApI8Gpttrl/A== X-Received: by 2002:a17:902:9a08:: with SMTP id v8-v6mr14508776plp.148.1528636844642; Sun, 10 Jun 2018 06:20:44 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.43 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:43 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:11 -0700 Message-Id: <1528637118-32739-13-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 12/18] x86: Drop QEMU-specific EFI payload support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that we have generic EFI payload support for all x86 boards, drop the QEMU-specific one. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/qemu/Makefile | 2 -- arch/x86/cpu/qemu/qemu.c | 4 --- board/emulation/qemu-x86/Kconfig | 6 ++-- configs/qemu-x86_efi_payload32_defconfig | 47 ------------------------------- configs/qemu-x86_efi_payload64_defconfig | 48 -------------------------------- 5 files changed, 3 insertions(+), 104 deletions(-) delete mode 100644 configs/qemu-x86_efi_payload32_defconfig delete mode 100644 configs/qemu-x86_efi_payload64_defconfig diff --git a/arch/x86/cpu/qemu/Makefile b/arch/x86/cpu/qemu/Makefile index e5ea925..1761244 100644 --- a/arch/x86/cpu/qemu/Makefile +++ b/arch/x86/cpu/qemu/Makefile @@ -2,8 +2,6 @@ # # Copyright (C) 2015, Bin Meng -ifndef CONFIG_EFI_STUB obj-y += car.o dram.o -endif obj-y += qemu.o obj-$(CONFIG_QFW) += cpu.o e820.o diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c index 1fdb11c..ca4b3f0 100644 --- a/arch/x86/cpu/qemu/qemu.c +++ b/arch/x86/cpu/qemu/qemu.c @@ -143,10 +143,6 @@ int arch_cpu_init(void) return x86_cpu_init_f(); } -#endif - -#if !CONFIG_IS_ENABLED(EFI_STUB) && \ - !CONFIG_IS_ENABLED(SPL_X86_32BIT_INIT) int checkcpu(void) { diff --git a/board/emulation/qemu-x86/Kconfig b/board/emulation/qemu-x86/Kconfig index a593f8c..41a27dd 100644 --- a/board/emulation/qemu-x86/Kconfig +++ b/board/emulation/qemu-x86/Kconfig @@ -13,12 +13,12 @@ config SYS_CONFIG_NAME default "qemu-x86" config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB && !SUPPORT_SPL - default 0x01110000 if EFI_STUB || SUPPORT_SPL + default 0xfff00000 if !SUPPORT_SPL + default 0x01110000 if SUPPORT_SPL config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select X86_RESET_VECTOR if !EFI_STUB + select X86_RESET_VECTOR select QEMU select BOARD_ROMSIZE_KB_1024 diff --git a/configs/qemu-x86_efi_payload32_defconfig b/configs/qemu-x86_efi_payload32_defconfig deleted file mode 100644 index 36705db..0000000 --- a/configs/qemu-x86_efi_payload32_defconfig +++ /dev/null @@ -1,47 +0,0 @@ -CONFIG_X86=y -CONFIG_SYS_TEXT_BASE=0x1110000 -CONFIG_MAX_CPUS=2 -CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" -CONFIG_SMP=y -CONFIG_FIT=y -CONFIG_BOOTSTAGE=y -CONFIG_BOOTSTAGE_REPORT=y -CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" -CONFIG_SYS_CONSOLE_INFO_QUIET=y -CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_LAST_STAGE_INIT=y -CONFIG_HUSH_PARSER=y -CONFIG_CMD_CPU=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_IDE=y -CONFIG_CMD_PART=y -CONFIG_CMD_SF=y -CONFIG_CMD_SPI=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -# CONFIG_CMD_NFS is not set -CONFIG_CMD_PING=y -CONFIG_CMD_TIME=y -CONFIG_CMD_QFW=y -CONFIG_CMD_BOOTSTAGE=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y -CONFIG_MAC_PARTITION=y -CONFIG_ISO_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_REGMAP=y -CONFIG_SYSCON=y -CONFIG_CPU=y -CONFIG_SPI=y -CONFIG_USB_STORAGE=y -CONFIG_USB_KEYBOARD=y -CONFIG_FRAMEBUFFER_SET_VESA_MODE=y -CONFIG_FRAMEBUFFER_VESA_MODE_112=y -CONFIG_CONSOLE_SCROLL_LINES=5 -CONFIG_EFI=y -CONFIG_EFI_STUB=y diff --git a/configs/qemu-x86_efi_payload64_defconfig b/configs/qemu-x86_efi_payload64_defconfig deleted file mode 100644 index 5b0806b..0000000 --- a/configs/qemu-x86_efi_payload64_defconfig +++ /dev/null @@ -1,48 +0,0 @@ -CONFIG_X86=y -CONFIG_SYS_TEXT_BASE=0x1110000 -CONFIG_MAX_CPUS=2 -CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx" -CONFIG_SMP=y -CONFIG_FIT=y -CONFIG_BOOTSTAGE=y -CONFIG_BOOTSTAGE_REPORT=y -CONFIG_USE_BOOTARGS=y -CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro" -CONFIG_SYS_CONSOLE_INFO_QUIET=y -CONFIG_DISPLAY_BOARDINFO_LATE=y -CONFIG_LAST_STAGE_INIT=y -CONFIG_HUSH_PARSER=y -CONFIG_CMD_CPU=y -# CONFIG_CMD_FLASH is not set -CONFIG_CMD_IDE=y -CONFIG_CMD_PART=y -CONFIG_CMD_SF=y -CONFIG_CMD_SPI=y -CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set -CONFIG_CMD_DHCP=y -# CONFIG_CMD_NFS is not set -CONFIG_CMD_PING=y -CONFIG_CMD_TIME=y -CONFIG_CMD_QFW=y -CONFIG_CMD_BOOTSTAGE=y -CONFIG_CMD_EXT2=y -CONFIG_CMD_EXT4=y -CONFIG_CMD_EXT4_WRITE=y -CONFIG_CMD_FAT=y -CONFIG_CMD_FS_GENERIC=y -CONFIG_MAC_PARTITION=y -CONFIG_ISO_PARTITION=y -CONFIG_EFI_PARTITION=y -CONFIG_REGMAP=y -CONFIG_SYSCON=y -CONFIG_CPU=y -CONFIG_SPI=y -CONFIG_USB_STORAGE=y -CONFIG_USB_KEYBOARD=y -CONFIG_FRAMEBUFFER_SET_VESA_MODE=y -CONFIG_FRAMEBUFFER_VESA_MODE_112=y -CONFIG_CONSOLE_SCROLL_LINES=5 -CONFIG_EFI=y -CONFIG_EFI_STUB=y -CONFIG_EFI_STUB_64BIT=y From patchwork Sun Jun 10 13:25:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927349 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="almae/WR"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cSJ6V0sz9rvt for ; Sun, 10 Jun 2018 23:29:20 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 8FB54C21C27; Sun, 10 Jun 2018 13:24:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B7247C21DFB; Sun, 10 Jun 2018 13:21:40 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CC8F8C21C8B; Sun, 10 Jun 2018 13:20:51 +0000 (UTC) Received: from mail-pl0-f49.google.com (mail-pl0-f49.google.com [209.85.160.49]) by lists.denx.de (Postfix) with ESMTPS id 6FEDCC21DCA for ; Sun, 10 Jun 2018 13:20:47 +0000 (UTC) Received: by mail-pl0-f49.google.com with SMTP id g20-v6so10810180plq.1 for ; Sun, 10 Jun 2018 06:20:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=vQAxEtK4s8J2/UTqnWmkcF9vv0hUqgVpbN4ojagEyZo=; b=almae/WRK6+1nKQsPKcsAOJBkVoLW9Td4ApkqUWAQJXUkAFPwvPDavoULiMcxk0vKL kUcbYOzTSmRcdmPvkFeWL9hr/frk9jU4IczlWUhC+bYySIDVhA/r4VB8z/hgfX5vyhdE rWWvcRA42CbSeUtlpi9ik1sDtqKoKPLaFyTgXpFQR8HoBZ75G7KRzbJzkI/nU99J2HZv MKfjhFFrC6dbLmp3dqIjeuSYOfXj0DTJ3733EDemDScH323ti5tM+LdSOc1hHB3WLWtE aR0dgIjs9SQ9ofEKCpAw/6LehYXBXW9lJUybdwAyrdxogp3DaTYh3VjACWsz2JSmsII/ RJYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=vQAxEtK4s8J2/UTqnWmkcF9vv0hUqgVpbN4ojagEyZo=; b=EM/jcqiysdnsTp7PsAFThYwHyrcmc60tWKZ/GzA3TpAgd71pVxRkwkpSZupGGB7pCm txVlb+e10ogyE0WqLe9bhDY2/uXgEGxIaBDA9eOJMDgVEqQclNMq1aj1K+4HiwXme0Cq WLmAloyoaR0kD3Ia2xwGZZUFdS370r7ljs0ioYSLupBlNWr4S/8SLXNc29/BXa5nGXUx 7yS6npH251ZttxtLBcvt4kHMiwMwCAH1o4byjKEzq4yG4rAvx5g4sTTyd02EB94fVSnD ++5UrLllLCyKzEKJFa+D5qkVfs8xxwqoR4S/ctNokuOHMPEELhkksDfzulBmidbGdsYj GaVw== X-Gm-Message-State: APt69E02KnZACun7iKAmHIPLrQbgMbEFIT557EAdT8VQ6NbSu3t7Is6H tKjwsjYTKit3COe0h0s7/zNo+w== X-Google-Smtp-Source: ADUXVKIg2ZCQGMTxh5znSjUwzGRSpHrjb9F/GnUD5TDNEX4eMEdU5CS+IPBNx6naUJsOkkjfwmTLrg== X-Received: by 2002:a17:902:8685:: with SMTP id g5-v6mr7713879plo.180.1528636846133; Sun, 10 Jun 2018 06:20:46 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.44 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:45 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:12 -0700 Message-Id: <1528637118-32739-14-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Stefan Roese Subject: [U-Boot] [PATCH 13/18] x86: baytrail: Drop EFI-specific test logics X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Now that we have generic EFI payload support, drop EFI-specific test logics in BayTrail Kconfig and codes, and all BayTrail boards too. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/baytrail/Kconfig | 6 +++--- arch/x86/cpu/baytrail/valleyview.c | 3 --- board/advantech/som-db5800-som-6867/Kconfig | 5 ++--- board/congatec/conga-qeval20-qa3-e3845/Kconfig | 5 ++--- board/dfi/dfi-bt700/Kconfig | 5 ++--- board/intel/minnowmax/Kconfig | 5 ++--- 6 files changed, 11 insertions(+), 18 deletions(-) diff --git a/arch/x86/cpu/baytrail/Kconfig b/arch/x86/cpu/baytrail/Kconfig index 022a9f2..d2c3473 100644 --- a/arch/x86/cpu/baytrail/Kconfig +++ b/arch/x86/cpu/baytrail/Kconfig @@ -4,10 +4,10 @@ config INTEL_BAYTRAIL bool - select HAVE_FSP if !EFI - select ARCH_MISC_INIT if !EFI + select HAVE_FSP + select ARCH_MISC_INIT select CPU_INTEL_TURBO_NOT_PACKAGE_SCOPED - imply HAVE_INTEL_ME if !EFI + imply HAVE_INTEL_ME imply ENABLE_MRC_CACHE imply AHCI_PCI imply ICH_SPI diff --git a/arch/x86/cpu/baytrail/valleyview.c b/arch/x86/cpu/baytrail/valleyview.c index 3194f8c..b7d481a 100644 --- a/arch/x86/cpu/baytrail/valleyview.c +++ b/arch/x86/cpu/baytrail/valleyview.c @@ -17,7 +17,6 @@ #define BYT_TRIG_LVL BIT(24) #define BYT_TRIG_POS BIT(25) -#ifndef CONFIG_EFI_APP int arch_cpu_init(void) { post_code(POST_CPU_INIT); @@ -57,8 +56,6 @@ int arch_misc_init(void) return 0; } -#endif - void reset_cpu(ulong addr) { /* cold reset */ diff --git a/board/advantech/som-db5800-som-6867/Kconfig b/board/advantech/som-db5800-som-6867/Kconfig index fac562a..35d58fc 100644 --- a/board/advantech/som-db5800-som-6867/Kconfig +++ b/board/advantech/som-db5800-som-6867/Kconfig @@ -13,12 +13,11 @@ config SYS_CONFIG_NAME default "som-db5800-som-6867" config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB - default 0x01110000 if EFI_STUB + default 0xfff00000 config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select X86_RESET_VECTOR if !EFI_STUB + select X86_RESET_VECTOR select INTEL_BAYTRAIL select BOARD_ROMSIZE_KB_8192 select BOARD_EARLY_INIT_F diff --git a/board/congatec/conga-qeval20-qa3-e3845/Kconfig b/board/congatec/conga-qeval20-qa3-e3845/Kconfig index 9e44413..6469250 100644 --- a/board/congatec/conga-qeval20-qa3-e3845/Kconfig +++ b/board/congatec/conga-qeval20-qa3-e3845/Kconfig @@ -12,12 +12,11 @@ config SYS_CONFIG_NAME default "theadorable-x86-conga-qa3-e3845" if TARGET_THEADORABLE_X86_CONGA_QA3_E3845 config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB - default 0x01110000 if EFI_STUB + default 0xfff00000 config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select X86_RESET_VECTOR if !EFI_STUB + select X86_RESET_VECTOR select INTEL_BAYTRAIL select BOARD_ROMSIZE_KB_8192 select BOARD_EARLY_INIT_F diff --git a/board/dfi/dfi-bt700/Kconfig b/board/dfi/dfi-bt700/Kconfig index f92f50a..50c7b2a 100644 --- a/board/dfi/dfi-bt700/Kconfig +++ b/board/dfi/dfi-bt700/Kconfig @@ -12,12 +12,11 @@ config SYS_CONFIG_NAME default "theadorable-x86-dfi-bt700" if TARGET_THEADORABLE_X86_DFI_BT700 config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB - default 0x01110000 if EFI_STUB + default 0xfff00000 config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select X86_RESET_VECTOR if !EFI_STUB + select X86_RESET_VECTOR select INTEL_BAYTRAIL select BOARD_ROMSIZE_KB_8192 select BOARD_EARLY_INIT_F diff --git a/board/intel/minnowmax/Kconfig b/board/intel/minnowmax/Kconfig index a8668e4..543468c 100644 --- a/board/intel/minnowmax/Kconfig +++ b/board/intel/minnowmax/Kconfig @@ -13,12 +13,11 @@ config SYS_CONFIG_NAME default "minnowmax" config SYS_TEXT_BASE - default 0xfff00000 if !EFI_STUB - default 0x01110000 if EFI_STUB + default 0xfff00000 config BOARD_SPECIFIC_OPTIONS # dummy def_bool y - select X86_RESET_VECTOR if !EFI_STUB + select X86_RESET_VECTOR select INTEL_BAYTRAIL select BOARD_ROMSIZE_KB_8192 select SPI_FLASH_STMICRO From patchwork Sun Jun 10 13:25:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927343 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Ane96JHt"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cNm2116z9rvt for ; Sun, 10 Jun 2018 23:26:16 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id EF7D7C21DAF; Sun, 10 Jun 2018 13:25:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 6EC47C21E6A; Sun, 10 Jun 2018 13:21:59 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 752B7C21DD9; Sun, 10 Jun 2018 13:20:52 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id E6650C21E29 for ; Sun, 10 Jun 2018 13:20:48 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id j20-v6so8843959pff.10 for ; Sun, 10 Jun 2018 06:20:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=CO6H9q77Yx3zJ8wx0D9Lpjrfsr9BjIc4up7h1D0gnFI=; b=Ane96JHtvxQgexfliPs/C8tY27xgUyD6qH/rO3KsVa1iyaZuKwyFte3G8tZTz9cGtF F137z5CYX6WQg9fizHs//1GlDIkz2anU3qt8FSaC3gQ3YD9noJ4uDZroGpRT8wddbOYa ENIWQ4mfF5GQ8KHjzidp+7r6MRd7glH8UDHyYNS8g8objymlnos9xraoFoqkmjDPQGjv 3szf7XyIpgbpXkSL+scn1tggP4+Iphkf28JmbP+ZFt+6tLN99eiBgE1wawwH21wZg6DF pHyNwWRY0nSWaZI8vZC+xekGQQyaQ1/oPpcLCL0zZ6eGxooJL6nA7TYSdGLMU3czMB0Z u7tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=CO6H9q77Yx3zJ8wx0D9Lpjrfsr9BjIc4up7h1D0gnFI=; b=DaBzqIWyMT4Tr5gcTcxiU+R2NI0NdoUsTr2JMDypjXRjAm6oxVCHVpNFA9Rchq/mQU 2sdJpdBDPDdlTOpw1GG9owDKZHfggY6Rza5wz8D8dICfIw3klafBV9O3GoRv9UZnVcd/ CUyvT0E5RIj3uj1qKswXpp2mmRYENvgK5Yuaoe+xZDxwCd9FCjLmG+q1yGNNzlJT7Zy3 QL3YPLmYJ4p6JJ8gjT/4cwUxE2f7B+sUBLM/XQPJ+CU2/mxQfdw/CVaqZ/C24+kNakvY vrjGuwotk7EKNVm9MYL7Elh9S5mTpWhaxhPwVfh0vT/iENP05xnH4nVrusNJxWKr/N/Q ij/g== X-Gm-Message-State: APt69E1ynjZMjuJy44Zviz3MCUc2mWAEiQ0CdAY3YeESbbwaJ/+jFYc0 V4qsK6cy2DRwYlK4RXJLJ9s= X-Google-Smtp-Source: ADUXVKJVyr5U+yOPs8s7oQRc7u8xbb3RUBexOOD7HjBTfaWruEsu8hwMAJaNN0e8p6R5a0gcR/p3Ug== X-Received: by 2002:a65:4005:: with SMTP id f5-v6mr11143665pgp.302.1528636847634; Sun, 10 Jun 2018 06:20:47 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.46 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:46 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:13 -0700 Message-Id: <1528637118-32739-15-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Cc: Alexander Graf Subject: [U-Boot] [PATCH 14/18] efi: stub: Pass EFI GOP information to U-Boot payload X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" If UEFI BIOS has the graphics output protocol (GOP), let's pass its information to U-Boot payload so that U-Boot can utilize it (eg: an EFI framebuffer driver). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- include/efi.h | 35 +++++++++++++++++++++++++++++++++++ lib/efi/efi_stub.c | 15 +++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/include/efi.h b/include/efi.h index 98bddba..e08a913 100644 --- a/include/efi.h +++ b/include/efi.h @@ -242,6 +242,7 @@ struct efi_open_protocol_info_entry { enum efi_entry_t { EFIET_END, /* Signals this is the last (empty) entry */ EFIET_MEMORY_MAP, + EFIET_GOP_MODE, /* Number of entries */ EFIET_MEMORY_COUNT, @@ -298,6 +299,40 @@ struct efi_entry_memmap { struct efi_mem_desc desc[]; }; +/** + * struct efi_entry_gopmode - a GOP mode table passed to U-Boot + * + * @fb_base: EFI's framebuffer base address + * @fb_size: EFI's framebuffer size + * @info_size: GOP mode info structure size + * @info: Start address of the GOP mode info structure + */ +struct efi_entry_gopmode { + efi_physical_addr_t fb_base; + /* + * Not like the ones in 'struct efi_gop_mode' which are 'unsigned + * long', @fb_size and @info_size have to be 'u64' here. As the EFI + * stub codes may have different bit size from the U-Boot payload, + * using 'long' will cause mismatch between the producer (stub) and + * the consumer (payload). + */ + u64 fb_size; + u64 info_size; + /* + * We cannot directly use 'struct efi_gop_mode_info info[]' here as + * it causes compiler to complain: array type has incomplete element + * type 'struct efi_gop_mode_info'. + */ + struct /* efi_gop_mode_info */ { + u32 version; + u32 width; + u32 height; + u32 pixel_format; + u32 pixel_bitmask[4]; + u32 pixels_per_scanline; + } info[]; +}; + static inline struct efi_mem_desc *efi_get_next_mem_desc( struct efi_entry_memmap *map, struct efi_mem_desc *desc) { diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c index 09023a2..4819373 100644 --- a/lib/efi/efi_stub.c +++ b/lib/efi/efi_stub.c @@ -274,6 +274,9 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) struct efi_boot_services *boot = sys_table->boottime; struct efi_mem_desc *desc; struct efi_entry_memmap map; + struct efi_gop *gop; + struct efi_entry_gopmode mode; + efi_guid_t efi_gop_guid = EFI_GOP_GUID; efi_uintn_t key, desc_size, size; efi_status_t ret; u32 version; @@ -312,6 +315,18 @@ efi_status_t efi_main(efi_handle_t image, struct efi_system_table *sys_table) if (ret) return ret; + ret = boot->locate_protocol(&efi_gop_guid, NULL, (void **)&gop); + if (ret) { + puts(" GOP unavailable\n"); + } else { + mode.fb_base = gop->mode->fb_base; + mode.fb_size = gop->mode->fb_size; + mode.info_size = gop->mode->info_size; + add_entry_addr(priv, EFIET_GOP_MODE, &mode, sizeof(mode), + gop->mode->info, + sizeof(struct efi_gop_mode_info)); + } + ret = boot->get_memory_map(&size, desc, &key, &desc_size, &version); if (ret) { printhex2(ret); From patchwork Sun Jun 10 13:25:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927350 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="SRIrj0R9"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cSM55Xtz9rvt for ; Sun, 10 Jun 2018 23:29:23 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 3E587C21DF8; Sun, 10 Jun 2018 13:24:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id DDF68C21E15; Sun, 10 Jun 2018 13:21:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 21B08C21DFB; Sun, 10 Jun 2018 13:20:54 +0000 (UTC) Received: from mail-pf0-f195.google.com (mail-pf0-f195.google.com [209.85.192.195]) by lists.denx.de (Postfix) with ESMTPS id 81B15C21E13 for ; Sun, 10 Jun 2018 13:20:50 +0000 (UTC) Received: by mail-pf0-f195.google.com with SMTP id y5-v6so7944692pfn.4 for ; Sun, 10 Jun 2018 06:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=PrkeGZfWi6QjPLmNs4G8WVF5OX/d2uGAt4tVLSVdD5o=; b=SRIrj0R9kZTEcdJoIEE5ex/Mh/llbuA5MHERDyGWujVKUwaWfPHOKisIYTRZ59tEFH Bk8uSnPyNxJbJMYu+ewO3Px8nMM9t0FUXcJynoDjbEMRvIOC8hKgAYd+2N38oxTm3A7m ZMwnjFhESK/OJd7tpIk5J5rYAtvkvrERO4YjXNKUURX1jSKKb21tJg5byIsqFXXJVTy1 HAX3rysTz/fw8CYNKnTAJJb8suRP49KciGxaWoMBnoSyZiAui8WcjzQP/tnQ0ILHlpbi kUNVsSS7JH+rifx+vEpJcqufiOQPtcta6Y56ewBbv0Gwpl31Azn+OMtD+nTUAzRjrwO+ WtUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=PrkeGZfWi6QjPLmNs4G8WVF5OX/d2uGAt4tVLSVdD5o=; b=McsVfBrdXDjDePCxAwl3nFjxcgtwkBeewFcYPZAYUTFg4VX5sHp/vnzK2SIjghUoNW FsVZ91WPjnkWwl51gauUjB+9Ca9bYSkLClbeHNUdXdTPaFzGR2HIEJFKDoiu2v229jIv zr/2l76on1N5mVX3WE2rbH7yx+B3rel9wzT/8C1z3u5iee1QYSSj3lE2aod73mF6lXjC DuHN87Xw/CJdehrGGKepej9qud4IKRkePg/4UJPAyWR9biUGys7dUr2wPmxghgMLLWZw gT4dNFXubO6md87HCgeuqOtwJ/D9Ek6oHreuwWRqBn4nFtp2DHCXmndHej4XyoDleQe+ 8RUg== X-Gm-Message-State: APt69E3JZW1Uxr91EFTjO+pNbggfe88JYUqe6mYUjhF+i5Uon18drm2Y U8RgcLaGCKH1FjbS4cvvd+E= X-Google-Smtp-Source: ADUXVKKY4TlCfYlhb/UoCQ/KSkRC1ydIaVGhffgF9lW4RWEx2Q/wFa8AYVvG+EUb7u7wnibE4TxOLg== X-Received: by 2002:a63:7206:: with SMTP id n6-v6mr11392955pgc.174.1528636849143; Sun, 10 Jun 2018 06:20:49 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.47 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:48 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:14 -0700 Message-Id: <1528637118-32739-16-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 15/18] dm: video: Add an EFI framebuffer driver X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This adds a DM video driver for U-Boot as the EFI payload. The driver makes use of all necessary information from the passed EFI GOP info to create a linear framebuffer device, as if it were initialized by U-Boot itself. Signed-off-by: Bin Meng Reviewed-by: Anatolij Gustschin --- drivers/video/Kconfig | 9 +++ drivers/video/Makefile | 1 + drivers/video/efi.c | 146 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 156 insertions(+) create mode 100644 drivers/video/efi.c diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 4c4d286..5ee9032 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -156,6 +156,15 @@ config VIDEO_COREBOOT coreboot already. This can in principle be used with any platform that coreboot supports. +config VIDEO_EFI + bool "Enable EFI framebuffer driver support" + depends on EFI_STUB + help + Turn on this option to enable a framebuffeer driver when U-Boot is + loaded as a payload (see README.u-boot_on_efi) by an EFI BIOS where + the graphics device is configured by the EFI BIOS already. This can + in principle be used with any platform that has an EFI BIOS. + config VIDEO_VESA bool "Enable VESA video driver support" default n diff --git a/drivers/video/Makefile b/drivers/video/Makefile index cf7ad28..7c89c67 100644 --- a/drivers/video/Makefile +++ b/drivers/video/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_LD9040) += ld9040.o obj-$(CONFIG_VIDEO_BCM2835) += bcm2835.o obj-$(CONFIG_VIDEO_COREBOOT) += coreboot.o obj-$(CONFIG_VIDEO_DA8XX) += da8xx-fb.o videomodes.o +obj-$(CONFIG_VIDEO_EFI) += efi.o obj-$(CONFIG_VIDEO_LCD_ANX9804) += anx9804.o obj-$(CONFIG_VIDEO_LCD_HITACHI_TX18D42VM) += hitachi_tx18d42vm_lcd.o obj-$(CONFIG_VIDEO_LCD_SSD2828) += ssd2828.o diff --git a/drivers/video/efi.c b/drivers/video/efi.c new file mode 100644 index 0000000..653cb47 --- /dev/null +++ b/drivers/video/efi.c @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2018, Bin Meng + * + * EFI framebuffer driver based on GOP + */ + +#include +#include +#include +#include +#include + +struct pixel { + u8 pos; + u8 size; +}; + +static const struct efi_framebuffer { + struct pixel red; + struct pixel green; + struct pixel blue; + struct pixel rsvd; +} efi_framebuffer_format_map[] = { + [EFI_GOT_RGBA8] = { {0, 8}, {8, 8}, {16, 8}, {24, 8} }, + [EFI_GOT_BGRA8] = { {16, 8}, {8, 8}, {0, 8}, {24, 8} }, +}; + +static void efi_find_pixel_bits(u32 mask, u8 *pos, u8 *size) +{ + u8 first, len; + + first = 0; + len = 0; + + if (mask) { + while (!(mask & 0x1)) { + mask = mask >> 1; + first++; + } + + while (mask & 0x1) { + mask = mask >> 1; + len++; + } + } + + *pos = first; + *size = len; +} + +static int save_vesa_mode(struct vesa_mode_info *vesa) +{ + struct efi_entry_gopmode *mode; + const struct efi_framebuffer *fbinfo; + int size; + int ret; + + ret = efi_info_get(EFIET_GOP_MODE, (void **)&mode, &size); + if (ret == -ENOENT) { + debug("efi graphics output protocol mode not found\n"); + return -ENXIO; + } + + vesa->phys_base_ptr = mode->fb_base; + vesa->x_resolution = mode->info->width; + vesa->y_resolution = mode->info->height; + + if (mode->info->pixel_format < EFI_GOT_BITMASK) { + fbinfo = &efi_framebuffer_format_map[mode->info->pixel_format]; + vesa->red_mask_size = fbinfo->red.size; + vesa->red_mask_pos = fbinfo->red.pos; + vesa->green_mask_size = fbinfo->green.size; + vesa->green_mask_pos = fbinfo->green.pos; + vesa->blue_mask_size = fbinfo->blue.size; + vesa->blue_mask_pos = fbinfo->blue.pos; + vesa->reserved_mask_size = fbinfo->rsvd.size; + vesa->reserved_mask_pos = fbinfo->rsvd.pos; + + vesa->bits_per_pixel = 32; + vesa->bytes_per_scanline = mode->info->pixels_per_scanline * 4; + } else if (mode->info->pixel_format == EFI_GOT_BITMASK) { + efi_find_pixel_bits(mode->info->pixel_bitmask[0], + &vesa->red_mask_pos, + &vesa->red_mask_size); + efi_find_pixel_bits(mode->info->pixel_bitmask[1], + &vesa->green_mask_pos, + &vesa->green_mask_size); + efi_find_pixel_bits(mode->info->pixel_bitmask[2], + &vesa->blue_mask_pos, + &vesa->blue_mask_size); + efi_find_pixel_bits(mode->info->pixel_bitmask[3], + &vesa->reserved_mask_pos, + &vesa->reserved_mask_size); + vesa->bits_per_pixel = vesa->red_mask_size + + vesa->green_mask_size + + vesa->blue_mask_size + + vesa->reserved_mask_size; + vesa->bytes_per_scanline = (mode->info->pixels_per_scanline * + vesa->bits_per_pixel) / 8; + } else { + debug("efi set unknown framebuffer format: %d\n", + mode->info->pixel_format); + return -EINVAL; + } + + return 0; +} + +static int efi_video_probe(struct udevice *dev) +{ + struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); + struct video_priv *uc_priv = dev_get_uclass_priv(dev); + struct vesa_mode_info *vesa = &mode_info.vesa; + int ret; + + /* Initialize vesa_mode_info structure */ + ret = save_vesa_mode(vesa); + if (ret) + goto err; + + ret = vbe_setup_video_priv(vesa, uc_priv, plat); + if (ret) + goto err; + + printf("Video: %dx%dx%d\n", uc_priv->xsize, uc_priv->ysize, + vesa->bits_per_pixel); + + return 0; + +err: + printf("No video mode configured in EFI!\n"); + return ret; +} + +static const struct udevice_id efi_video_ids[] = { + { .compatible = "efi-fb" }, + { } +}; + +U_BOOT_DRIVER(efi_video) = { + .name = "efi_video", + .id = UCLASS_VIDEO, + .of_match = efi_video_ids, + .probe = efi_video_probe, +}; From patchwork Sun Jun 10 13:25:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927355 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="q6pAdZOw"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cW85qj8z9ryk for ; Sun, 10 Jun 2018 23:31:48 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 79D65C21DB3; Sun, 10 Jun 2018 13:25:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 474FBC21E50; Sun, 10 Jun 2018 13:21:56 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D2DC2C21E29; Sun, 10 Jun 2018 13:20:55 +0000 (UTC) Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67]) by lists.denx.de (Postfix) with ESMTPS id F3429C21D9A for ; Sun, 10 Jun 2018 13:20:51 +0000 (UTC) Received: by mail-pg0-f67.google.com with SMTP id c9-v6so8478028pgf.5 for ; Sun, 10 Jun 2018 06:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=mMj+La96xd/SaQoJZC6tZ+AAY889u54YEDCUEmYVfnQ=; b=q6pAdZOwr1b4J4ikAauW7FM3tCAYAtav2o21UU1lsAX492jXz+YVhxLR6hrIMMBp6Y 9MvhpCdmThzn02dtuE1nfRGPh613LBrXTIFiWBe4FvZ21I+TkxWGah1wJ+alMmkJb0mi cpNGqlsgp/R0aM7NNw4grc0tTp+ydiGSSxHOyosMAEX+OGU7iMbR8klgXMhfeg3CukuD Gexgpuqj1GOY5vqNGd3v8HR371QOjRNni6mzrILld2ghgtRFFO21dS9trXQ8hlt9qIw+ DKQvn2aqVFL4ESwm/GE9zXqE3O0BS4qnmOctK4Sc7g3dU5FQf4ogKZb3X+EHqwu2V8QW qlhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=mMj+La96xd/SaQoJZC6tZ+AAY889u54YEDCUEmYVfnQ=; b=Q0qY7oXsL65p8ySwGxlmFYOIdjXxbR6yqQ165+MVXTx66pXsouRIWJZ0pXz0RekPqy M0sGy95qQ6MQBGDY5pyF2cNGl4GMquWwuyH6T+R/8oy9lbaVPlmzP4ozQuyz74/PY90T nUKfII4ISKbdxbsgxQMR9kAzemBu9p2weNxdH597oP2CNNjTalf+FUS5s448jqwCYoCn 5Y4bu9iM2pXFC37mhXCrBuPiGio0kB1CkWhNR9XCLUfzsP+7xmpbKleh+xlc5IUIz4e2 hLFi5c1xqZBDljccMuH0QmHY0OtiFfanGTtnPT/VLLxAlB9ERiqx0tjK8jMqwcDy1zP5 NZnA== X-Gm-Message-State: APt69E2iOBjlV/a33KJ68UtM/M3274lPxH7Tig2XHTUejR9WUyTWn9Mv xpc12sL1dG+X9xEs1jf92UnuVQ== X-Google-Smtp-Source: ADUXVKKgN/lw6ozDDo5jFio3UruYBGiLw+sC8OL84kaoRJynbZrv7Jmz11UZh3RTWU9CD8mgS2pvJA== X-Received: by 2002:a65:45c2:: with SMTP id m2-v6mr11440312pgr.189.1528636850700; Sun, 10 Jun 2018 06:20:50 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.49 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:49 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:15 -0700 Message-Id: <1528637118-32739-17-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 16/18] x86: efi: payload: Add EFI framebuffer driver support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This turns on the EFI framebuffer driver support so that a graphics console can be of additional help. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/dts/efi-x86_payload.dts | 4 ++++ board/efi/efi-x86_payload/Kconfig | 1 + 2 files changed, 5 insertions(+) diff --git a/arch/x86/dts/efi-x86_payload.dts b/arch/x86/dts/efi-x86_payload.dts index 137bde5..148b587 100644 --- a/arch/x86/dts/efi-x86_payload.dts +++ b/arch/x86/dts/efi-x86_payload.dts @@ -33,4 +33,8 @@ compatible = "pci-x86"; u-boot,dm-pre-reloc; }; + + efi-fb { + compatible = "efi-fb"; + }; }; diff --git a/board/efi/efi-x86_payload/Kconfig b/board/efi/efi-x86_payload/Kconfig index dcf4de8..b6e57b9 100644 --- a/board/efi/efi-x86_payload/Kconfig +++ b/board/efi/efi-x86_payload/Kconfig @@ -30,6 +30,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy imply USB_XHCI_HCD imply USB_STORAGE imply USB_KEYBOARD + imply VIDEO_EFI imply E1000 imply ETH_DESIGNWARE imply PCH_GBE From patchwork Sun Jun 10 13:25:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927351 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Q5/UvecT"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cT83f88z9rvt for ; Sun, 10 Jun 2018 23:30:04 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id F12E8C21DEC; Sun, 10 Jun 2018 13:22:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 97FB3C21E08; Sun, 10 Jun 2018 13:21:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id A746BC21CB1; Sun, 10 Jun 2018 13:20:58 +0000 (UTC) Received: from mail-pf0-f194.google.com (mail-pf0-f194.google.com [209.85.192.194]) by lists.denx.de (Postfix) with ESMTPS id AB6E0C21DED for ; Sun, 10 Jun 2018 13:20:54 +0000 (UTC) Received: by mail-pf0-f194.google.com with SMTP id a22-v6so8841619pfo.12 for ; Sun, 10 Jun 2018 06:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=tjj6+sv0weMETTv8W87qUmMeu3gADZ4qnyavdDjt2y0=; b=Q5/UvecTmV2YYTNzgyaQSXuRNmpePDPeevpuc6Vq1k0/qY6+77G5uJv6VBW7GNV0Lx fmzU6Nr2xMrQv5dnPkjd6Ar0Y5hK9RhShb59FLn2o38lO1yecbJbBwgocNVRRqsKTc3R Rqv+f4YMwaRdw34i+kOO3/IME1/FIsRpXQ+4UY1TPc45lltKNaBFNg8jA2q+i8BYuXO3 9vvuLDMH97mUQB6Qm8y9sbZ/nexSixndOELrLIrlpA+bPUpsUPzqynNSwjE//yb7K4Po 1QV+UkkTeNKwZ0Kqtbo0k7jWaoodfYB/6AfvO/GXnk1p1K+1mRm6G1IDYLYiZQv80ZPb gM/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=tjj6+sv0weMETTv8W87qUmMeu3gADZ4qnyavdDjt2y0=; b=pys91MT6//Elf9u3fQyoy5F/F+cgl2doZv/Ckext2v0J1+GLI+IYluwHIubGxC7TlN KrTaWOQbMVTEZ5F07GKawcEa51OFumXmjkSdSMR1l0nH1ydvYS0jXXKh7uvxJnkRGrJM wZ9hFa1BSGuqMGRMWxbGch7kJ/vIrtpBza/i9XqccFVA3YCd5YES8+IpisXgr7Qz2ADJ 7UGERkarR3Sbep+IYtXDimKf2GaABl0Nt7gJddQW4ZGX9CRfnu2uyPu4YvbUOd1y4Leq 21k1hrwYy4WSCHHL1YhqOg9R3Vp71DXMFRuQeEHtCVii/J+nAYR5V9Y1rMkrPSXbE17G el+w== X-Gm-Message-State: APt69E1LNT3RvQ67QHJjgCnt13q19YDZ6LeTH2/Ui2GEUCHczODqNazH AsraGA1Td9uwoyTcmttC6BjGlQ== X-Google-Smtp-Source: ADUXVKIKj1Q5D6Ccpk2qEUillIwZM7rXyauy2HI4angJEXnTWjRBWgfHjYo2YUV8usE1YLWqwc8YNg== X-Received: by 2002:a63:7459:: with SMTP id e25-v6mr11228169pgn.186.1528636852178; Sun, 10 Jun 2018 06:20:52 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.50 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:51 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:16 -0700 Message-Id: <1528637118-32739-18-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 17/18] x86: Rename efi-x86 target to efi-x86_app X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" To avoid confusion, let's rename the efi-x86 target to efi-x86_app. Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/efi/Makefile | 2 +- arch/x86/cpu/efi/{efi.c => app.c} | 0 arch/x86/cpu/intel_common/Makefile | 2 +- arch/x86/dts/Makefile | 2 +- arch/x86/dts/{efi.dts => efi-x86_app.dts} | 4 ++-- board/efi/Kconfig | 6 +++--- board/efi/{efi-x86 => efi-x86_app}/Kconfig | 6 +++--- board/efi/{efi-x86 => efi-x86_app}/MAINTAINERS | 0 board/efi/{efi-x86 => efi-x86_app}/Makefile | 2 +- board/efi/{efi-x86/efi.c => efi-x86_app/app.c} | 0 configs/{efi-x86_defconfig => efi-x86_app_defconfig} | 4 ++-- include/configs/{efi-x86.h => efi-x86_app.h} | 0 12 files changed, 14 insertions(+), 14 deletions(-) rename arch/x86/cpu/efi/{efi.c => app.c} (100%) rename arch/x86/dts/{efi.dts => efi-x86_app.dts} (82%) rename board/efi/{efi-x86 => efi-x86_app}/Kconfig (64%) rename board/efi/{efi-x86 => efi-x86_app}/MAINTAINERS (100%) rename board/efi/{efi-x86 => efi-x86_app}/Makefile (82%) rename board/efi/{efi-x86/efi.c => efi-x86_app/app.c} (100%) rename configs/{efi-x86_defconfig => efi-x86_app_defconfig} (92%) rename include/configs/{efi-x86.h => efi-x86_app.h} (100%) diff --git a/arch/x86/cpu/efi/Makefile b/arch/x86/cpu/efi/Makefile index 32c2dde..9716a4e 100644 --- a/arch/x86/cpu/efi/Makefile +++ b/arch/x86/cpu/efi/Makefile @@ -3,7 +3,7 @@ # Copyright (c) 2015 Google, Inc ifdef CONFIG_EFI_APP -obj-y += efi.o +obj-y += app.o obj-y += sdram.o endif diff --git a/arch/x86/cpu/efi/efi.c b/arch/x86/cpu/efi/app.c similarity index 100% rename from arch/x86/cpu/efi/efi.c rename to arch/x86/cpu/efi/app.c diff --git a/arch/x86/cpu/intel_common/Makefile b/arch/x86/cpu/intel_common/Makefile index c0fcf0c..bf798c2 100644 --- a/arch/x86/cpu/intel_common/Makefile +++ b/arch/x86/cpu/intel_common/Makefile @@ -10,7 +10,7 @@ obj-$(CONFIG_$(SPL_)X86_32BIT_INIT) += mrc.o endif obj-y += cpu.o obj-y += lpc.o -ifndef CONFIG_TARGET_EFI +ifndef CONFIG_TARGET_EFI_APP obj-y += microcode.o endif obj-y += pch.o diff --git a/arch/x86/dts/Makefile b/arch/x86/dts/Makefile index 9872c04..37e4fdc 100644 --- a/arch/x86/dts/Makefile +++ b/arch/x86/dts/Makefile @@ -10,7 +10,7 @@ dtb-y += bayleybay.dtb \ crownbay.dtb \ dfi-bt700-q7x-151.dtb \ edison.dtb \ - efi.dtb \ + efi-x86_app.dtb \ efi-x86_payload.dtb \ galileo.dtb \ minnowmax.dtb \ diff --git a/arch/x86/dts/efi.dts b/arch/x86/dts/efi-x86_app.dts similarity index 82% rename from arch/x86/dts/efi.dts rename to arch/x86/dts/efi-x86_app.dts index 62ae96a..e70e351 100644 --- a/arch/x86/dts/efi.dts +++ b/arch/x86/dts/efi-x86_app.dts @@ -9,8 +9,8 @@ /include/ "tsc_timer.dtsi" / { - model = "EFI"; - compatible = "efi,app"; + model = "EFI x86 Application"; + compatible = "efi,x86-app"; chosen { stdout-path = &serial; diff --git a/board/efi/Kconfig b/board/efi/Kconfig index d37f6ff..291bd2c 100644 --- a/board/efi/Kconfig +++ b/board/efi/Kconfig @@ -4,8 +4,8 @@ choice prompt "Mainboard model" optional -config TARGET_EFI - bool "efi" +config TARGET_EFI_APP + bool "efi application" help This target is used for running U-Boot on top of EFI. In this case EFI does the early initialisation, and U-Boot @@ -22,7 +22,7 @@ config TARGET_EFI_PAYLOAD endchoice -source "board/efi/efi-x86/Kconfig" +source "board/efi/efi-x86_app/Kconfig" source "board/efi/efi-x86_payload/Kconfig" endif diff --git a/board/efi/efi-x86/Kconfig b/board/efi/efi-x86_app/Kconfig similarity index 64% rename from board/efi/efi-x86/Kconfig rename to board/efi/efi-x86_app/Kconfig index fa609ba..ae87bf3 100644 --- a/board/efi/efi-x86/Kconfig +++ b/board/efi/efi-x86_app/Kconfig @@ -1,7 +1,7 @@ -if TARGET_EFI +if TARGET_EFI_APP config SYS_BOARD - default "efi-x86" + default "efi-x86_app" config SYS_VENDOR default "efi" @@ -10,6 +10,6 @@ config SYS_SOC default "efi" config SYS_CONFIG_NAME - default "efi-x86" + default "efi-x86_app" endif diff --git a/board/efi/efi-x86/MAINTAINERS b/board/efi/efi-x86_app/MAINTAINERS similarity index 100% rename from board/efi/efi-x86/MAINTAINERS rename to board/efi/efi-x86_app/MAINTAINERS diff --git a/board/efi/efi-x86/Makefile b/board/efi/efi-x86_app/Makefile similarity index 82% rename from board/efi/efi-x86/Makefile rename to board/efi/efi-x86_app/Makefile index 2097283..cb48d1c 100644 --- a/board/efi/efi-x86/Makefile +++ b/board/efi/efi-x86_app/Makefile @@ -2,4 +2,4 @@ # # Copyright (c) 2015 Google, Inc -obj-y += efi.o +obj-y += app.o diff --git a/board/efi/efi-x86/efi.c b/board/efi/efi-x86_app/app.c similarity index 100% rename from board/efi/efi-x86/efi.c rename to board/efi/efi-x86_app/app.c diff --git a/configs/efi-x86_defconfig b/configs/efi-x86_app_defconfig similarity index 92% rename from configs/efi-x86_defconfig rename to configs/efi-x86_app_defconfig index 741a169..4088dae 100644 --- a/configs/efi-x86_defconfig +++ b/configs/efi-x86_app_defconfig @@ -1,7 +1,7 @@ CONFIG_X86=y CONFIG_VENDOR_EFI=y -CONFIG_DEFAULT_DEVICE_TREE="efi" -CONFIG_TARGET_EFI=y +CONFIG_DEFAULT_DEVICE_TREE="efi-x86_app" +CONFIG_TARGET_EFI_APP=y CONFIG_DEBUG_UART=y CONFIG_FIT=y CONFIG_USE_BOOTARGS=y diff --git a/include/configs/efi-x86.h b/include/configs/efi-x86_app.h similarity index 100% rename from include/configs/efi-x86.h rename to include/configs/efi-x86_app.h From patchwork Sun Jun 10 13:25:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bin Meng X-Patchwork-Id: 927341 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ODGGMo6R"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 413cLJ6vwFz9rvt for ; Sun, 10 Jun 2018 23:24:08 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5474CC21CB1; Sun, 10 Jun 2018 13:23:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 911EBC21C6A; Sun, 10 Jun 2018 13:21:22 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 42DD6C21D8E; Sun, 10 Jun 2018 13:20:59 +0000 (UTC) Received: from mail-pg0-f49.google.com (mail-pg0-f49.google.com [74.125.83.49]) by lists.denx.de (Postfix) with ESMTPS id C23BDC21DF8 for ; Sun, 10 Jun 2018 13:20:54 +0000 (UTC) Received: by mail-pg0-f49.google.com with SMTP id d2-v6so8471948pga.13 for ; Sun, 10 Jun 2018 06:20:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references; bh=+MoBkQSVNJjSMgsHJK7y7jgN4Bp7HNtAj2MJZVag4KA=; b=ODGGMo6RpoL6x3EdcSaHYQucFTP9uzf3GT1gPIQuNNkjf/iS4rgOZUr3V17BxYmkuI 7CBl8seL8KEz4fue4yVkFdhaTDMuYiT7JaR0TpleH0V3nI45Nwsla1Q1ysGOhOvkvzq6 srFU8kXxU7vHbdwcJbXpOkx92a+E8+m5wbPRyxGqI+m236yZATQClchyssG4iNov6Z7K ZvHAMt9zDgtyViXcr5QNYtQV+ehaXbefszB5cNQ10YMQdxGxAdEH+VGy5yQ/0OKBf8Al o/nTfuODnMQIZhRTa1B1nm3f2SHOPvmriGjv4KMUcpqoModnAiw0AeQjvzrQb4qs9f3x heJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=+MoBkQSVNJjSMgsHJK7y7jgN4Bp7HNtAj2MJZVag4KA=; b=WAI1+wz7Q1wNS6jgBRiMgtMG7xuaccrUkCiilZ+FkNbthqIS6Pr8TlsPe1fETTruJr e1Zlun3pKcHrilBLKoBAnvp9ycGv8w/VFQZh69PGNG6uFX4E0HiV3oiYFS6dn9ZPL8QJ JEXkPXktAwYiUbX8OQV4WHYlEfLZA54E6syJVChpvw/t2CnKg6OkYzR4hGxCgQ+kNNem PgqvyQbX3dMz4vd9v3uMMQ5Ah7nTEclu+aBktbf2dRWhGRtgTSluxwcV9WvMPv7SfbwR 6ZxAToPAr6gVe99TrS/hBG/t5cFRSzBcqQ2IwvAiTxPwQ76cHUvYyoHsi3aA84YHx8OV /Qjg== X-Gm-Message-State: APt69E0GLqytL2i7nc8YiJPvq2TKrPFV/5SiMO8Il7T4WP71e7JZXVag wXqUHrVue5uulpFHjuHW7Fw= X-Google-Smtp-Source: ADUXVKJkfKB8qZp5X2e3/zsKWt1c20wD5a+Ol2cj7IgCouYM5w23FTMHl2J+7WWyYCDhQtxwNx2dNA== X-Received: by 2002:a63:8ec8:: with SMTP id k191-v6mr11493133pge.435.1528636853516; Sun, 10 Jun 2018 06:20:53 -0700 (PDT) Received: from ala-d2121-lx1.wrs.com (unknown-156-139.windriver.com. [147.11.156.139]) by smtp.gmail.com with ESMTPSA id 82-v6sm63211661pft.74.2018.06.10.06.20.52 (version=TLS1_1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 10 Jun 2018 06:20:52 -0700 (PDT) From: Bin Meng To: Simon Glass , U-Boot Mailing List Date: Sun, 10 Jun 2018 06:25:17 -0700 Message-Id: <1528637118-32739-19-git-send-email-bmeng.cn@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> References: <1528637118-32739-1-git-send-email-bmeng.cn@gmail.com> Subject: [U-Boot] [PATCH 18/18] x86: efi: app: Display correct CPU info during boot X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Currently when EFI application boots, it says: CPU: x86_64, vendor , device 0h Fix this by calling x86_cpu_init_f() in arch_cpu_init(). Signed-off-by: Bin Meng Reviewed-by: Simon Glass --- arch/x86/cpu/efi/app.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/cpu/efi/app.c b/arch/x86/cpu/efi/app.c index cda4fab..ba7c02b 100644 --- a/arch/x86/cpu/efi/app.c +++ b/arch/x86/cpu/efi/app.c @@ -9,7 +9,7 @@ int arch_cpu_init(void) { - return 0; + return x86_cpu_init_f(); } int checkcpu(void)