From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mx.groups.io with SMTP id smtpd.web09.7645.1636001968123006682 for ; Wed, 03 Nov 2021 21:59:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=xx5+cE8I; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: ray.ni@intel.com) X-IronPort-AV: E=McAfee;i="6200,9189,10157"; a="231595273" X-IronPort-AV: E=Sophos;i="5.87,207,1631602800"; d="scan'208";a="231595273" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Nov 2021 21:59:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,207,1631602800"; d="scan'208";a="729905998" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga005.fm.intel.com with ESMTP; 03 Nov 2021 21:59:26 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Wed, 3 Nov 2021 21:59:26 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Wed, 3 Nov 2021 21:59:26 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.173) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Wed, 3 Nov 2021 21:59:25 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dEq+KxbZN/1lMJ5Om3KM0xFPdSAebTU2qjusTS9DmE2QVWDdGpZyttF5y6N5YwWTDUCcljPvTN8bXPGFe7/mKBMPFuxlLvpfz/5lsik83IqSeC4kmbohRmzmJ3pFEG1SfeWPQDbrcPXRHC1ixl1WO9ZpO0I4UPlZ478lrtq7YWB6iU7Labs+XHQNw7hkwBohh7JIiCgtRnTxCi1kSxcFY9mpeVRTzwzGUHMKIT+m+I2ZkxkHWvv82NCZBty+rjubNrPC15U69AD2KXkDRTSiUdQk7hdmQ/WYQrrQgld27LU5IB/TlluIPd7tEvYNNkv35DO8m3/ihggGdZJC5ErvAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JL9HRj+fW0h51S8xpLlp6dfLErXcnpYpZgxR2+ppYag=; b=ZTxFVAF+OxYWrnYV2DtKkZRrGWUb6pGuD48OtsciXjmS4SqE/veiA3nt8Jkcqnwv6clmeo0NW/0S9JS5fcsbQ6RPOLyyEfFHEuzYJipJCTOasuVUGt7rCOR6gsC4qPaqqDUe85+RVJESMDqLZhS304t544TuK6Cec63dietK25Kl04N7jZss6zw8LfIX5Fvl5bCMZaJ9ICoKjyu1OCxRg140fLI43TPL94Sf8R+Hrg2vu+7uj9/dXyFpx4jo5jOJbCRfSm+KYXUuzZrUIsbpm4/3z0dYmtVSJIGD7LgRfgFvI/NOmEPoiyOgZh1oT3QbTvoTBsImIQHu5PtY7fzXjw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JL9HRj+fW0h51S8xpLlp6dfLErXcnpYpZgxR2+ppYag=; b=xx5+cE8I5flouY5Q6XGyCS0s89PyMF7Tqi8x/Lxj/yPrjDATQE6dc0vsbu12vNLMirKoH3x+sVFsQq8jaVAzhkvxbcT3IsUvyzv83817rjNKxdkEumou3awdcge0L1XDC0XzubTjwp8IxHrphmZeqp5vdl+TbkncUS1YwXPMb7w= Received: from BN0PR11MB5696.namprd11.prod.outlook.com (2603:10b6:408:14b::11) by BN6PR11MB0001.namprd11.prod.outlook.com (2603:10b6:405:69::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.18; Thu, 4 Nov 2021 04:59:25 +0000 Received: from BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778]) by BN0PR11MB5696.namprd11.prod.outlook.com ([fe80::317e:de35:e920:7778%3]) with mapi id 15.20.4669.011; Thu, 4 Nov 2021 04:59:24 +0000 From: "Ni, Ray" To: "Kinney, Michael D" , "devel@edk2.groups.io" CC: "Dong, Eric" , "Kumar, Rahul1" , Philippe Mathieu-Daude Subject: Re: [Patch V2 5/7] UefiCpuPkg/MtrrLib/UnitTest: Fix 32-bit GCC build issues Thread-Topic: [Patch V2 5/7] UefiCpuPkg/MtrrLib/UnitTest: Fix 32-bit GCC build issues Thread-Index: AQHX0QagmOBgLpugaE+jA2ATEa47IqvyzxUQ Date: Thu, 4 Nov 2021 04:59:24 +0000 Message-ID: References: <20211103225954.1680-1-michael.d.kinney@intel.com> <20211103225954.1680-6-michael.d.kinney@intel.com> In-Reply-To: <20211103225954.1680-6-michael.d.kinney@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0cf60155-ae37-40d5-50a2-08d99f4fdf71 x-ms-traffictypediagnostic: BN6PR11MB0001: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: R0qpsIbXNmfTJNtf1//n0hJzA1BaMBXZXKosZ5OWO1ALKVvNeKygyfeVHquC0fNyWc/fwI+2xhyaodDsX0GNM22mnnraw3O6d2Ypo1kHRjCdWhNkElwimwb0ypN7oD9qyAkNl9QBx6MB4+ks6EdKdYfDmLl/9PQNxzS15d1jLR3LbAhJ8JjuxJiHRgQl9vCqJ8s6h3GWj2/muxO9yaNAqC/uMlmGcNVJX348eCabamD41/LpeKsHGf12gXAj9pPzEfbBzetUK8NjUGQHaFe7sjEdgi2OhC1WTSxfFpPzeJzr3Gy1tCaNFJy5KZL9QbXxIIEGgt6kssh9XSH6jzGOtx5kalF9wAuMdx/pUvm6dPl3A53x9enTRl8XoORsIwkaPWYk07bOsNjqX7NcwYrq+b6qAerJDifnxxuDXn2t9sEdjmoqlx+utL2Gr8mDPFs+JoKub+HxME22YbwavHA3N+rh3I315Yc6tGtnEmfDDBdJw1LFIFcpR9x43ZXF44BeB6u3QLMSppgzCBOagkUw20H8pHo25IizraV2pS3TYbp26Sr03kgfS9bcI1dB/t804SBmyz8wKTyGJXPGG0Vt+iq//gYjnTuWFxyq0uVRXsA3QezUsmBNi0ovsVAOhn0shFNXEmr3YD/N/YWfpZ38oI/3YbwibklWZ4w/um0y8mxm6GLthjCJ+gKaE0lxSedEjCw5keILwVvpocrUMNSx/g== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN0PR11MB5696.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(71200400001)(76116006)(186003)(66476007)(55016002)(54906003)(66946007)(26005)(64756008)(2906002)(316002)(110136005)(66446008)(508600001)(8676002)(9686003)(82960400001)(122000001)(38100700002)(66556008)(83380400001)(52536014)(53546011)(6506007)(8936002)(7696005)(4326008)(33656002)(86362001)(5660300002)(38070700005);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?qAw9LKS5/cD8kzcZu5Mdc2K9jkPg9l6ePGRNV3En05xxhwCylhdo9cnjzxQ/?= =?us-ascii?Q?owQq1hgd9vqj03jXpi+feDw/qq6ceES7GiEMRzsK4LktXkk0YOXaft6l2JNI?= =?us-ascii?Q?02tHE+0OOJD/JXkbnx7s07TjUSP/qIWqX2NNbk7N+oqzO5shxeZsqdnyV7BW?= =?us-ascii?Q?1JdeL+fqP43gWYTYKrylb2i/gkMKb2YVhBkr7LZY3c1yL+7IvNP5YR0A7Yo4?= =?us-ascii?Q?ce+/CrXA6airq54D01N7ipvNX2t0mCd1DmmgIc1dwO8PfT5P1/49SbbKSYF8?= =?us-ascii?Q?2ujDZpKf6Iui5GpOdtClZuWLfnJoeJGv2tf0igf2aXmlLbGfqUOpO3rbzMgH?= =?us-ascii?Q?4x0SY7tO9O1IksY6G+gMSSdy4gz1XgAijaB0t+rpf+RCfw+bIpjIOeosv+3b?= =?us-ascii?Q?mVWcldwxfB3ygV5Kaz1zUoznCQ8SvmPkfvzXZDS9/iKt7oTMvJ+sikov8Yr0?= =?us-ascii?Q?YCk96+C4Dsoo8xWtKYxnmmoiiZmp7NycMdQCwwlJEChJIB2YGa1wtCM4A/7Y?= =?us-ascii?Q?b8vQYU/CPWS1iZUA6ycbWEgk1WREVHJcDpRnJ8SyrYwxCna2Cb+e+jzpD8ar?= =?us-ascii?Q?VOihG7dYB7gUkXBQH599mgXJb20m36ILVPaon8ZnakGDD2k9WApjf5Yf4zEW?= =?us-ascii?Q?qJWteedtLKLxxAoU2HQ50i3awbnAYKVIHJ+tMWMLjQsndfGACZAARhz1Q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JZxSZp9zJQXW21EX95b3vTKqSw8MOG9SM31S32X1x?= =?us-ascii?Q?viIWB325hsC/+4yJXNVvnMU=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN0PR11MB5696.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0cf60155-ae37-40d5-50a2-08d99f4fdf71 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Nov 2021 04:59:24.8787 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: TU5NPjSvxkDUXyJ+xwJdi4vRf7+5m0mU8vDiMvl84gkCahSp5qBBs9AL5AieCQWIPNUwy+rnh0RwXynEh/XsZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB0001 Return-Path: ray.ni@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Ray Ni -----Original Message----- From: Kinney, Michael D =20 Sent: Thursday, November 4, 2021 7:00 AM To: devel@edk2.groups.io Cc: Dong, Eric ; Ni, Ray ; Kumar, Ra= hul1 ; Philippe Mathieu-Daude Subject: [Patch V2 5/7] UefiCpuPkg/MtrrLib/UnitTest: Fix 32-bit GCC build i= ssues When using UT_ASSERT_EQUAL() on a pointer value, it must be cast to UINTN. = This follows the samples provided with the UnitTestFrameworkPkg. Cc: Eric Dong Cc: Ray Ni Cc: Rahul Kumar Signed-off-by: Michael D Kinney Reviewed-by: Philippe Mathieu-Daude --- UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c b/UefiCp= uPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c index 30ee1dc32522..e84b9390601d 100644 --- a/UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c +++ b/UefiCpuPkg/Library/MtrrLib/UnitTest/MtrrLibUnitTest.c @@ -599,7 +599,7 @@ UnitTestMtrrGetFixedMtrr ( } =20 Result =3D MtrrGetFixedMtrr (&FixedSettings); - UT_ASSERT_EQUAL (Result, &FixedSettings); + UT_ASSERT_EQUAL ((UINTN)Result, (UINTN)&FixedSettings); UT_ASSERT_MEM_EQUAL (&FixedSettings, &ExpectedFixedSettings, sizeof (F= ixedSettings)); } =20 @@ -612,7 +612,7 @@ UnitTestMtrrGetFixedMtrr ( ZeroMem (&FixedSettings, sizeof (FixedSettings)); ZeroMem (&ExpectedFixedSettings, sizeof (ExpectedFixedSettings)); Result =3D MtrrGetFixedMtrr (&FixedSettings); - UT_ASSERT_EQUAL (Result, &FixedSettings); + UT_ASSERT_EQUAL ((UINTN)Result, (UINTN)&FixedSettings); UT_ASSERT_MEM_EQUAL (&ExpectedFixedSettings, &FixedSettings, sizeof (Exp= ectedFixedSettings)); =20 return UNIT_TEST_PASSED; @@ -653,7 +653,7 @@ UnitTestMtrrGetAllMtrrs ( AsmWriteMsr64 (MSR_IA32_MTRR_PHYSMASK0 + (Index << 1), VariableMtrr[In= dex].Mask); } Result =3D MtrrGetAllMtrrs (&Mtrrs); - UT_ASSERT_EQUAL (Result, &Mtrrs); + UT_ASSERT_EQUAL ((UINTN)Result, (UINTN)&Mtrrs); UT_ASSERT_MEM_EQUAL (Mtrrs.Variables.Mtrr, VariableMtrr, sizeof (MTRR_VA= RIABLE_SETTING) * SystemParameter.VariableMtrrCount); =20 // @@ -665,7 +665,7 @@ UnitTestMtrrGetAllMtrrs ( SystemParameter.MtrrSupported =3D FALSE; InitializeMtrrRegs (&SystemParameter); Result =3D MtrrGetAllMtrrs (&Mtrrs); - UT_ASSERT_EQUAL (Result, &Mtrrs); + UT_ASSERT_EQUAL ((UINTN)Result, (UINTN)&Mtrrs); UT_ASSERT_MEM_EQUAL (&ExpectedMtrrs, &Mtrrs, sizeof (ExpectedMtrrs)); =20 // @@ -718,7 +718,7 @@ UnitTestMtrrSetAllMtrrs ( GenerateRandomMtrrPair (SystemParameter.PhysicalAddressBits, GenerateR= andomCacheType (), &Mtrrs.Variables.Mtrr[Index], NULL); } Result =3D MtrrSetAllMtrrs (&Mtrrs); - UT_ASSERT_EQUAL (Result, &Mtrrs); + UT_ASSERT_EQUAL ((UINTN)Result, (UINTN)&Mtrrs); =20 UT_ASSERT_EQUAL (AsmReadMsr64 (MSR_IA32_MTRR_DEF_TYPE), Mtrrs.MtrrDefTyp= e); for (Index =3D 0; Index < SystemParameter.VariableMtrrCount; Index++) { -- 2.32.0.windows.1