From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.100; helo=mga07.intel.com; envelope-from=jiewen.yao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2F3DA221F93AB for ; Tue, 16 Jan 2018 17:04:37 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2018 17:09:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,369,1511856000"; d="scan'208";a="10796233" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga007.fm.intel.com with ESMTP; 16 Jan 2018 17:09:56 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 16 Jan 2018 17:09:56 -0800 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.189]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Wed, 17 Jan 2018 09:09:54 +0800 From: "Yao, Jiewen" To: "Zeng, Star" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] IntelSiliconPkg IntelVTdPmrPei: Use HostAddressWidth in DMAR correctly Thread-Index: AQHTjrgdqSFBkQZTbkaAAXekVJZxcKN3Qkfw Date: Wed, 17 Jan 2018 01:09:54 +0000 Message-ID: <74D8A39837DF1E4DA445A8C0B3885C503AA7FA18@shsmsx102.ccr.corp.intel.com> References: <1516099931-17796-1-git-send-email-star.zeng@intel.com> In-Reply-To: <1516099931-17796-1-git-send-email-star.zeng@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiN2U3MTllZGMtYjU1NS00ZGZjLWFhZDAtZjJiNmExZjk1OTRmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiIwWTk5WEFIZFNqekJjSm13bjQwYlVFU0t3UFU0U3ZDQTBPVDQyWDU4SG15QXMzRTVBdVoxWUpVVHNXSWUxOUdMIn0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] IntelSiliconPkg IntelVTdPmrPei: Use HostAddressWidth in DMAR correctly X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Jan 2018 01:04:37 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Jiewen.yao@intel.com > -----Original Message----- > From: Zeng, Star > Sent: Tuesday, January 16, 2018 6:52 PM > To: edk2-devel@lists.01.org > Cc: Zeng, Star ; Yao, Jiewen > Subject: [PATCH] IntelSiliconPkg IntelVTdPmrPei: Use HostAddressWidth in > DMAR correctly >=20 > According to VTd spec, HostAddressWidth + 1 should be used as the real > host address width value. >=20 > Host Address Width: > This field indicates the maximum DMA physical > addressability supported by this platform. The > system address map reported by the BIOS > indicates what portions of this addresses are > populated. > The Host Address Width (HAW) of the platform is > computed as (N+1), where N is the value > reported in this field. For example, for a platform > supporting 40 bits of physical addressability, the > value of 100111b is reported in this field. >=20 > Cc: Jiewen Yao > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Star Zeng > --- > IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c > b/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c > index 7147a19f538a..aae482a0385b 100644 > --- a/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c > +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.c > @@ -677,7 +677,7 @@ InitVTdPmrForAll ( > LowBottom =3D 0; > LowTop =3D 0; > HighBottom =3D 0; > - HighTop =3D LShiftU64 (1, VTdInfo->HostAddressWidth); > + HighTop =3D LShiftU64 (1, VTdInfo->HostAddressWidth + 1); >=20 > Status =3D SetDmaProtectedRange ( > VTdInfo, > -- > 2.7.0.windows.1