[Patch V5 05/22] UefiCpuPkg/CpuPageTableLib:Clear PageSize bit(Bit7) for non-leaf


duntan
 

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 <dun.tan@...>
Cc: Eric Dong <eric.dong@...>
Reviewed-by: Ray Ni <ray.ni@...>
Cc: Rahul Kumar <rahul1.kumar@...>
Tested-by: Gerd Hoffmann <kraxel@...>
Acked-by: Gerd Hoffmann <kraxel@...>
---
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 6ab2961790..a242710afa 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.
--
2.31.1.windows.1