From nobody Thu May 2 19:24:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55213+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55213+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1583160157; cv=none; d=zohomail.com; s=zohoarc; b=Rcl2TLZH+bCTEcG2eAViniLfYFirqsaJn8J+ig+ln/2RRNR95VKD5ZE0BLfogmQUiL7//kRK7sOdToQRM6V3fyhURG++ZLztddNzjhsoeS/0afaO7nfY1wpo+UxX2dg+v9rOos0I8q3c694M2SNxQCnKlwym2ktpcBi1A7fSFuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583160157; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=idfH2c399ueTpgTbPI3gYEKKvrBEnJ5QxgXDWcLdMuk=; b=mA+bzTlej9S2ym1w5e3kWfzoDcuLd0kcpXrb3MSSOFulaRTIBupuhMFtrarFZ65P9SNw4EO9e+WzR8tUbPRyRGZ1dvOSC4NJuNuAKoy/99WAlo5vGefHdbSkRqcn5blNZaG1E6wBSUNTyiMT+NI8lgfOtHqH6t4x/G8LlQV8KX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55213+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 158316015762545.37105613276174; Mon, 2 Mar 2020 06:42:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id JQhRYY1788612x7hMhFokfIJ; Mon, 02 Mar 2020 06:42:35 -0800 X-Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by mx.groups.io with SMTP id smtpd.web11.15105.1583160154537031700 for ; Mon, 02 Mar 2020 06:42:34 -0800 X-Received: by mail-wr1-f50.google.com with SMTP id v4so12891356wrs.8 for ; Mon, 02 Mar 2020 06:42:34 -0800 (PST) X-Gm-Message-State: su6bXbbvTxKcfASi774XtR6Xx1787277AA= X-Google-Smtp-Source: APXvYqyHaZl+i4fc2tI6h2pEbl0nbHjhD4XMSh9a/34G+Sxn/toGcehwjBvz6Lmh0q9hK9NaocDqcg== X-Received: by 2002:adf:ed4c:: with SMTP id u12mr24216314wro.204.1583160152849; Mon, 02 Mar 2020 06:42:32 -0800 (PST) X-Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id h10sm16366125wml.18.2020.03.02.06.42.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2020 06:42:32 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, awarkentin@vmware.com Subject: [edk2-devel][RESEND][PATCH 1/2] Platform/RPi4: allow overriding TF-A binaries during build Date: Mon, 2 Mar 2020 14:42:18 +0000 Message-Id: <20200302144219.10452-2-pete@akeo.ie> In-Reply-To: <20200302144219.10452-1-pete@akeo.ie> References: <20200302144219.10452-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583160155; bh=VPl3YCEQur1UklVtpn5bDvX53VJ67ESCvQC40C3xTzQ=; h=Cc:Date:From:Reply-To:Subject:To; b=jgr+d6OD9hgkt0wjICFIPUWBc2oWuPMFBY3CSuc32P+2ERcUY/PoS0RNVJRRayQosHG LldRh7h8p4O+adftyNk7DExquucUIHvI4wjqzz2VAlifZB/9AJ52AWX8aM18nCyQHZrOO 3eBT8KEsxcQgnUQ2cbL3cyjLJDvsi0avXxE= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin For PFTF developers working on the firmware, being able to use a local TF-A build without extra extra copy operations ends up being very helpful. This can be accomplished via a TFA_BUILD_ARTIFACTS option passed to the edk2 build tool. If/when the Pi 3 and 4 DSC/FDFs become unified, this will be even more important to trivially perform a full clean upstream build for either platform, without having to worry about different TF-A deliverables - Pi 4 uses bl31.bin, while Pi 3 uses fip.bin and bl1.bin. A similar Pi 3 patch to follow. The context for this is the community Raspberry Pi 4 firmware project (https://https://rpi4-uefi.dev, https://github.com/pftf), which you might have heard already about from Pete Batard, who upstreamed much of my previous Pi 3 and Pi 4 enablement patches. Signed-off-by: Andrei Warkentin Reviewed-by: Ard Biesheuvel --- Platform/RaspberryPi/RPi4/RPi4.dsc | 14 ++++++++++++++ Platform/RaspberryPi/RPi4/RPi4.fdf | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Platform/RaspberryPi/RPi4/RPi4.dsc b/Platform/RaspberryPi/RPi4= /RPi4.dsc index c039f6df2eb4..1d38f4ab051d 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.dsc +++ b/Platform/RaspberryPi/RPi4/RPi4.dsc @@ -40,6 +40,20 @@ [Defines] DEFINE DEBUG_PRINT_ERROR_LEVEL =3D 0x8000004F DEFINE ACPI_BASIC_MODE_ENABLE =3D FALSE =20 +!ifndef TFA_BUILD_ARTIFACTS + # + # Default TF-A binary checked into edk2-non-osi. + # + DEFINE TFA_BUILD_BL31 =3D Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedF= irmware/bl31_pl011.bin +!else + # + # Usually we use the checked-in binaries, but for developers working + # on the firmware, being able to use a local TF-A build without extra co= py + # operations ends up being very helpful. + # + DEFINE TFA_BUILD_BL31 =3D $(TFA_BUILD_ARTIFACTS)/bl31.bin +!endif + ##########################################################################= ###### # # Library Class section - list of all Library Classes needed by this Platf= orm. diff --git a/Platform/RaspberryPi/RPi4/RPi4.fdf b/Platform/RaspberryPi/RPi4= /RPi4.fdf index b2a6ac9e6c66..8e2d6fd49a9d 100644 --- a/Platform/RaspberryPi/RPi4/RPi4.fdf +++ b/Platform/RaspberryPi/RPi4/RPi4.fdf @@ -51,7 +51,7 @@ [FD.RPI_EFI] # ATF primary boot image # 0x00000000|0x00020000 -FILE =3D Platform/RaspberryPi/$(PLATFORM_NAME)/TrustedFirmware/bl31_pl011.= bin +FILE =3D $(TFA_BUILD_BL31) =20 # # DTB. --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55213): https://edk2.groups.io/g/devel/message/55213 Mute This Topic: https://groups.io/mt/71676028/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 2 19:24:59 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+55214+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55214+1787277+3901457@groups.io ARC-Seal: i=1; a=rsa-sha256; t=1583160158; cv=none; d=zohomail.com; s=zohoarc; b=WcqKgbPAJ9INNqIzpifEGH8U5Hr5JX2Q55+Z5XhyDiZmR794FEusPwltAGA2/OSwNVLUV9zpQ7V2pv6QQHXiQGg8mL0KzX6nPOq4Jmr4/1QJDHLflqyxknlwibtY7lvnKkMw+5JDXgJInHOZNDdugJoA2LAGqgCrU5ktVZqglyQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1583160158; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=0LF8jCmjHjl1UVNszb7Eem9mQNWJbiN9XM4LZGT82EE=; b=WAZ6qFWAD7NlJTaRAjGHHGApRW1Bx+eXyBWlC/9aUbdlGiVWHOnkw5OVw/0DK1tPPrrLVZ2GLEYZ0QdxQcC484yJdDHfahUM9E5LN3WQauUiLLaf5a0NwdAu1xm44N4A50EtaGxBRNCAJDiY46wjqlisgKP9UzWmAn2vffaSHGQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+55214+1787277+3901457@groups.io Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1583160157999957.0635306400086; Mon, 2 Mar 2020 06:42:37 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id YcKqYY1788612xnAvc2johsu; Mon, 02 Mar 2020 06:42:36 -0800 X-Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by mx.groups.io with SMTP id smtpd.web10.15240.1583160155774980989 for ; Mon, 02 Mar 2020 06:42:36 -0800 X-Received: by mail-wr1-f53.google.com with SMTP id n7so5007665wrt.11 for ; Mon, 02 Mar 2020 06:42:35 -0800 (PST) X-Gm-Message-State: IYrSvAApIPJZ5jXK9biVqZGsx1787277AA= X-Google-Smtp-Source: APXvYqy8XGwM1lokcGmCWEqblAFw0ZPotW5O4cFRRGSqY0X041xIrYGYErGBq+vePeuuXcowbj2B9A== X-Received: by 2002:adf:e98f:: with SMTP id h15mr19313240wrm.263.1583160153994; Mon, 02 Mar 2020 06:42:33 -0800 (PST) X-Received: from localhost.localdomain ([84.203.56.244]) by smtp.gmail.com with ESMTPSA id h10sm16366125wml.18.2020.03.02.06.42.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Mar 2020 06:42:33 -0800 (PST) From: "Pete Batard" To: devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif@nuviainc.com, awarkentin@vmware.com Subject: [edk2-devel][RESEND][PATCH 2/2] Platform/RPi4/Library/PlatformBootManagerLib: remove dead logo code Date: Mon, 2 Mar 2020 14:42:19 +0000 Message-Id: <20200302144219.10452-3-pete@akeo.ie> In-Reply-To: <20200302144219.10452-1-pete@akeo.ie> References: <20200302144219.10452-1-pete@akeo.ie> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pete@akeo.ie Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1583160156; bh=bUCHPnCXzxcY6pDw+ibfkoNvtaz0oTdEyKA/s4SLJQo=; h=Cc:Date:From:Reply-To:Subject:To; b=W0IV8bCA4WwHX1/DAfXcKj0KDW3vpljlc/wITLMHO1NnjCxmTR5CVJ/WW3bOZeFuhzO WSueoGzcTSd4euc3zg3fQxKde8pH0tlBbXeyC/KauejI/QbdSLxcUayeGA+doQSJv9pKY QwAXmUhl4NcGzJRF/rDW1wQjalgGIqlLjqc= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Andrei Warkentin Back in RaspberryPiPkg (before upstream Pi 3) support, I wrote some extra code in PlatformBootManagerLib and BootGraphicsResourceTableDxe to clear out the logo/BGRT, so that Windows would always show its own logo instead of the platform logo. It kind of made sense back in the day, when they only portion of Windows that "ran" on Pi 3 was the part that could display a logo before BSODing... The code in PlatformBootManagerLib (that this patch is removing) only worked with the matching BootGraphicsResourceTableDxe change*** that never got upstreamed. Moreover, Windows (for logo/cert) requires BGRT so these kinds of shennigans aren't worth the effort. So, remove the dead code. ***https://github.com/andreiw/RaspberryPiPkg/blob/master/edk2Patches/0003-B= ootGraphicsResourceTableDxe-properly-handle-SetBoot.patch Signed-off-by: Andrei Warkentin --- Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c = | 18 ------------------ Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManagerLib= .inf | 1 - 2 files changed, 19 deletions(-) diff --git a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm= .c b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c index 12c3829d28f5..996ba8f39938 100644 --- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c +++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBm.c @@ -25,7 +25,6 @@ #include #include #include -#include =20 #include "PlatformBm.h" =20 @@ -691,7 +690,6 @@ PlatformBootManagerWaitCallback ( EFI_GRAPHICS_OUTPUT_BLT_PIXEL_UNION White; UINT16 Timeout; EFI_STATUS Status; - EFI_BOOT_LOGO_PROTOCOL *BootLogo; =20 Timeout =3D PcdGet16 (PcdPlatformBootTimeOut); =20 @@ -711,22 +709,6 @@ PlatformBootManagerWaitCallback ( } else { Print (L"."); } - - if (TimeoutRemain =3D=3D 0) { - BootLogo =3D NULL; - - // - // Clear out the boot logo so that Windows displays its own logo - // instead of ours. - // - Status =3D gBS->LocateProtocol (&gEfiBootLogoProtocolGuid, NULL, (VOID= **)&BootLogo); - if (!EFI_ERROR (Status) && (BootLogo !=3D NULL)) { - Status =3D BootLogo->SetBootLogo (BootLogo, NULL, 0, 0, 0, 0); - ASSERT_EFI_ERROR (Status); - }; - - gST->ConOut->ClearScreen (gST->ConOut); - } } =20 /** diff --git a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBo= otManagerLib.inf b/Platform/RaspberryPi/Library/PlatformBootManagerLib/Plat= formBootManagerLib.inf index 79b75d667f55..e40b3f096a4f 100644 --- a/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf +++ b/Platform/RaspberryPi/Library/PlatformBootManagerLib/PlatformBootManag= erLib.inf @@ -81,4 +81,3 @@ [Protocols] gEfiSimpleFileSystemProtocolGuid gEsrtManagementProtocolGuid gEfiUsb2HcProtocolGuid - gEfiBootLogoProtocolGuid --=20 2.21.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#55214): https://edk2.groups.io/g/devel/message/55214 Mute This Topic: https://groups.io/mt/71676029/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-