From nobody Mon Sep 16 19:48:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+101736+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101736+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1679637656; cv=none; d=zohomail.com; s=zohoarc; b=eT8u4Pz6+hyYRZf7KG9D4Q3eAbbk8aw7IS9eiWMYjvXAv2OGW0qJfJ3ywcLIN2e2mPfPJ5Lu+X126yX2t8EeFZsbIqkWwWfLAjbEec5q8sRViMH0axO8Mr04gdb/aEso6aeFtjyCDsBYYJ5+uwbPq1nQx2GOI0IxBPYbCrQZurE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1679637656; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=/abYtwJhMXZvNq2MTnsE86xyxBrXpdpwB8itOm5zA0c=; b=Ao9+cdQcp1ewd2QAgzSF7uZuOHQUmiz5FC5KautQSoa/tLidicRrzVfPHtgaOrwh+Wbsks0S/4/8m38uybvycXCVtx0ConvaSZaAt5ICeZiB4zjlei88MbPoijUYYrl9SCbAcQ84QU1xIAmYtzqNs5nQc9i9w0ftWeZgHiKr+Fo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+101736+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1679637656616409.8001834190784; Thu, 23 Mar 2023 23:00:56 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id MgI8YY1788612xjKO5EkTYFv; Thu, 23 Mar 2023 23:00:56 -0700 X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web11.94534.1679637641374533517 for ; Thu, 23 Mar 2023 23:00:55 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="320093950" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="320093950" X-Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 23:00:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10658"; a="1012122101" X-IronPort-AV: E=Sophos;i="5.98,286,1673942400"; d="scan'208";a="1012122101" X-Received: from shwdeopenlab702.ccr.corp.intel.com ([10.239.55.92]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2023 23:00:54 -0700 From: "duntan" To: devel@edk2.groups.io Cc: Eric Dong , Ray Ni , Rahul Kumar , Gerd Hoffmann Subject: [edk2-devel] [Patch V5 11/22] UefiCpuPkg/CpuPageTableLib: Add LastMapEntry pointer Date: Fri, 24 Mar 2023 14:00:09 +0800 Message-Id: <20230324060020.940-12-dun.tan@intel.com> In-Reply-To: <20230324060020.940-1-dun.tan@intel.com> References: <20230324060020.940-1-dun.tan@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,dun.tan@intel.com X-Gm-Message-State: c5UBu0N2O7o9QzxVcP1Vhxyjx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1679637656; bh=rKUSWMEWn8UI93N9ywYTk1sXyW8ysL8nwhSzVZ5fb0Q=; h=Cc:Date:From:Reply-To:Subject:To; b=qT/EdHSgfaHiVw4uP+GJpvy42roTIeb4IjTtVhc9Qz6e4omy1G/DYntaNzFQBXJSNy0 5juQHM8cbYV1HVmcOcnba61YxkVT2zWRvGJWKpebhzV60is+iNjdJH9VyNHBWMsTpk0z9 ZiKe8EXj7BO1Body7LDQeeKC3ASLLEfuys4= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1679637657347100022 Content-Type: text/plain; charset="utf-8" Add LastMapEntry pointer to replace MapEntrys->Maps[MapsIndex] in SingleMapEntryTest () of RandomTest. Signed-off-by: Dun Tan Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Reviewed-by: Ray Ni --- UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c | 18 ++++++++++--= ------ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c b/Uef= iCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c index 52eb9daa10..612fddcee0 100644 --- a/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c +++ b/UefiCpuPkg/Library/CpuPageTableLib/UnitTest/RandomTest.c @@ -621,10 +621,12 @@ SingleMapEntryTest ( UINTN Level; UINT64 Value; UNIT_TEST_STATUS TestStatus; + MAP_ENTRY *LastMapEntry; =20 MapsIndex =3D MapEntrys->Count; =20 GenerateSingleRandomMapEntry (MaxAddress, MapEntrys); + LastMapEntry =3D &MapEntrys->Maps[MapsIndex]; =20 PageTableBufferSize =3D 0; Status =3D PageTableMap ( @@ -632,10 +634,10 @@ SingleMapEntryTest ( PagingMode, NULL, &PageTableBufferSize, - MapEntrys->Maps[MapsIndex].LinearAddress, - MapEntrys->Maps[MapsIndex].Length, - &MapEntrys->Maps[MapsIndex].Attribute, - &MapEntrys->Maps[MapsIndex].Mask + LastMapEntry->LinearAddress, + LastMapEntry->Length, + &LastMapEntry->Attribute, + &LastMapEntry->Mask ); if (PageTableBufferSize !=3D 0) { UT_ASSERT_EQUAL (Status, RETURN_BUFFER_TOO_SMALL); @@ -651,10 +653,10 @@ SingleMapEntryTest ( PagingMode, Buffer, &PageTableBufferSize, - MapEntrys->Maps[MapsIndex].LinearAddress, - MapEntrys->Maps[MapsIndex].Length, - &MapEntrys->Maps[MapsIndex].Attribute, - &MapEntrys->Maps[MapsIndex].Mask + LastMapEntry->LinearAddress, + LastMapEntry->Length, + &LastMapEntry->Attribute, + &LastMapEntry->Mask ); } =20 --=20 2.31.1.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101736): https://edk2.groups.io/g/devel/message/101736 Mute This Topic: https://groups.io/mt/97818233/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-