From nobody Sat Apr 20 05:06:19 2024 Delivered-To: importer@patchew.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; 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 1505148659094223.34434109895528; Mon, 11 Sep 2017 09:50:59 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 8BCA621CEB0F8; Mon, 11 Sep 2017 09:48:00 -0700 (PDT) Received: from mail-wm0-x22b.google.com (mail-wm0-x22b.google.com [IPv6:2a00:1450:400c:c09::22b]) (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 20CF820958BCF for ; Mon, 11 Sep 2017 09:47:59 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id a137so10278005wma.0 for ; Mon, 11 Sep 2017 09:50:55 -0700 (PDT) Received: from localhost.localdomain ([154.151.68.52]) by smtp.gmail.com with ESMTPSA id 188sm594756wmg.45.2017.09.11.09.50.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Sep 2017 09:50:34 -0700 (PDT) X-Original-To: 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=7NWaoupHClODnWWYYbJ0iiNLyxWJoRx5Ga/oPb7hSLk=; b=J5e88u6Y+MF6bE/fXC1TUlfRwz3v/L56a+Anf9mNkhiRqRjc2OZsbp/n0pJuVv4caR FJO5fhvqjusEzJuTsL9k+CaXZMtN++rW8YlFAK3EF6WkZsiHVmZ8KH7iLd+rmNDXkif+ CvcPEV4LuX2YzCwjt/Twxeb+1UDR9WUH9rZxc= 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=7NWaoupHClODnWWYYbJ0iiNLyxWJoRx5Ga/oPb7hSLk=; b=cdpIuW8yCnSjyEwS9p3aaU2pgh4kcwV+bs1bdUTiXiJ8G6Nr/cuN4pMIIrXk/YdA0M l47UL2iR5D5qIf5sc8vXXYRo5592w64J/b+nepuIIUVZHImCVjxCDBzuB4KH37oRPK65 DzHKBTvJK+ck+jxrLpV83ruxTiCZTTbmhc/g63f6rjk7fXQ6jMb2tvaD8DxohkoBjhqQ LUlZ5SGdKcbdIoHF0sFdv/iT5v5qm5hpf++r/WhsuYbhCuoXZaytJ8hW5HJhaPh/eiNC 8IndEc1Fg3j8ySB6z8iZb1QEromDNTGW7o2Rqlxe2uXxe6pMLdQBDQIhzFo4uGBWt8CU 4Kmg== X-Gm-Message-State: AHPjjUhbTxam5U4AfV4IkTxqDCtTaX0wIqJWwXffNxrQvBPehAxYBsIi UV2g47W5fx+TuYJ/sJjPr1Zo8KYkHPU= X-Google-Smtp-Source: AOwi7QD30ajLO1cy0ruHu4GiAzglBRmkJd45pUBafi5tYnItUmnJVO6sv3dVsqIaP5VjCdZOWFdBaw== X-Received: by 10.28.164.68 with SMTP id n65mr7981741wme.23.1505148653298; Mon, 11 Sep 2017 09:50:53 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Mon, 11 Sep 2017 17:50:29 +0100 Message-Id: <20170911165029.2391-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] ArmPkg/PlatformBootManagerLib: process pending capsules 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: leif.lindholm@linaro.org, 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" Process any capsule HOBs that were left for us by CapsulePei. This involves calling ProcessCapsules() twice, as explained in the comment in DxeCapsuleLibFmp [sic]. 1) The first call must be before EndOfDxe. The system capsules is processed. If device capsule FMP protocols are exposted at this time and device FMP capsule has zero EmbeddedDriverCount, the device capsules are processed. Each individual capsule result is recorded in capsule record variable. System may reset in this function, if reset is required by capsule and all capsules are processed. If not all capsules are processed, reset will be defered to second call. 2) The second call must be after EndOfDxe and after ConnectAll, so that all device capsule FMP protocols are exposed. The system capsules are skipped. If the device capsules are NOT processed in first call, they are processed here. Each individual capsule result is recorded in capsule record variable. System may reset in this function, if reset is required by capsule processed in first call and second call. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c | 16 ++++= ++++++++++++ ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf | 2 ++ 2 files changed, 18 insertions(+) diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Li= brary/PlatformBootManagerLib/PlatformBm.c index 6c0b352ae366..a3b2d7925f72 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -18,7 +18,9 @@ =20 #include #include +#include #include +#include #include #include #include @@ -447,6 +449,14 @@ PlatformBootManagerBeforeConsole ( VOID ) { + EFI_STATUS Status; + + 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)); + } + // // Signal EndOfDxe PI Event // @@ -528,6 +538,12 @@ PlatformBootManagerAfterConsole ( // EfiBootManagerConnectAll (); =20 + if (GetBootModeHob() =3D=3D BOOT_ON_FLASH_UPDATE) { + DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n")); + Status =3D ProcessCapsules (); + DEBUG((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); + } + // // Enumerate all possible boot options. // diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.i= nf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index e5ffd5db4276..58c4d6d2c7d6 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -43,9 +43,11 @@ [LibraryClasses] BaseLib BaseMemoryLib BootLogoLib + CapsuleLib DebugLib DevicePathLib DxeServicesLib + HobLib MemoryAllocationLib PcdLib PrintLib --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel