From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x233.google.com (mail-wm0-x233.google.com [IPv6:2a00:1450:400c:c09::233]) (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 1FF5321E97814 for ; Fri, 15 Sep 2017 09:19:27 -0700 (PDT) Received: by mail-wm0-x233.google.com with SMTP id g206so9694260wme.0 for ; Fri, 15 Sep 2017 09:22:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=YHoqTljVJs4uyiDFwwmtHfZEF9KRMikTSaLhFdludY4=; b=E6M9rYaF004cm7ZOtYDT0VFEAD7A1JHo15OzyYL3TxPpBmkha+DfXi5yBd7Hs0vpO2 XWdeA2S7vUPFihFPB8oIcL66NCs42bkWW1ZMTPl10p3AbxaGcnxoAn27QEjvlYSnV/yD 8GmnlsW3ljD+3qY7Jhs9LAgbU6RO+lVqKQxzA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=YHoqTljVJs4uyiDFwwmtHfZEF9KRMikTSaLhFdludY4=; b=NHmjoVtt2OBl2NYS8gqGfhZBju7bq7K1qBH5AK2NQEHGS53cb5UmQ0FE+vRbnRxtXI qnq7s2JDpJWwj/BOfIw8fGYgdh9+TA1+pbd1UM2o+YYeO8h6NFReuCXhkAiQbEwlVeB5 +CBSoLiHTbLU62Gc8iYSeLpPrimhgJ6Z7U/LRVYPYxzZRGOwwuzIrkl/WfSIa6+ipI4z reY+ieXeTJ5V3FYie/XerXzpWSPlofcuzoN9Vuxfuz+q8Osyshak1qM2674MrddVGCop er6G0fgojvcE1XlOhcKgG8V0APgDVJLkyLOORh89gftoqr0g3yFDwR2Nbl5TPyQBQtvS BvIg== X-Gm-Message-State: AHPjjUhRnlN0jA6vlgbEffT58GpLoIMOhOVrx1xMMX4DDqMXpm6b3Yao MPLKPSDjXmk+GuyBgWh0Aw== X-Google-Smtp-Source: AOwi7QCdAGNBt7rPjTJq1KN3NFURDHb6sfV5A7N0P0t/XUf1EH4tJH97VmBr7tKe+VC6SkM7iraKAA== X-Received: by 10.28.69.11 with SMTP id s11mr2891862wma.81.1505492546054; Fri, 15 Sep 2017 09:22:26 -0700 (PDT) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id 11sm1208417wmj.14.2017.09.15.09.22.24 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 15 Sep 2017 09:22:24 -0700 (PDT) Date: Fri, 15 Sep 2017 17:22:23 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20170915162223.snsm6dzxm75fdcta@bivouac.eciton.net> References: <20170911165029.2391-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20170911165029.2391-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [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: , X-List-Received-Date: Fri, 15 Sep 2017 16:19:27 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Sep 11, 2017 at 05:50:29PM +0100, Ard Biesheuvel wrote: > 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/Library/PlatformBootManagerLib/PlatformBm.c > index 6c0b352ae366..a3b2d7925f72 100644 > --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c > @@ -18,7 +18,9 @@ > > #include > #include > +#include > #include > +#include > #include > #include > #include > @@ -447,6 +449,14 @@ PlatformBootManagerBeforeConsole ( > VOID > ) > { > + EFI_STATUS Status; > + > + if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { > + DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n")); > + Status = ProcessCapsules (); > + DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); > + } > + > // > // Signal EndOfDxe PI Event > // > @@ -528,6 +538,12 @@ PlatformBootManagerAfterConsole ( > // > EfiBootManagerConnectAll (); > > + if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { > + DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n")); > + Status = ProcessCapsules (); > + DEBUG((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); > + } > + > // > // Enumerate all possible boot options. > // > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 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 There is no CapsuleLib resolution in ArmPkg.dsc. That should probably be added by this patch. / Leif > DebugLib > DevicePathLib > DxeServicesLib > + HobLib > MemoryAllocationLib > PcdLib > PrintLib > -- > 2.11.0 >