From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-x233.google.com (mail-io0-x233.google.com [IPv6:2607:f8b0:4001:c06::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 026CE21E97814 for ; Fri, 15 Sep 2017 09:26:18 -0700 (PDT) Received: by mail-io0-x233.google.com with SMTP id d16so9712776ioj.3 for ; Fri, 15 Sep 2017 09:29:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=42n8KkrQ8xF8ci53F+wExjE18dOVcDoeJ69AkVHXT3s=; b=h+SSNkH3ySLydi+73ssBZPPnB7WrjTr22QN1VrCWvTykS78vvAA1zwwvMnCLuNqQSX 31LNCT+gZ9X7X0GDAcRbLHl3yazTSYy/HSIq4Nu7YRKOUalOFjd+dB0wGW//v8aTHdxa 0UkhOm6D0M2gbw818kLnHhG2gQgaRr06qTKXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=42n8KkrQ8xF8ci53F+wExjE18dOVcDoeJ69AkVHXT3s=; b=li0mCR5czDQEkKNLOTrap5wOTCcli1EZ1vsr9KgBo7buRgNgxa075vd/hIfunE/lzz Gz6ZWbHJNohb6fQrEkQJaXs2rZfqQYdoomJ/oPQ/svnz00opFrZrLabfTzI0l8LbJe1A WNhyEU4frAxl0GvF+7NvfqXPUo3sAaKqrUTFb7C/Gv/lF2s9Yf+iAwh2x5in1tDs64Ef bEe541oh9SAlenf+Zaz2kM6QX/i148v51hGxaEmAtxk58C8GGTtQLZRDbTmsqtytkhxN EkdMsbbvVcORjWCotGF0I88isndK2eFNOhDh1GCfh9g9Y7df/AZ0D6LRtUF08jtN66BE gRag== X-Gm-Message-State: AHPjjUhtp82xUDybeXiqkIfcDzMnBohiX6fVPB9snPpHx3bz6UvpPmzO h8TbMnMIFYRbfXvD9S+OQ5gLdQQiQjxYEWa49QywQw== X-Google-Smtp-Source: AOwi7QA3EvAhu4AmOH+tK12N7NN+XRvNulU7ecKk4azGOKJggIujbS2qyx6MvR2r5N8GZqCJWAbVKDqsc45E45Gyy+U= X-Received: by 10.107.15.141 with SMTP id 13mr7918977iop.141.1505492957172; Fri, 15 Sep 2017 09:29:17 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.152.18 with HTTP; Fri, 15 Sep 2017 09:29:16 -0700 (PDT) In-Reply-To: <20170915162223.snsm6dzxm75fdcta@bivouac.eciton.net> References: <20170911165029.2391-1-ard.biesheuvel@linaro.org> <20170915162223.snsm6dzxm75fdcta@bivouac.eciton.net> From: Ard Biesheuvel Date: Fri, 15 Sep 2017 09:29:16 -0700 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" 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:26:18 -0000 Content-Type: text/plain; charset="UTF-8" On 15 September 2017 at 09:22, Leif Lindholm wrote: > 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. > Yeah, good point.