summaryrefslogtreecommitdiffstats
path: root/MdePkg
diff options
context:
space:
mode:
authorLaszlo Ersek <lersek@redhat.com>2024-01-22 09:31:41 +0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-01-23 18:26:25 +0000
commit2ddae5df31789853040f4c5261bb85e2f010c4a7 (patch)
tree7e222fcb44cbdbf8e925ac87e4fba4499b92adc3 /MdePkg
parentd97f3a1d80fc4880da9726d9a5d7504d3c31da70 (diff)
downloadedk2-2ddae5df31789853040f4c5261bb85e2f010c4a7.tar.gz
edk2-2ddae5df31789853040f4c5261bb85e2f010c4a7.tar.bz2
edk2-2ddae5df31789853040f4c5261bb85e2f010c4a7.zip
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 <nhi@os.amperecomputing.com> Tested-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: levi.yun <yeoreum.yun@arm.com> Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdePkg')
0 files changed, 0 insertions, 0 deletions