From: "Xu, Wei6" <wei6.xu@intel.com>
To: devel@edk2.groups.io
Cc: Wei6 Xu <wei6.xu@intel.com>,
Ard Biesheuvel <ardb+tianocore@kernel.org>,
Sami Mujawar <sami.mujawar@arm.com>, Ray Ni <ray.ni@intel.com>
Subject: [edk2-devel] [PATCH 1/1] StandaloneMmPkg: Fix the failure to find uncompressed inner FV.
Date: Tue, 24 Oct 2023 13:53:54 +0800 [thread overview]
Message-ID: <f44b24e0683d6bc039553bb82216991377501049.1698125050.git.wei6.xu@intel.com> (raw)
In-Reply-To: <cover.1698125050.git.wei6.xu@intel.com>
The MmCoreFfsFindMmDriver only checks for encapsulated compressed FVs.
When an inner FV is uncompressed, StandaloneMmCore will miss the FV and
all the MM drivers in the FV will not be dispatched.
Add checks for uncompressed inner FV to fix this issue.
Cc: Ard Biesheuvel <ardb+tianocore@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Ray Ni <ray.ni@intel.com>
Signed-off-by: Wei6 Xu <wei6.xu@intel.com>
---
StandaloneMmPkg/Core/FwVol.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/StandaloneMmPkg/Core/FwVol.c b/StandaloneMmPkg/Core/FwVol.c
index 1f6d7714ba97..1a85d80eb9f7 100644
--- a/StandaloneMmPkg/Core/FwVol.c
+++ b/StandaloneMmPkg/Core/FwVol.c
@@ -104,6 +104,17 @@ MmCoreFfsFindMmDriver (
break;
}
+ Status = FfsFindSectionData (
+ EFI_SECTION_FIRMWARE_VOLUME_IMAGE,
+ FileHeader,
+ &SectionData,
+ &SectionDataSize
+ );
+ if (!EFI_ERROR (Status)) {
+ InnerFvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SectionData;
+ MmCoreFfsFindMmDriver (InnerFvHeader);
+ }
+
Status = FfsFindSectionData (
EFI_SECTION_GUID_DEFINED,
FileHeader,
--
2.29.2.windows.2
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#109986): https://edk2.groups.io/g/devel/message/109986
Mute This Topic: https://groups.io/mt/102152694/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2023-10-24 5:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-24 5:53 [edk2-devel] [PATCH 0/1] StandaloneMmCore finds drivers in uncompressed inner fv Xu, Wei6
2023-10-24 5:53 ` Xu, Wei6 [this message]
2023-10-24 12:02 ` [edk2-devel] [PATCH 1/1] StandaloneMmPkg: Fix the failure to find uncompressed inner FV Laszlo Ersek
2023-10-27 2:21 ` Xu, Wei6
2023-10-28 11:06 ` Laszlo Ersek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f44b24e0683d6bc039553bb82216991377501049.1698125050.git.wei6.xu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox