From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (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 C867F21F2AF8F for ; Thu, 5 Oct 2017 00:59:26 -0700 (PDT) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 05 Oct 2017 01:02:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,480,1500966000"; d="scan'208";a="1178885364" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga001.jf.intel.com with ESMTP; 05 Oct 2017 01:02:30 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 5 Oct 2017 01:02:30 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.175]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Thu, 5 Oct 2017 16:02:28 +0800 From: "Zeng, Star" To: Ard Biesheuvel CC: "edk2-devel@lists.01.org" , Laszlo Ersek , "Gao, Liming" , Leif Lindholm , "Zeng, Star" Thread-Topic: [edk2] [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3Hob Thread-Index: AQHTPaPnJA56LQVAvEaodZgogYz0rKLUXSQAgACHwqA= Date: Thu, 5 Oct 2017 08:02:28 +0000 Message-ID: <0C09AFA07DD0434D9E2A0C6AEB0483103B97E7A4@shsmsx102.ccr.corp.intel.com> References: <20171005063327.4872-1-star.zeng@intel.com> <20171005063327.4872-2-star.zeng@intel.com> In-Reply-To: Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 1/2] EmbeddedPkg PrePiHobLib: 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 07:59:27 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Oh, my mistake. :( Just used to update the copyright date. :) Will fix it in V2 patch series. Thanks, Star -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Ard = Biesheuvel Sent: Thursday, October 5, 2017 3:55 PM To: Zeng, Star Cc: edk2-devel@lists.01.org; Laszlo Ersek ; Gao, Liming = ; Leif Lindholm Subject: Re: [edk2] [PATCH 1/2] EmbeddedPkg PrePiHobLib: Implement BuildFv3= Hob On 5 October 2017 at 07:33, Star Zeng wrote: > Cc: Leif Lindholm > Cc: Ard Biesheuvel > Cc: Laszlo Ersek > Cc: Liming Gao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > EmbeddedPkg/Library/PrePiHobLib/Hob.c | 43=20 > ++++++++++++++++++++++++++++++++++- > 1 file changed, 42 insertions(+), 1 deletion(-) > > diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c=20 > b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > index aff532259ef4..a681587d3ee0 100644 > --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c > +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c > @@ -1,6 +1,6 @@ > /** @file > > - Copyright (c) 2010, Apple Inc. All rights reserved.
> + Copyright (c) 2010 - 2017, Apple Inc. All rights reserved.
> You may want to change this :-) > This program and the accompanying materials > are licensed and made available under the terms and conditions of=20 > the BSD License @@ -601,7 +601,48 @@ BuildFv2Hob ( > CopyGuid (&Hob->FileName, FileName); } > > +/** > + 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=20 > + ASSERT() since PEI HOB is read-only for DXE phase. > + > + If there is no additional space for HOB creation, 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 w= ithin another firmware volume. > + FALSE otherwise. > + @param FvName The name of the Firmware Volume. Valid o= nly if IsExtractedFv is TRUE > + @param FileName The name of the file. Valid only if IsEx= tractedFv is TRUE > + > +**/ > +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 > + ) > +{ > + EFI_HOB_FIRMWARE_VOLUME3 *Hob; > + > + Hob =3D CreateHob (EFI_HOB_TYPE_FV3, (UINT16) sizeof=20 > + (EFI_HOB_FIRMWARE_VOLUME3)); > > + Hob->BaseAddress =3D BaseAddress; > + Hob->Length =3D Length; > + Hob->AuthenticationStatus =3D AuthenticationStatus; > + Hob->ExtractedFv =3D ExtractedFv; > + if (ExtractedFv) { > + CopyGuid (&Hob->FvName, FvName); > + CopyGuid (&Hob->FileName, FileName); > + } > +} > > /** > Builds a Capsule Volume HOB. > -- > 2.13.3.windows.1 > _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel