From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 047048036E for ; Wed, 8 Mar 2017 10:58:55 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Mar 2017 10:58:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,265,1486454400"; d="scan'208";a="1139666074" Received: from dhillons-mobl1.amr.corp.intel.com (HELO localhost) ([10.254.182.128]) by fmsmga002.fm.intel.com with ESMTP; 08 Mar 2017 10:58:54 -0800 MIME-Version: 1.0 To: "Gao, Liming" , "Kinney, Michael D" , "edk2-devel@lists.01.org" , Brijesh Singh , Laszlo Ersek Message-ID: <148899953450.16179.11727988878279840569@jljusten-skl> From: Jordan Justen In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14D6ECFA9@shsmsx102.ccr.corp.intel.com> Cc: "Thomas.Lendacky@amd.com" , "leo.duran@amd.com" , "brijesh.sing@amd.com" References: <148884284887.29188.7643544710695103939.stgit@brijesh-build-machine> <148884287496.29188.5155874233993236979.stgit@brijesh-build-machine> <2c6593dd-12f5-9277-0c36-ffd2d6c2cc55@redhat.com> <148891718851.27104.2018366977522352345@jljusten-skl> <4A89E2EF3DFEDB4C8BFDE51014F606A14D6ECFA9@shsmsx102.ccr.corp.intel.com> User-Agent: alot/0.5.1 Date: Wed, 08 Mar 2017 10:58:54 -0800 Subject: Re: [RFC PATCH v1 4/5] OvmfPkg/BaseIoLibIntrinsic: import BaseIoLibIntrinsic package X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Mar 2017 18:58:56 -0000 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On 2017-03-08 07:41:58, Gao, Liming wrote: > = > >-----Original Message----- > >From: Justen, Jordan L > = > >One other thought is, should we consider a DxeSmm alternative .inf for > >BaseIoLibIntrinsic.inf? In that case we could use a global variable to > >help out. Maybe this could prevent the concern that might drive a new > >PCD to be added? > > > >-Jordan > Current patch has stored the check state into data section. In PEI > phase, the data section can't be written. So, every call will check > CpuId. In DXE and SMM phase, the data section can be written. The > first call will cache the check state. So, no DxeSmm INF is > required. > = I don't think we can attempt to write a variable to memory in generic SEC/PEI code. Some flash memory treat memory writes as an I/O for programming purposes. I think we added PcdGuidedExtractHandlerTableAddress for this reason. This is why I suggested that maybe we could add a DXE/SMM .inf where we could assume writeable global variables exit. -Jordan