From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (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 9EE1920958965 for ; Wed, 5 Jul 2017 11:01:44 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B5F80A4F9C; Wed, 5 Jul 2017 18:03:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com B5F80A4F9C Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=lersek@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com B5F80A4F9C Received: from lacos-laptop-7.usersys.redhat.com (ovpn-116-25.phx2.redhat.com [10.3.116.25]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA2785D721; Wed, 5 Jul 2017 18:03:22 +0000 (UTC) To: Jordan Justen , edk2-devel-01 References: <20170704165629.13610-1-lersek@redhat.com> <149927587550.638.9288616709761107179@jljusten-skl> From: Laszlo Ersek Message-ID: <574761bf-ec47-b34c-9212-28e671065b66@redhat.com> Date: Wed, 5 Jul 2017 20:03:21 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <149927587550.638.9288616709761107179@jljusten-skl> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 05 Jul 2017 18:03:23 +0000 (UTC) Subject: Re: [PATCH v2 0/8] OvmfPkg: recognize an extended TSEG when QEMU offers it X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Jul 2017 18:01:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 07/05/17 19:31, Jordan Justen wrote: > On 2017-07-04 09:56:21, Laszlo Ersek wrote: >> This is version 2 of the series posted previously at >> . >> >> Version 2 is a rewrite from scratch based on Jordan's feedback for v1 >> and the subsequent discussion. >> >> Repo: https://github.com/lersek/edk2.git >> Branch: extended_tseg_bz1447027_v2 >> >> Cc: Jordan Justen >> >> Thanks >> Laszlo >> >> Laszlo Ersek (8): >> OvmfPkg: widen PcdQ35TsegMbytes to UINT16 >> OvmfPkg/PlatformPei: prepare for PcdQ35TsegMbytes becoming dynamic >> OvmfPkg/SmmAccess: prepare for PcdQ35TsegMbytes becoming dynamic > > Maybe InitQ35TsegMbytes instead of FetchQ35TsegMbytes. OK, I'll do this rename before I push. > I also thought > a GetQ35TsegMbytes function could just return the value rather than > adding an externally visible global. Not a big deal. > >> OvmfPkg: make PcdQ35TsegMbytes dynamic >> OvmfPkg/IndustryStandard/Q35MchIch9.h: add extended TSEG size macros >> OvmfPkg/SmmAccess: support extended TSEG size > > Some indentation issues in SmramInternal.c. Do you mean this hunk: > diff --git a/OvmfPkg/SmmAccess/SmramInternal.c b/OvmfPkg/SmmAccess/SmramInternal.c > index ae1e9069aca6..fa0efeda72b0 100644 > --- a/OvmfPkg/SmmAccess/SmramInternal.c > +++ b/OvmfPkg/SmmAccess/SmramInternal.c > @@ -196,9 +196,11 @@ SmramAccessGetCapabilities ( > SmramMap[DescIdxSmmS3ResumeState].PhysicalSize; > SmramMap[DescIdxMain].CpuStart = SmramMap[DescIdxMain].PhysicalStart; > SmramMap[DescIdxMain].PhysicalSize = > - (TsegSizeBits == MCH_ESMRAMC_TSEG_8MB ? SIZE_8MB : > - TsegSizeBits == MCH_ESMRAMC_TSEG_2MB ? SIZE_2MB : > - SIZE_1MB) - SmramMap[DescIdxSmmS3ResumeState].PhysicalSize; > + (TsegSizeBits == MCH_ESMRAMC_TSEG_8MB ? SIZE_8MB : > + TsegSizeBits == MCH_ESMRAMC_TSEG_2MB ? SIZE_2MB : > + TsegSizeBits == MCH_ESMRAMC_TSEG_1MB ? SIZE_1MB : > + mQ35TsegMbytes * SIZE_1MB) - > + SmramMap[DescIdxSmmS3ResumeState].PhysicalSize; I'll align the added code with the removed code before I push. > >> OvmfPkg/PlatformPei: honor extended TSEG in PcdQ35TsegMbytes if >> available >> OvmfPkg: mention the extended TSEG near the PcdQ35TsegMbytes >> declaration > > Series Reviewed-by: Jordan Justen Thanks! Laszlo > >> >> OvmfPkg/Include/IndustryStandard/Q35MchIch9.h | 4 ++ >> OvmfPkg/OvmfPkg.dec | 15 +++-- >> OvmfPkg/OvmfPkgIa32.dsc | 1 + >> OvmfPkg/OvmfPkgIa32X64.dsc | 1 + >> OvmfPkg/OvmfPkgX64.dsc | 1 + >> OvmfPkg/PlatformPei/MemDetect.c | 67 +++++++++++++++++++- >> OvmfPkg/PlatformPei/Platform.c | 14 ++-- >> OvmfPkg/PlatformPei/Platform.h | 7 ++ >> OvmfPkg/SmmAccess/SmmAccess2Dxe.c | 1 + >> OvmfPkg/SmmAccess/SmmAccess2Dxe.inf | 3 + >> OvmfPkg/SmmAccess/SmmAccessPei.c | 10 +-- >> OvmfPkg/SmmAccess/SmmAccessPei.inf | 4 +- >> OvmfPkg/SmmAccess/SmramInternal.c | 25 +++++++- >> OvmfPkg/SmmAccess/SmramInternal.h | 13 ++++ >> 14 files changed, 142 insertions(+), 24 deletions(-) >> >> -- >> 2.13.1.3.g8be5a757fa67 >>