From nobody Tue May 7 07:08:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507191681983917.14839693216; Thu, 5 Oct 2017 01:21:21 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B0BF821F3041B; Thu, 5 Oct 2017 01:17:58 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 D8CE420945BB8 for ; Thu, 5 Oct 2017 01:17:57 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2017 01:21:20 -0700 Received: from xxu4-mobl1.ccr.corp.intel.com (HELO lzeng14-MOBL2.ccr.corp.intel.com) ([10.255.29.149]) by FMSMGA003.fm.intel.com with ESMTP; 05 Oct 2017 01:21:17 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,480,1500966000"; d="scan'208";a="906982745" From: Star Zeng To: edk2-devel@lists.01.org Date: Thu, 5 Oct 2017 16:21:10 +0800 Message-Id: <20171005082111.15908-2-star.zeng@intel.com> X-Mailer: git-send-email 2.13.3.windows.1 In-Reply-To: <20171005082111.15908-1-star.zeng@intel.com> References: <20171005082111.15908-1-star.zeng@intel.com> Subject: [edk2] [PATCH V2 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: , Cc: Liming Gao , Laszlo Ersek , Leif Lindholm , Star Zeng , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Ard Biesheuvel --- EmbeddedPkg/Library/PrePiHobLib/Hob.c | 44 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 44 insertions(+) diff --git a/EmbeddedPkg/Library/PrePiHobLib/Hob.c b/EmbeddedPkg/Library/Pr= ePiHobLib/Hob.c index aff532259ef4..aff8ea05797b 100644 --- a/EmbeddedPkg/Library/PrePiHobLib/Hob.c +++ b/EmbeddedPkg/Library/PrePiHobLib/Hob.c @@ -1,6 +1,7 @@ /** @file =20 Copyright (c) 2010, Apple Inc. All rights reserved.
+ Copyright (c) 2017, Intel Corporation. All rights reserved.
=20 This program and the accompanying materials are licensed and made available under the terms and conditions of the BS= D License @@ -601,7 +602,50 @@ BuildFv2Hob ( CopyGuid (&Hob->FileName, FileName); } =20 +/** + 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(). + + @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 wit= hin + 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. + +**/ +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, sizeof (EFI_HOB_FIRMWARE_VOLUME3)); =20 + 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); + } +} =20 /** Builds a Capsule Volume HOB. --=20 2.13.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel From nobody Tue May 7 07:08:58 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1507191684467537.4449521588605; Thu, 5 Oct 2017 01:21:24 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id ED95D21F9B6B6; Thu, 5 Oct 2017 01:18:00 -0700 (PDT) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 E4E4720945BB8 for ; Thu, 5 Oct 2017 01:17:59 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Oct 2017 01:21:22 -0700 Received: from xxu4-mobl1.ccr.corp.intel.com (HELO lzeng14-MOBL2.ccr.corp.intel.com) ([10.255.29.149]) by FMSMGA003.fm.intel.com with ESMTP; 05 Oct 2017 01:21:20 -0700 X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=star.zeng@intel.com; receiver=edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,480,1500966000"; d="scan'208";a="906982760" From: Star Zeng To: edk2-devel@lists.01.org Date: Thu, 5 Oct 2017 16:21:11 +0800 Message-Id: <20171005082111.15908-3-star.zeng@intel.com> X-Mailer: git-send-email 2.13.3.windows.1 In-Reply-To: <20171005082111.15908-1-star.zeng@intel.com> References: <20171005082111.15908-1-star.zeng@intel.com> Subject: [edk2] [PATCH V2 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: , Cc: Laszlo Ersek , Liming Gao , Star Zeng , Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Ard Biesheuvel Cc: Laszlo Ersek Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng Reviewed-by: Laszlo Ersek --- ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c | 36 ++++++++++++++++++++++++= +++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/ArmVirtPkg/Library/ArmVirtDxeHobLib/HobLib.c b/ArmVirtPkg/Libr= ary/ArmVirtDxeHobLib/HobLib.c index 9e617b8e6991..73a0fbd8a4da 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 =20 -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,40 @@ BuildFv2Hob ( ASSERT (FALSE); } =20 +/** + 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 wit= hin + 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. + +**/ +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); +} =20 /** Builds a Capsule Volume HOB. --=20 2.13.3.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel