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 A1F68210EFB18 for ; Tue, 14 Aug 2018 05:49:31 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4924A4023337; Tue, 14 Aug 2018 12:49:30 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-27.rdu2.redhat.com [10.10.120.27]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9567D2166BA0; Tue, 14 Aug 2018 12:49:29 +0000 (UTC) To: "Ni, Ruiyu" , "Dong, Eric" References: <20180810041909.12776-1-eric.dong@intel.com> <20180810041909.12776-4-eric.dong@intel.com> <734D49CCEBEEF84792F5B80ED585239D5BDD0746@SHSMSX104.ccr.corp.intel.com> <734D49CCEBEEF84792F5B80ED585239D5BDD0813@SHSMSX104.ccr.corp.intel.com> Cc: "edk2-devel@lists.01.org" From: Laszlo Ersek Message-ID: Date: Tue, 14 Aug 2018 14:49:23 +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: <734D49CCEBEEF84792F5B80ED585239D5BDD0813@SHSMSX104.ccr.corp.intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 14 Aug 2018 12:49:30 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Tue, 14 Aug 2018 12:49:30 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' Subject: Re: [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change Memory Type and address limitation. 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: Tue, 14 Aug 2018 12:49:31 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit On 08/13/18 07:52, Ni, Ruiyu wrote: > Ignore my previous mail. > > You could use AllocatePages() instead of directly calling gBS->AllocatePages(). > Then rename the AllocateBootServiceMemory() to AllocateZeroPages() to better > reflect the function behavior. > > Thanks/Ray > >> -----Original Message----- >> From: edk2-devel On Behalf Of Ni, Ruiyu >> Sent: Monday, August 13, 2018 1:39 PM >> To: Dong, Eric ; Laszlo Ersek ; >> edk2-devel@lists.01.org >> Subject: Re: [edk2] [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change >> Memory Type and address limitation. >> >> Eric, >> I think you could change: >> AcpiCpuDataEx = AllocateBootServiceMemory (sizeof >> (ACPI_CPU_DATA_EX)); >> -> >> AcpiCpuDataEx = AllocatePages (EFI_SIZE_TO_PAGES (sizeof >> (ACPI_CPU_DATA_EX))); >> >> So the AllocateBootServiceMemory() is not needed. >> >> Thanks/Ray >> >>> -----Original Message----- >>> From: Dong, Eric >>> Sent: Monday, August 13, 2018 9:51 AM >>> To: Laszlo Ersek ; edk2-devel@lists.01.org >>> Cc: Marvin Häuser ; Fan Jeff >>> ; Ni, Ruiyu >>> Subject: RE: [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change Memory >>> Type and address limitation. >>> >>> Hi Laszlo, >>> >>> I checked the code base and don't find the API AllocateZeroPages (), Sorry, I was misled by AllocateZeroPages() in [IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c]. >>> and I agree to Zero the memory before using it. So I think update the >>> original function is the best way now. If you wouldn't like to do what Ray suggests, or you would like to do it later / separately: Reviewed-by: Laszlo Ersek because both of my earlier questions for this patch have been explained. Thanks Laszlo