]> git.proxmox.com Git - mirror_edk2.git/commit
UefiCpuPkg: Simplify the code to set smm page table as RO
authorTan, Dun <dun.tan@intel.com>
Wed, 21 Dec 2022 04:21:56 +0000 (12:21 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 21 Dec 2022 11:13:48 +0000 (11:13 +0000)
commit72a9386f67f8ef5486c90f45fb24e2cf1c05a269
tree16dc9a0c14ad0d843f621821e700074e014eab9e
parent0426115b673899c0e99235e2f77054bbcf208335
UefiCpuPkg: Simplify the code to set smm page table as RO

Simplify the code to set memory used by smm page table as RO.
Since memory used by smm page table are in PageTablePool list,
we only need to set all PageTablePool as ReadOnly in smm page
table itself. Also, we only need to flush tlb once after
setting all page table pool as Read Only.

Signed-off-by: Dun Tan <dun.tan@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Cc: Rahul Kumar <rahul1.kumar@intel.com>
UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.h
UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c
UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c