StandaloneMmPkg Core: Check PE section finding status

The code should check PE section finding status instead of
DEPEX section finding status for the driver to be added into list.
It is a supplementary patch for 37db800 to support no DEPEX case.

Signed-off-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Star Zeng 2026-03-16 23:00:45 +08:00 committed by mergify[bot]
parent fc13220238
commit a4a7346cf4
2 changed files with 6 additions and 4 deletions

View file

@ -377,9 +377,6 @@ MmGetDepexSectionAndPreProccess (
//
DriverEntry->DepexProtocolError = TRUE;
} else {
//
// If no Depex assume depend on all architectural protocols
//
DriverEntry->Depex = NULL;
DriverEntry->Dependent = TRUE;
DriverEntry->DepexProtocolError = FALSE;

View file

@ -222,7 +222,12 @@ MmCoreFfsFindMmDriver (
Status = FfsFindSectionData (EFI_SECTION_PE32, FileHeader, &Pe32Data, &Pe32DataSize);
DEBUG ((DEBUG_INFO, "Find PE data - 0x%x\n", Pe32Data));
DepexStatus = FfsFindSectionData (EFI_SECTION_MM_DEPEX, FileHeader, &Depex, &DepexSize);
if (!EFI_ERROR (DepexStatus)) {
if (DepexStatus == EFI_NOT_FOUND) {
Depex = NULL;
DepexSize = 0;
}
if (!EFI_ERROR (Status)) {
MmAddToDriverList (FwVolHeader, Pe32Data, Pe32DataSize, Depex, DepexSize, &FileHeader->Name);
}
}