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 <edk2-devel-boun...@lists.01.org> On Behalf Of Ni, Ruiyu >> Sent: Monday, August 13, 2018 1:39 PM >> To: Dong, Eric <eric.d...@intel.com>; Laszlo Ersek <ler...@redhat.com>; >> 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 <ler...@redhat.com>; edk2-devel@lists.01.org >>> Cc: Marvin Häuser <marvin.haeu...@outlook.com>; Fan Jeff >>> <vanjeff_...@hotmail.com>; Ni, Ruiyu <ruiyu...@intel.com> >>> 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 <ler...@redhat.com> because both of my earlier questions for this patch have been explained. Thanks Laszlo _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel