From b6b54367c30f1f62a8b5228bc1dfb32246bc91be Mon Sep 17 00:00:00 2001 From: Dun Tan Date: Mon, 20 Mar 2023 09:40:01 +0800 Subject: [PATCH] UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf Clear PageSize bit(Bit7) for non-leaf entry in PageTableLibSetPnle. This function is used to set non-leaf entry attributes so it should make sure that the PageSize bit of the entry should be 0. Signed-off-by: Dun Tan Cc: Eric Dong Reviewed-by: Ray Ni Cc: Rahul Kumar Tested-by: Gerd Hoffmann Acked-by: Gerd Hoffmann --- UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c index b94ef07c56..57f1db203b 100644 --- a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c +++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c @@ -202,7 +202,8 @@ PageTableLibSetPnle ( Pnle->Bits.Nx = Attribute->Bits.Nx; } - Pnle->Bits.Accessed = 0; + Pnle->Bits.Accessed = 0; + Pnle->Bits.MustBeZero = 0; // // Set the attributes (WT, CD, A) to 0.