From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web11.35930.1674093084732795787 for ; Wed, 18 Jan 2023 17:51:30 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=MAX+hypj; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674093090; x=1705629090; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mCFlSm2mLIk6MQtCgioJ+/XzPce0xmDlVrCg7t0q5+0=; b=MAX+hypj+Fse7TdHkeJ9oVSmeyqI2sj2QPWh5LK5iaaXuERtZVim3Ke0 SOa52nQAWDO5YcUYG7qNZvI5aBICbqdtvJU5xv8XeFpqGuAU4nnVFJiKz asqV8ianOVunRafyIkjvj9Av+ECQ38ZNonJ7QgpCwk3+l55GsKU+NRcqM nynftVQkMF5qdLLJ1aADYxWaJRyfS9d8KE504LtpGqZUSZvz82udCeyND f1aOqz1Y4ROakVwmFCq52zIvHI68plShrLsPxL1SXBJ2Y2DuWSiq7pwBs TtzGXgVdKn0yTl4GcSSaMF7kRMmAFS2BEd2pcHrH7PClPFL0nDHVf9vfN A==; X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="304846069" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="304846069" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 17:51:30 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10594"; a="692239006" X-IronPort-AV: E=Sophos;i="5.97,226,1669104000"; d="scan'208";a="692239006" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.254.211.169]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jan 2023 17:51:26 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Leif Lindholm , Ard Biesheuvel , Abner Chang , Daniel Schaefer , Gerd Hoffmann , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH V1 2/2] EmbeddedPkg: Add back FfsFindSectionData Date: Thu, 19 Jan 2023 09:51:08 +0800 Message-Id: <20230119015108.1323-3-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: <20230119015108.1323-1-min.m.xu@intel.com> References: <20230119015108.1323-1-min.m.xu@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu In commit c673216f53 a new input parameter is added in FfsFindSectionData. That change breaks the build of ArmVirtPkg. In this patch FfsFindSectionData is added back. It calls FfsFindSectionDataWithHook with a NULL hook. Cc: Leif Lindholm Cc: Ard Biesheuvel Cc: Abner Chang Cc: Daniel Schaefer Cc: Gerd Hoffmann Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu --- EmbeddedPkg/Include/Library/PrePiLib.h | 20 ++++++++++++++++++++ EmbeddedPkg/Library/PrePiLib/FwVol.c | 23 +++++++++++++++++++++++ 2 files changed, 43 insertions(+) diff --git a/EmbeddedPkg/Include/Library/PrePiLib.h b/EmbeddedPkg/Include/Library/PrePiLib.h index 0c259864d612..93a9115eac2d 100644 --- a/EmbeddedPkg/Include/Library/PrePiLib.h +++ b/EmbeddedPkg/Include/Library/PrePiLib.h @@ -85,6 +85,26 @@ FfsFindSectionDataWithHook ( OUT VOID **SectionData ); +/** + This service enables discovery sections of a given type within a valid FFS file. + + @param SectionType The value of the section type to find. + @param FileHandle A pointer to the file header that contains the set of sections to + be searched. + @param SectionData A pointer to the discovered section, if successful. + + @retval EFI_SUCCESS The section was found. + @retval EFI_NOT_FOUND The section was not found. + +**/ +EFI_STATUS +EFIAPI +FfsFindSectionData ( + IN EFI_SECTION_TYPE SectionType, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData + ); + /** Find a file in the volume by name diff --git a/EmbeddedPkg/Library/PrePiLib/FwVol.c b/EmbeddedPkg/Library/PrePiLib/FwVol.c index 85dbf5b0adb3..7739a5c8aae7 100644 --- a/EmbeddedPkg/Library/PrePiLib/FwVol.c +++ b/EmbeddedPkg/Library/PrePiLib/FwVol.c @@ -504,6 +504,29 @@ FfsFindSectionDataWithHook ( ); } +/** + This service enables discovery sections of a given type within a valid FFS file. + + @param SectionType The value of the section type to find. + @param FileHandle A pointer to the file header that contains the set of sections to + be searched. + @param SectionData A pointer to the discovered section, if successful. + + @retval EFI_SUCCESS The section was found. + @retval EFI_NOT_FOUND The section was not found. + +**/ +EFI_STATUS +EFIAPI +FfsFindSectionData ( + IN EFI_SECTION_TYPE SectionType, + IN EFI_PEI_FILE_HANDLE FileHandle, + OUT VOID **SectionData + ) +{ + return FfsFindSectionDataWithHook (SectionType, NULL, FileHandle, SectionData); +} + /** This service enables discovery of additional firmware files. -- 2.29.2.windows.2