mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
UefiCpuPkg PiSmmCpuDxeSmm: Remove redundant code to set IDT range to RO
AllocateCodePages() is used to allocate buffer for IDT range, the code pages will be set to RO in SetMemMapAttributes(), then the code to set IDT range to RO in PatchGdtIdtMap() is redundant and could be removed. Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Eric Dong <eric.dong@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Star Zeng <star.zeng@intel.com> Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
parent
6e601a4109
commit
fe90d0d2ad
@ -803,11 +803,10 @@ PatchGdtIdtMap (
|
||||
|
||||
BaseAddress = gcSmiIdtr.Base;
|
||||
Size = ALIGN_VALUE(gcSmiIdtr.Limit + 1, SIZE_4KB);
|
||||
SmmSetMemoryAttributes (
|
||||
BaseAddress,
|
||||
Size,
|
||||
EFI_MEMORY_RO
|
||||
);
|
||||
//
|
||||
// The range should have been set to RO
|
||||
// if it is allocated with EfiRuntimeServicesCode.
|
||||
//
|
||||
SmmSetMemoryAttributes (
|
||||
BaseAddress,
|
||||
Size,
|
||||
|
Loading…
x
Reference in New Issue
Block a user