From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=66.187.233.73; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) (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 00927210E2A5C for ; Wed, 8 Aug 2018 14:28:37 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 305AF402332F; Wed, 8 Aug 2018 21:28:37 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-208.rdu2.redhat.com [10.10.120.208]) by smtp.corp.redhat.com (Postfix) with ESMTP id A1BD32026DE8; Wed, 8 Aug 2018 21:28:36 +0000 (UTC) To: Eric Dong , edk2-devel@lists.01.org Cc: Ruiyu Ni References: <20180808074006.21360-1-eric.dong@intel.com> From: Laszlo Ersek Message-ID: <12da7e20-6f8e-0e3b-f026-42041e6b2415@redhat.com> Date: Wed, 8 Aug 2018 23:28:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180808074006.21360-1-eric.dong@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 08 Aug 2018 21:28:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Wed, 08 Aug 2018 21:28:37 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [Patch v2 1/2] UefiCpuPkg/RegisterCpuFeaturesLib: Combine implementation. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Aug 2018 21:28:38 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit On 08/08/18 09:40, Eric Dong wrote: > V1 changes: >> Current code logic can't confirm CpuS3DataDxe driver start before >> CpuFeaturesDxe driver. So the assumption in CpuFeaturesDxe not valid. >> Add implementation for AllocateAcpiCpuData function to remove this >> assumption. > > V2 changes: >> Because CpuS3Data memory will be copy to smram at SmmReadToLock point, >> so the memory type no need to be ACPI NVS type, also the address not >> limit to below 4G. >> This change remove the limit of ACPI NVS memory type and below 4G. I'm returning to this patch (v2 1/2) after my other comments (for v2 2/2). It seems that allocating ACPI_CPU_DATA in BootServicesData type memory breaks at least the docs / specs in "UefiCpuPkg/Include/AcpiCpuData.h", even if we do the BootServicesData allocation in RegisterCpuFeaturesLib instances (i.e. in CpuFeaturesPei / CpuFeaturesDxe), and not in CpuS3DataDxe. With that in mind, should we return to your v1 patch, "UefiCpuPkg/RegisterCpuFeaturesLib: Implement AllocateAcpiCpuData function"? And, looking back at my question (4) there, where I suggested AllocatePeiAccessiblePages() -- I'm now thinking that it does not apply, because the ACPI_CPU_DATA spec in "UefiCpuPkg/Include/AcpiCpuData.h" requires the 4GB limit. So, currently I think that your v1 patch is best, just add the Reported-by and Suggested-by tags, plus the TianoCore BZ reference. Sorry that I've taken so long to grasp the implications. (Anyway we're now in the quiet period.) Thanks, Laszlo