From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org 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 3231020945BBA for ; Wed, 4 Oct 2017 03:43:10 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1F63F267D5; Wed, 4 Oct 2017 10:46:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 1F63F267D5 Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=lersek@redhat.com Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-111.rdu2.redhat.com [10.10.120.111]) by smtp.corp.redhat.com (Postfix) with ESMTP id 700166017C; Wed, 4 Oct 2017 10:46:28 +0000 (UTC) To: Leo Duran References: <1507070305-6727-1-git-send-email-leo.duran@amd.com> <74D8A39837DF1E4DA445A8C0B3885C503A9CE1F2@shsmsx102.ccr.corp.intel.com> Cc: "Kinney, Michael D" , "Yao, Jiewen" , "edk2-devel@lists.01.org" From: Laszlo Ersek Message-ID: <2d3efa5a-ad72-bb35-1e6a-b9b78379337c@redhat.com> Date: Wed, 4 Oct 2017 12:46:27 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 04 Oct 2017 10:46:31 +0000 (UTC) Subject: Re: [PATCH v2 0/9] Enhanced SMM support to AMD-based x86 systems. 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, 04 Oct 2017 10:43:10 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 10/04/17 03:22, Kinney, Michael D wrote: > Leo, > > The general design issue here is that a PCD and PCD macro were > added to a UefiCpuPkg include file Include/Register/SmramSaveStateMap.h. > This means any library or module that includes this package include > file will break the build until the PCD is added to the INF file for > that library or module. > > The INF file for a module is supposed to express the PCDs that the > library or module sources access. We do not expect #include > statements from package include files to require adding additional > PCDs. > > Updating the code for these values to be detected or configurable > is a good idea. > > One option is to update the C code that currently uses the #define > names to use the PCD access function directly, instead of adding > the PcdGetxxx() to the Include/Register/SmramSaveStateMap.h file. > > Jiewen's idea to remove the PCD and detect the offset from CPUID > also looks like a reasonable approach. In addition to the above, I'd like to request a bit more "telling" subject lines for the patches. Using the OVMF patch as example, OvmfPkg: SmmCpuFeaturesLib library. is not really helpful; I'd consider the following an improvement: OvmfPkg/SmmCpuFeaturesLib: consume SMRAM Save State Map Offset PCD 66 characters -- we generally limit subjects to 74. (Of course I realize the patch might entirely be replaced in the next version, based on Jiewen's and Mike's feedback -- that's OK with me, I just wanted to give an example.) Thanks! Laszlo