mirror of https://github.com/acidanthera/audk.git
30a25f2778
This commit is to reduce and optimize access to attribute in CpuPageTableLib. Unreasonable writing to attribute of page table may leads to expection. The assembly code for C code Pnle->Bits.Present = Attribute->Bits.Present looks like: and dword [rcx], 0xfffffffe and eax, 0x1 or [rcx], eax In case Pnle->Bits.Present and Attribute->Bits.Present is 1, Pnle->Bits.Present will be set to 0 for short time(2 instructions) which is unexpected. If some other core is accessing the page, it may leads to expection. This change reduce and optimize access to attribute of page table, attribute of page table is set only when it need to be changed. Signed-off-by: Zhou Jianfeng <jianfeng.zhou@intel.com> Reviewed-by: Ray Ni <ray.ni@intel.com> Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com> Cc: Laszlo Ersek <lersek@redhat.com> Cc: Rahul Kumar <rahul1.kumar@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> |
||
---|---|---|
.. | ||
BaseRiscV64CpuExceptionHandlerLib | ||
BaseRiscV64CpuTimerLib | ||
BaseRiscVMmuLib | ||
BaseXApicLib | ||
BaseXApicX2ApicLib | ||
CcExitLibNull | ||
CpuCacheInfoLib | ||
CpuCommonFeaturesLib | ||
CpuExceptionHandlerLib | ||
CpuPageTableLib | ||
CpuTimerLib | ||
MicrocodeLib | ||
MmSaveStateLib | ||
MpInitLib | ||
MpInitLibUp | ||
MtrrLib | ||
PlatformSecLibNull | ||
RegisterCpuFeaturesLib | ||
SecPeiDxeTimerLibUefiCpu | ||
SmmCpuFeaturesLib | ||
SmmCpuPlatformHookLibNull | ||
SmmCpuRendezvousLib | ||
SmmCpuSyncLib |