diff --git a/StandaloneMmPkg/Core/Dispatcher.c b/StandaloneMmPkg/Core/Dispatcher.c index 403c374336..b9d39531b6 100644 --- a/StandaloneMmPkg/Core/Dispatcher.c +++ b/StandaloneMmPkg/Core/Dispatcher.c @@ -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; diff --git a/StandaloneMmPkg/Core/FwVol.c b/StandaloneMmPkg/Core/FwVol.c index bb13d88982..17945c5865 100644 --- a/StandaloneMmPkg/Core/FwVol.c +++ b/StandaloneMmPkg/Core/FwVol.c @@ -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); } }