From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c09::22b; helo=mail-wm0-x22b.google.com; envelope-from=leif.lindholm@linaro.org; receiver=edk2-devel@lists.01.org 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 C659221EA15C5 for ; Fri, 6 Oct 2017 07:36:10 -0700 (PDT) Received: by mail-wm0-x22b.google.com with SMTP id i124so7976851wmf.3 for ; Fri, 06 Oct 2017 07:39:34 -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=qbgXiChm6RYQfcpEeHS4g8ZxFC18s1HqipTSitu7lrg=; b=IzpxZrw2QL50B5rL1MmbOfpD5Zx/Y1nwG3KbyvHu68c1agkhQcktN39l0bqwaJQvcl M6vBB8q6pdBhXIj0lAGJ3yiDI9bSpcrOFvRbgXyDYrwGiE61EoffSBhZzpGLNWc1heMK NN9zceF5sBPhVI0t9nWVRKlQ2ZTbSDFCXNZnw= 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=qbgXiChm6RYQfcpEeHS4g8ZxFC18s1HqipTSitu7lrg=; b=nXl//nOatbs3qt/2Jed5m2DleWl2UcbtOvEOu0KpBXdLCH2MNXy6mp/esNN1yUTLMh R/NKwe8jGRk6uKH5+co6VfZfhk4GNWtoMMg3Fw3C4Tu/pXiZcYxgxDr1WUk9bjnlrV5M Bdlcfzmwmfj6S0hbUP139EdM6G9KoiEgBSYSCT5aH5JtKBTMmBKiQyaY6ekMPWxofo0u VWnJnA2cP6x9mMQfRSSH0/H45MVD7kqgknS2Htxr+wtZJgP/1Dgo9XYhjIah6RdNwAh9 7+N1HKuVJTKSEb6zB+M1SGcIo6L+6U1A158oqvaoxz1YtunP5AMAEDDnXKqmRxicVJkx X6sg== X-Gm-Message-State: AMCzsaVzcildDsiqJ68l/K4/0eFOy6uQGI9YATwcyZit/wYj1y/k9reP lf7+vkI6+smQhhv4rh+Ea5QwAQ== X-Google-Smtp-Source: AOwi7QCvZvjViezmVM1gIQHWPtafEYdbbT/kE8zi8FqAyC59+2/25KYcVYmFSqONSjAB8xUbT03VYw== X-Received: by 10.28.93.145 with SMTP id r139mr1912186wmb.72.1507300773036; Fri, 06 Oct 2017 07:39:33 -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 p9sm646354wra.43.2017.10.06.07.39.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Oct 2017 07:39:31 -0700 (PDT) Date: Fri, 6 Oct 2017 15:39:29 +0100 From: Leif Lindholm To: Ard Biesheuvel Cc: edk2-devel@lists.01.org Message-ID: <20171006143929.kr3sajwoi7wu6zub@bivouac.eciton.net> References: <20171002190226.25103-1-ard.biesheuvel@linaro.org> MIME-Version: 1.0 In-Reply-To: <20171002190226.25103-1-ard.biesheuvel@linaro.org> User-Agent: NeoMutt/20170113 (1.7.2) 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 14:36:11 -0000 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > + } > + > if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { > DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n")); > Status = ProcessCapsules (); > diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf 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 > -- > 2.11.0 >