Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 2ddae5df31789853040f4c5261bb85e2f010c4a7
https://github.com/tianocore/edk2/commit/2ddae5df31789853040f4c5261bb85e2f010c4a7
Author: Laszlo Ersek <[email protected]>
Date: 2024-01-23 (Tue, 23 Jan 2024)
Changed paths:
M StandaloneMmPkg/Core/Dependency.c
Log Message:
-----------
StandaloneMmPkg/Core: Remove optimization for depex evaluation
The current dependency evaluator violates the memory access permission
when patching depex grammar directly in the read-only depex memory area.
Laszlo pointed out the optimization issue in the thread (1) "Memory
Attribute for depex section" and provided suggested patch to remove the
perf optimization.
In my testing, removing the optimization does not make significant perf
reduction. That makes sense that StandaloneMM dispatcher only searches
in MM protocol database and does not depend on UEFI/DXE protocol
database. Also, we don't have many protocols in StandaloneMM like
UEFI/DXE.
>From Laszlo,
"The patch removes the EFI_DEP_REPLACE_TRUE handling altogether, plus it
CONST-ifies the Iterator pointer (which points into the DEPEX section),
so that the compiler catch any possible accesses at *build time* that
would write to the write-protected DEPEX memory area."
(1) https://edk2.groups.io/g/devel/message/113531
Signed-off-by: Nhi Pham <[email protected]>
Tested-by: levi.yun <[email protected]>
Reviewed-by: levi.yun <[email protected]>
Reviewed-by: Ray Ni <[email protected]>
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits