From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web10.7286.1587652092700773056 for ; Thu, 23 Apr 2020 07:28:12 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: ray.ni@intel.com) IronPort-SDR: AbGnSdcKkPoA8O7d0CtylkgA/nYfkNRqCl/IjonDZEPRL3WpXkeHauzhlY7p7SlurxG39Mxqo2 e3/rBcVTRd8A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2020 07:28:12 -0700 IronPort-SDR: O8vuUMD3QXgbL0eXZPceOe0K/BviRvEjGIM/L//h0g4L4a6ukV/Q+PZUpyqd/upKOyhKhCZbxK IYwV0ief4siw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,307,1583222400"; d="scan'208";a="274247559" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga002.jf.intel.com with ESMTP; 23 Apr 2020 07:28:11 -0700 Received: from fmsmsx111.amr.corp.intel.com (10.18.116.5) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Apr 2020 07:28:11 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by fmsmsx111.amr.corp.intel.com (10.18.116.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 23 Apr 2020 07:28:11 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.225]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.214]) with mapi id 14.03.0439.000; Thu, 23 Apr 2020 22:28:09 +0800 From: "Ni, Ray" To: "devel@edk2.groups.io" , "wasim.khan@nxp.com" CC: "ard.biesheuvel@linaro.org" , Varun Sethi , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciHostBridge: Update Mem and PMem Limit Checks Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/PciHostBridge: Update Mem and PMem Limit Checks Thread-Index: AQHWGVwbXTEaHgr5wUWbkKbOVktonKiGkeqg//+iAwCAAI474A== Date: Thu, 23 Apr 2020 14:28:08 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C50AEFD@SHSMSX104.ccr.corp.intel.com> References: <1587638612-13056-1-git-send-email-wasim.khan@nxp.com> <734D49CCEBEEF84792F5B80ED585239D5C50A98E@SHSMSX104.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Wasim Khan > Sent: Thursday, April 23, 2020 9:52 PM > To: Ni, Ray ; devel@edk2.groups.io > Cc: ard.biesheuvel@linaro.org; Varun Sethi ; Wu, Hao A <= hao.a.wu@intel.com> > Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/PciHostBridge: Update Mem = and PMem Limit Checks >=20 >=20 >=20 > > -----Original Message----- > > From: Ni, Ray > > Sent: Thursday, April 23, 2020 5:07 PM > > To: Wasim Khan ; devel@edk2.groups.io > > Cc: ard.biesheuvel@linaro.org; Varun Sethi ; Wu, Hao A > > > > Subject: RE: [PATCH] MdeModulePkg/PciHostBridge: Update Mem and PMem > > Limit Checks > > > > Thanks for fixing the check. > > > > PCI_ROOT_BRIDGE_APERTURE.Base/Limit are device address while the memory > > space in GCD belongs to host domain. > > So, host address for Mem/Pmem should be below 4GB while device address = can > > across 4GB. > > >=20 >=20 > Hi Ray, > Thank you for the review. > There are cases when we don't have PCIe host address below 4GB, and the P= CIe HOST Address space is only available above > 4GB. > For Example, Mem: 40000000 - FFFFFFFF Translation=3DFFFFFF6000000000 will= result in HOST Address =3D 0xA0FFFFFFFF . This is > a valid use case, but below check will report ASSERT for this HOST ADDRES= S. OK. Now I remember that "Mem" reports the 32bit memory space (device addres= s) and "MemAbove4GB" reports the 64bit memory space (device address). Then if "Mem" reports memory range that across 4GB, it means the range abov= e 4GB should be reported through "MemAbove4GB".