> -----Original Message-----
> From: Tan, Dun <dun....@intel.com>
> Sent: Thursday, March 23, 2023 3:41 PM
> To: devel@edk2.groups.io
> Cc: Dong, Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Kumar,
> Rahul R <rahul.r.ku...@intel.com>; Gerd Hoffmann <kra...@redhat.com>;
> Liu, Zhiguang <zhiguang....@intel.com>
> Subject: [Patch V4 11/21] UefiCpuPkg/CpuPageTableLib:Modify RandomTest
> to check Mask/Attr
> 
> Modify RandomTest to check invalid input. When creating new page
> table or updating exsiting page table:
> 1.If set [LinearAddress, LinearAddress+Length] to non-preset, all
1. "non-present"

> +  //
> +  if (MapEntrys->Maps[MapsIndex].Length > 0) {
> +    for (Index = 0; Index < MapCount; Index++) {
> +      if ((PreviousAddress < Map[Index].LinearAddress) &&
> +          (MapEntrys->Maps[MapsIndex].LinearAddress <
> Map[Index].LinearAddress) && (RangeLimit > PreviousAddress))
> +      {
> +        //
> +        // MapEntrys->Maps[MapsIndex] contains not-present range in
> exsiting page table.
> +        //
> +        break;
> +      }
> +
> +      PreviousAddress = Map[Index].LinearAddress + Map[Index].Length;
> +    }
> +
> +    if (PreviousAddress < RangeLimit) {
2. can you use "if (Index < MapCount)"?



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#101679): https://edk2.groups.io/g/devel/message/101679
Mute This Topic: https://groups.io/mt/97796388/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: 
https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to