From nobody Sun Apr 28 02:52:50 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1506970963636914.5493253845748; Mon, 2 Oct 2017 12:02:43 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id D557E21F303F7; Mon, 2 Oct 2017 11:59:22 -0700 (PDT) Received: from mail-wr0-x22f.google.com (mail-wr0-x22f.google.com [IPv6:2a00:1450:400c:c0c::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id C503D21F9B69C for ; Mon, 2 Oct 2017 11:59:20 -0700 (PDT) Received: by mail-wr0-x22f.google.com with SMTP id p10so2924520wrc.6 for ; Mon, 02 Oct 2017 12:02:40 -0700 (PDT) Received: from localhost.localdomain ([160.90.203.54]) by smtp.gmail.com with ESMTPSA id 5sm6485623wrb.9.2017.10.02.12.02.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Oct 2017 12:02:36 -0700 (PDT) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22f; helo=mail-wr0-x22f.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=tPadn4XSeb8mqY46lXICK4+WPsrZcj6AYPOIEq04ldk=; b=RDvDBn9OXgUJqL3U9dyGsTSWtFCs4Q7mvLy79vy908HiFmNJyD7U9ALXZdVteld0FJ l/r/sCguN++cdbNQtK8gdtH7DvAYodJo/iNJDCyRgOPdvYVD5GBmY/7VVnRJXqAy305A +p/YVaaehDFnOpJdBh/h56gETPn8PVfF25pag= 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; bh=tPadn4XSeb8mqY46lXICK4+WPsrZcj6AYPOIEq04ldk=; b=hzcxbZqJpBe9nOAvMJItD+5S20hdYNdn6MTrG+sJYxqufSk4TS8yopXdxvrT0Bfknn O/QGQyfPEytg4CxzYx32ZQ/GAOi+BgW0DXW0SqKQPBEro/OP54mSjDXCah9V6Norq9/q S0t6TER1SjNNOAigawRhTGm3ol+xsRc//gz2Ye/HGkjVHxukAxnEmTZG0j33hhvH/xfm EfOfekNh4LHFx0OHlWxPTgl8vdsf/lbi4vnGTaXsbazxcubEI4Myatj/OL8IcxIOawI9 pF0WYhzKCwh5cU6wvuyN75wTp6FQ+rfD8hm5uyVdajmzUuujTYKGLkWyEmqKGkMbqlof zgpQ== X-Gm-Message-State: AHPjjUjEGBx/S0pgxTqM4+Rfq+tsqkR4xRMCZidl5cWC8avQB2DCzvMR pd1Y2oj1HLccdAyyHarNe/Q7kDcvxy4= X-Google-Smtp-Source: AOwi7QBtw3Ty/aLWUikcAT9AtVkIq8hiUoALbLP+4DL6pqZCeUO4wNdLS5NmsdOD1687iDmLXRD+4g== X-Received: by 10.223.145.166 with SMTP id 35mr14636454wri.51.1506970957820; Mon, 02 Oct 2017 12:02:37 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org Date: Mon, 2 Oct 2017 20:02:26 +0100 Message-Id: <20171002190226.25103-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] ArmPkg/PlatformBootManagerLib: call ESRT hooks at appropriate times X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The ESRT management protocol needs to be invoked at the appropriate times to get the ESRT config table to be published at when the ReadyToBoot is signalled. So add this handling to the default ArmPkg implementation of PlatformBootManagerLib. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 23 ++++= ++++++++++++++-- ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 1 + 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index a3b2d7925f72..d4a7859ca9e8 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -449,12 +450,23 @@ PlatformBootManagerBeforeConsole ( VOID ) { - EFI_STATUS Status; + EFI_STATUS Status; + ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; =20 if (GetBootModeHob() =3D=3D BOOT_ON_FLASH_UPDATE) { DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n")); Status =3D ProcessCapsules (); DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); + } else { + if (EsrtManagement !=3D NULL) { + EsrtManagement->SyncEsrtFmp(); + } + } + + Status =3D gBS->LocateProtocol(&gEsrtManagementProtocolGuid, NULL, + (VOID **)&EsrtManagement); + if (EFI_ERROR(Status)) { + EsrtManagement =3D NULL; } =20 // @@ -524,7 +536,8 @@ PlatformBootManagerAfterConsole ( VOID ) { - EFI_STATUS Status; + ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; + EFI_STATUS Status; =20 // // Show the splash screen. @@ -538,6 +551,12 @@ PlatformBootManagerAfterConsole ( // EfiBootManagerConnectAll (); =20 + Status =3D gBS->LocateProtocol(&gEsrtManagementProtocolGuid, NULL, + (VOID **)&EsrtManagement); + if (!EFI_ERROR(Status)) { + EsrtManagement->SyncEsrtFmp(); + } + if (GetBootModeHob() =3D=3D BOOT_ON_FLASH_UPDATE) { DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n")); Status =3D ProcessCapsules (); diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.i= nf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 58c4d6d2c7d6..fce7349ff867 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -82,3 +82,4 @@ [Protocols] gEfiLoadedImageProtocolGuid gEfiPciRootBridgeIoProtocolGuid gEfiSimpleFileSystemProtocolGuid + gEsrtManagementProtocolGuid --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel