Thanks Ray. Will update the copy right year in next version patch. Thanks, Dun
-----Original Message----- From: Ni, Ray <[email protected]> Sent: Wednesday, March 15, 2023 9:24 AM To: Tan, Dun <[email protected]>; [email protected] Cc: Dong, Eric <[email protected]>; Kumar, Rahul R <[email protected]>; Gerd Hoffmann <[email protected]> Subject: RE: [Patch V2 01/14] UefiCpuPkg/CpuPageTableLib: Remove unneeded 'if' condition You can carry my Reviewed-by in next version if you add the copy right year change. > -----Original Message----- > From: Tan, Dun <[email protected]> > Sent: Wednesday, March 8, 2023 6:08 PM > To: [email protected] > Cc: Dong, Eric <[email protected]>; Ni, Ray <[email protected]>; > Kumar, Rahul R <[email protected]>; Gerd Hoffmann > <[email protected]> > Subject: [Patch V2 01/14] UefiCpuPkg/CpuPageTableLib: Remove unneeded > 'if' condition > > Remove unneeded 'if' condition in CpuPageTableLib code. > The deleted code is in the code branch for present non-leaf parent > entry. So the 'if' check for (ParentPagingEntry->Pnle.Bits.Present > == 0) is always FALSE. > > Signed-off-by: Dun Tan <[email protected]> > Cc: Eric Dong <[email protected]> > Cc: Ray Ni <[email protected]> > Cc: Rahul Kumar <[email protected]> > Cc: Gerd Hoffmann <[email protected]> > --- > UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c > b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c > index 37713ec659..47027917d9 100644 > --- a/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c > +++ b/UefiCpuPkg/Library/CpuPageTableLib/CpuPageTableMap.c > @@ -375,15 +375,6 @@ PageTableLibMapInLevel ( > // we need to change PDPTE[0].ReadWrite = 1 and let all PDE[0- > 255].ReadWrite = 0 in this step. > // when PDPTE[0].Nx = 1 but caller wants to map [0-2MB] as Nx = 0 > (PDT[0].Nx = 0) > // we need to change PDPTE[0].Nx = 0 and let all > PDE[0-255].Nx = 1 in > this step. > - if ((ParentPagingEntry->Pnle.Bits.Present == 0) && (Mask->Bits.Present > == 1) && (Attribute->Bits.Present == 1)) { > - if (Modify) { > - ParentPagingEntry->Pnle.Bits.Present = 1; > - } > - > - ChildAttribute.Bits.Present = 0; > - ChildMask.Bits.Present = 1; > - } > - > if ((ParentPagingEntry->Pnle.Bits.ReadWrite == 0) && (Mask- > >Bits.ReadWrite == 1) && (Attribute->Bits.ReadWrite == 1)) { > if (Modify) { > ParentPagingEntry->Pnle.Bits.ReadWrite = 1; > -- > 2.31.1.windows.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101190): https://edk2.groups.io/g/devel/message/101190 Mute This Topic: https://groups.io/mt/97469465/21656 Group Owner: [email protected] Unsubscribe: https://edk2.groups.io/g/devel/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
