From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) (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 EEF0C21B02B8C for ; Thu, 29 Jun 2017 12:12:34 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga105.fm.intel.com with ESMTP; 29 Jun 2017 12:14:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,282,1496127600"; d="scan'208";a="120492712" Received: from jljusten-skl.jf.intel.com (HELO localhost) ([10.54.75.25]) by fmsmga005.fm.intel.com with ESMTP; 29 Jun 2017 12:14:07 -0700 MIME-Version: 1.0 To: Laszlo Ersek Message-ID: <149876364614.17954.18085820933912290198@jljusten-skl.jf.intel.com> From: Jordan Justen In-Reply-To: Cc: Michael Kinney , edk2-devel-01 , Jiewen Yao , Jeff Fan References: <20170608171333.17937-1-lersek@redhat.com> <20170608171333.17937-2-lersek@redhat.com> <149789342556.32751.17592475673245441129@jljusten-skl> <384c7b21-dc46-25ba-c90e-75ae07ab5921@redhat.com> <149849999779.24605.15084992650352143991@jljusten-skl> <04147371-25a3-12d2-0cbd-6e07c816a880@redhat.com> <149851656823.26353.11207512663550762369@jljusten-skl> User-Agent: alot/0.5.1 Date: Thu, 29 Jun 2017 12:14:06 -0700 Subject: Re: [PATCH 1/5] OvmfPkg: introduce Q35TsegSizeLib (class header and sole lib instance) 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: Thu, 29 Jun 2017 19:12:35 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2017-06-26 16:04:41, Laszlo Ersek wrote: > On 06/27/17 00:36, Jordan Justen wrote: > > = > > Why can't SmramInternal.c read the size from the PCD directly? > = > If I remember correctly, I wanted to base SmramAccessGetCapabilities() > directly on hardware configuration. At that point (regardless of whether > the function would be called via PEI_SMM_ACCESS_PPI or > EFI_SMM_ACCESS2_PROTOCOL), the ESMRAMC.TSEG_SZ bits used as source for > the calculation would already be locked, by the SmmAccessPei entry point > function. I guess it does look slightly more appropriate to read to reg, even if the end result will always match the PCD. The 'internal' file is used by PEI as well, so if you want to add a function or variable in the 'internal' give the mask, it sounds good. -Jordan