[edk2-devel] [Patch V2 14/14] UefiCpuPkg: Modify UnitTest code since tested API is changed

Ni, Ray ray.ni at intel.com
Wed Mar 15 09:27:02 UTC 2023


OK. Then Reviewed-by: Ray Ni <ray.ni at intel.com>

> -----Original Message-----
> From: Liu, Zhiguang <zhiguang.liu at intel.com>
> Sent: Wednesday, March 15, 2023 5:26 PM
> To: Ni, Ray <ray.ni at intel.com>; Tan, Dun <dun.tan at intel.com>;
> devel at edk2.groups.io
> Cc: Dong, Eric <eric.dong at intel.com>; Kumar, Rahul R
> <rahul.r.kumar at intel.com>
> Subject: RE: [Patch V2 14/14] UefiCpuPkg: Modify UnitTest code since tested
> API is changed
> 
> Hi Ray,
> 
> The Address could be not 4k align, "&
> IA32_MAP_ATTRIBUTE_PAGE_TABLE_BASE_ADDRESS_MASK" is to clear the
> low 12 bit to avoid impact the attribute.
> I think it is needed
> 
> Thanks
> Zhiguang
> 
> > -----Original Message-----
> > From: Ni, Ray <ray.ni at intel.com>
> > Sent: Wednesday, March 15, 2023 2:43 PM
> > To: Tan, Dun <dun.tan at intel.com>; devel at edk2.groups.io
> > Cc: Liu, Zhiguang <zhiguang.liu at intel.com>; Dong, Eric
> > <eric.dong at intel.com>; Kumar, Rahul R <rahul.r.kumar at intel.com>
> > Subject: RE: [Patch V2 14/14] UefiCpuPkg: Modify UnitTest code since
> tested
> > API is changed
> >
> > > @@ -413,8 +422,9 @@ CompareEntrysforOnePoint (
> > >    //
> > >    for (Index = 0; Index < MapCount; Index++) {
> > >      if ((Address >= Map[Index].LinearAddress) && (Address <
> > > (Map[Index].LinearAddress + Map[Index].Length))) {
> > > -      AttributeInMap.Uint64                    = (Map[Index].Attribute.Uint64 &
> > > mSupportedBit.Uint64);
> > > -      AttributeInMap.Bits.PageTableBaseAddress = ((Address -
> > > Map[Index].LinearAddress) >> 12) +
> > > Map[Index].Attribute.Bits.PageTableBaseAddress;
> > > +      AttributeInMap.Uint64  = (Map[Index].Attribute.Uint64 &
> > > mSupportedBit.Uint64);
> > > +      AttributeInMap.Uint64 &=
> > > (~IA32_MAP_ATTRIBUTE_PAGE_TABLE_BASE_ADDRESS_MASK);
> > > +      AttributeInMap.Uint64 |= (Address - Map[Index].LinearAddress +
> > > IA32_MAP_ATTRIBUTE_PAGE_TABLE_BASE_ADDRESS
> > > (&Map[Index].Attribute)) &
> > > IA32_MAP_ATTRIBUTE_PAGE_TABLE_BASE_ADDRESS_MASK;
> >
> > 1. "& IA32_MAP_ATTRIBUTE_PAGE_TABLE_BASE_ADDRESS_MASK" is not
> > needed.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101217): https://edk2.groups.io/g/devel/message/101217
Mute This Topic: https://groups.io/mt/97469491/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/leave/3943202/1813853/130120423/xyzzy [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list