From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A0D3221CF58D9 for ; Thu, 5 Oct 2017 01:02:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94DBFC059B60; Thu, 5 Oct 2017 08:05:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 94DBFC059B60 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-16.rdu2.redhat.com [10.10.120.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 656455D9C0; Thu, 5 Oct 2017 08:05:38 +0000 (UTC) To: Ard Biesheuvel , Star Zeng Cc: "edk2-devel@lists.01.org" , Liming Gao References: <20171005063327.4872-1-star.zeng@intel.com> <20171005063327.4872-3-star.zeng@intel.com> From: Laszlo Ersek Message-ID: Date: Thu, 5 Oct 2017 10:05:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 05 Oct 2017 08:05:39 +0000 (UTC) Subject: Re: [PATCH 2/2] ArmVirtPkg ArmVirtDxeHobLib: Implement BuildFv3Hob 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: Thu, 05 Oct 2017 08:02:17 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Star, On 10/05/17 09:56, Ard Biesheuvel wrote: > On 5 October 2017 at 07:33, Star Zeng wrote: >> Cc: Ard Biesheuvel >> Cc: Laszlo Ersek >> Cc: Liming Gao >> Contributed-under: TianoCore Contribution Agreement 1.1 >> Signed-off-by: Star Zeng >> --- >> ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 34 +++++++++++++++++++++++++++- >> 1 file changed, 33 insertions(+), 1 deletion(-) >> >> diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> index 9e617b8e6991..dc84dd32d24a 100644 >> --- a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> +++ b/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c >> @@ -1,7 +1,7 @@ >> /** @file >> HOB Library implemenation for Dxe Phase with DebugLib dependency removed >> >> -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
>> +Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
>> Copyright (c) 2014, Linaro Ltd. All rights reserved.
>> This program and the accompanying materials >> are licensed and made available under the terms and conditions of the BSD License >> @@ -442,6 +442,38 @@ BuildFv2Hob ( >> ASSERT (FALSE); >> } >> >> +/** >> + Builds a EFI_HOB_TYPE_FV3 HOB. >> + >> + This function builds a EFI_HOB_TYPE_FV3 HOB. >> + It can only be invoked during PEI phase; >> + for DXE phase, it will ASSERT() since PEI HOB is read-only for DXE phase. >> + >> + If there is no additional space for HOB creation, then ASSERT(). >> + If the FvImage buffer is not at its required alignment, then ASSERT(). >> + >> + @param BaseAddress The base address of the Firmware Volume. >> + @param Length The size of the Firmware Volume in bytes. >> + @param AuthenticationStatus The authentication status. >> + @param ExtractedFv TRUE if the FV was extracted as a file within another firmware volume. >> + FALSE otherwise. >> + @param FvName The name of the Firmware Volume. Valid only if IsExtractedFv is TRUE >> + @param FileName The name of the file. Valid only if IsExtractedFv is TRUE >> + > > Could we keep line lengths below 80 columns please? Same for the previous patch. I agree; please rewrap the comment block like that. >> +**/ >> +VOID >> +EFIAPI >> +BuildFv3Hob ( >> + IN EFI_PHYSICAL_ADDRESS BaseAddress, >> + IN UINT64 Length, >> + IN UINT32 AuthenticationStatus, >> + IN BOOLEAN ExtractedFv, >> + IN CONST EFI_GUID *FvName, OPTIONAL >> + IN CONST EFI_GUID *FileName OPTIONAL >> + ) >> +{ >> + ASSERT (FALSE); >> +} The implementation looks good, this library instance is restricted to "DXE and later" modules, and HOB production finishes with the PEI phase -- DXE and later are not allowed to produce HOBs. So this follows the rest of the HOB-building functions in this library instance. With the line lengths adjusted, for this patch: Reviewed-by: Laszlo Ersek Thanks for the quick followup! Laszlo >> >> /** >> Builds a Capsule Volume HOB. >> -- >> 2.13.3.windows.1 >>