From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4001:c0b::22d; helo=mail-it0-x22d.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org Received: from mail-it0-x22d.google.com (mail-it0-x22d.google.com [IPv6:2607:f8b0:4001:c0b::22d]) (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 DAE8421E78217 for ; Fri, 6 Oct 2017 13:47:44 -0700 (PDT) Received: by mail-it0-x22d.google.com with SMTP id m123so7167525ita.3 for ; Fri, 06 Oct 2017 13:51:08 -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=uarPskRmtP14ekZQAHasyojWtXPIo5SsWYRs7aSN1AY=; b=gQ6O9dQWH9Ybyxzps2BlohHjeKTH3ol2tXrQVE9gDIp78NMZP4wYyvAD2b2XCJxO6M fL1olAOMzdxg6Wj1ZxT8sORNrMdQxRBk1pBbUoZpd/3yu/sb/kFFFld9UACIKFsy2sbQ EU9fTV/fsUGh+M41ip1wBisRYIDEC0HNc3lIA= 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=uarPskRmtP14ekZQAHasyojWtXPIo5SsWYRs7aSN1AY=; b=Yn41pu5/kFitIgbzfqegCP8qMfyZG+GB/Vonj5w1E6HnCY8h/IvTVq98iwR0ZHJK7O lS4Ty4Gq7iGTy6CC1JIbX3gAjg5ULxSTOO6ZyoSnU0OseiYbD7UYOq/s3r4r5gzSTQdn IdOY8R9v/G8GdkbdN8tjrVD7f5JATP7Ohv03roTl0CEqeGjLwM+jywj6xVs8pVUowa3u EOdwhYCx+SAbip3FgM7BaOjC1lfJzXbmCLJYjyoPMs0noTdJwToCHjrhn1zfPXWiweBt p+uvRy/eHKiRAUAj+QLPhIBBTgM1Vr7Ktku7wJ7dvTO3/yMDdh17Z7BFVF3YGN6is7gr uMbQ== X-Gm-Message-State: AMCzsaU2ziOdaRPyXsR8hKUWoOHt7XGm3ZMjaac+fjOxB5lw/KlVK6GX 3z4ja+ww2D8MCEQl5u4bQZhqer3RLP/DWJP+XT6l+w== X-Google-Smtp-Source: AOwi7QBZFElwXzySrRetCVLCazsAzMFlMDh1K+YQPvNl9+sNmiZnKRrk94hkk6K0J0dvswCGnVHUVQ/nMOJIcKFGjE0= X-Received: by 10.36.107.21 with SMTP id v21mr1328124itc.43.1507323068055; Fri, 06 Oct 2017 13:51:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.107.131.167 with HTTP; Fri, 6 Oct 2017 13:51:07 -0700 (PDT) In-Reply-To: <20171006143929.kr3sajwoi7wu6zub@bivouac.eciton.net> References: <20171002190226.25103-1-ard.biesheuvel@linaro.org> <20171006143929.kr3sajwoi7wu6zub@bivouac.eciton.net> From: Ard Biesheuvel Date: Fri, 6 Oct 2017 21:51:07 +0100 Message-ID: To: Leif Lindholm Cc: "edk2-devel@lists.01.org" Subject: Re: [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: , X-List-Received-Date: Fri, 06 Oct 2017 20:47:45 -0000 Content-Type: text/plain; charset="UTF-8" On 6 October 2017 at 15:39, Leif Lindholm wrote: > On Mon, Oct 02, 2017 at 08:02:26PM +0100, Ard Biesheuvel wrote: >> 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 >> --- >> 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/Library/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; >> >> if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { >> DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n")); >> Status = ProcessCapsules (); >> DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); >> + } else { >> + if (EsrtManagement != NULL) { >> + EsrtManagement->SyncEsrtFmp(); > > Missing space before '('. > >> + } >> + } >> + >> + Status = gBS->LocateProtocol(&gEsrtManagementProtocolGuid, NULL, > > Missing space before '('. > >> + (VOID **)&EsrtManagement); >> + if (EFI_ERROR(Status)) { > > Missing space before '('. > >> + EsrtManagement = NULL; >> } >> >> // >> @@ -524,7 +536,8 @@ PlatformBootManagerAfterConsole ( >> VOID >> ) >> { >> - EFI_STATUS Status; >> + ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; >> + EFI_STATUS Status; >> >> // >> // Show the splash screen. >> @@ -538,6 +551,12 @@ PlatformBootManagerAfterConsole ( >> // >> EfiBootManagerConnectAll (); >> >> + Status = gBS->LocateProtocol(&gEsrtManagementProtocolGuid, NULL, > > Missing space before '('. > >> + (VOID **)&EsrtManagement); >> + if (!EFI_ERROR(Status)) { > > Missing space before '('. > >> + EsrtManagement->SyncEsrtFmp(); > > Missing space before '('. > > If you fold those in, > Reviewed-by: Leif Lindholm > Thanks. Pushed as 13ca0abb01d90eb039abf7ef978bd803e2347cef