From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.3231.1603853832971547634 for ; Tue, 27 Oct 2020 19:57:13 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: siyuan.fu@intel.com) IronPort-SDR: 4kHXszVkYHhamfqGbLEdOqL6paiy52XgJNkkVogHQQp5Qd6wd8L/jJjeYooXty2qN+xsG7fz0m rkiE1JOFaK3A== X-IronPort-AV: E=McAfee;i="6000,8403,9787"; a="148050612" X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="148050612" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 19:57:07 -0700 IronPort-SDR: +J7wJvqjBxfdPT50jq97UqZXZ/Q6lrUD36S8k08155K+ZQh/GtMTLaKZ7XW/EkxY0u4+yIgZWK 9C9IWWFzLq3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,425,1596524400"; d="scan'208";a="424600498" Received: from shwdeopenpsi787.ccr.corp.intel.com ([10.239.158.56]) by fmsmga001.fm.intel.com with ESMTP; 27 Oct 2020 19:57:05 -0700 From: "Siyuan, Fu" To: devel@edk2.groups.io Cc: Dandan Bi , Liming Gao Subject: [Patch] MdeModulePkg/Core: Support standalone MM in FV2 protocol GetNextFile(). Date: Wed, 28 Oct 2020 10:57:01 +0800 Message-Id: <38c94c28e001783a852c990481d46a0937874f39.1603853801.git.siyuan.fu@intel.com> X-Mailer: git-send-email 2.19.1.windows.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3028 The FirmwareVolume2Protocol->GetNextFile() produced by DXE Core can be used to search for a file based on the value of *FileType input. However, this service will always return EFI_NOT_FOUND if the input FileType is set to EFI_FV_FILETYPE_MM_STANDALONE or EFI_FV_FILETYPE_MM_CORE_STANDALONE, Which means user can't use this service to search any standalone MM image in that FV. This patch update the FirmwareVolume2Protocol->GetNextFile() service to support searching standalone MM module. Signed-off-by: Siyuan Fu Cc: Dandan Bi Cc: Liming Gao --- MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c index 2861cbf676..8dcbbeb5ee 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVolRead.c @@ -1,7 +1,7 @@ /** @file Implements functions to read firmware file -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -143,9 +143,9 @@ FvGetNextFile ( return EFI_ACCESS_DENIED; } - if (*FileType > EFI_FV_FILETYPE_SMM_CORE) { + if (*FileType > EFI_FV_FILETYPE_MM_CORE_STANDALONE) { // - // File type needs to be in 0 - 0x0D + // File type needs to be in 0 - 0x0F // return EFI_NOT_FOUND; } -- 2.19.1.windows.1