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: Laszlo Ersek <ler...@redhat.com> Cc: Ard Biesheuvel <ardb+tianoc...@kernel.org> Cc: Sami Mujawar <sami.muja...@arm.com> Cc: Ray Ni <ray...@intel.com> Signed-off-by: Wei6 Xu <wei6...@intel.com> --- StandaloneMmPkg/Core/FwVol.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/StandaloneMmPkg/Core/FwVol.c b/StandaloneMmPkg/Core/FwVol.c index fa335d62c252..783dbaf9b048 100644 --- a/StandaloneMmPkg/Core/FwVol.c +++ b/StandaloneMmPkg/Core/FwVol.c @@ -116,6 +116,25 @@ MmCoreFfsFindMmDriver ( break; } + // + // Check uncompressed firmware volumes + // + Status = FfsFindSectionData ( + EFI_SECTION_FIRMWARE_VOLUME_IMAGE, + FileHeader, + &SectionData, + &SectionDataSize + ); + if (!EFI_ERROR (Status)) { + if (SectionDataSize > sizeof (EFI_FIRMWARE_VOLUME_HEADER)) { + InnerFvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SectionData; + MmCoreFfsFindMmDriver (InnerFvHeader, Depth + 1); + } + } + + // + // Check compressed firmware volumes + // Status = FfsFindSection ( EFI_SECTION_GUID_DEFINED, FileHeader, -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110300): https://edk2.groups.io/g/devel/message/110300 Mute This Topic: https://groups.io/mt/102270549/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-