public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Ni, Ruiyu" <ruiyu.ni@intel.com>
To: "Ni, Ruiyu" <ruiyu.ni@intel.com>,
	"Dong, Eric" <eric.dong@intel.com>,
	Laszlo Ersek <lersek@redhat.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change Memory Type and address limitation.
Date: Mon, 13 Aug 2018 05:52:16 +0000	[thread overview]
Message-ID: <734D49CCEBEEF84792F5B80ED585239D5BDD0813@SHSMSX104.ccr.corp.intel.com> (raw)
In-Reply-To: <734D49CCEBEEF84792F5B80ED585239D5BDD0746@SHSMSX104.ccr.corp.intel.com>

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-bounces@lists.01.org> On Behalf Of Ni, Ruiyu
> Sent: Monday, August 13, 2018 1:39 PM
> To: Dong, Eric <eric.dong@intel.com>; Laszlo Ersek <lersek@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 <lersek@redhat.com>; edk2-devel@lists.01.org
> > Cc: Marvin Häuser <Marvin.Haeuser@outlook.com>; Fan Jeff
> > <vanjeff_919@hotmail.com>; Ni, Ruiyu <ruiyu.ni@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 (),
> > and I agree to Zero the memory before using it. So I think update the
> > original function is the best way now.
> >
> > Thanks,
> > Eric
> >
> > > -----Original Message-----
> > > From: Laszlo Ersek [mailto:lersek@redhat.com]
> > > Sent: Saturday, August 11, 2018 12:15 AM
> > > To: Dong, Eric <eric.dong@intel.com>; edk2-devel@lists.01.org
> > > Cc: Marvin Häuser <Marvin.Haeuser@outlook.com>; Fan Jeff
> > > <vanjeff_919@hotmail.com>; Ni, Ruiyu <ruiyu.ni@intel.com>
> > > Subject: Re: [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change Memory
> > > Type and address limitation.
> > >
> > > On 08/10/18 18:12, Laszlo Ersek wrote:
> > > > On 08/10/18 06:19, Eric Dong wrote:
> > > >> Because CpuS3Data memory will be copy to smram at
> SmmReadyToLock
> > > >> point, 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.
> > > >>
> > > >> Pass OS boot and resume from S3 test.
> > >
> > > [snip]
> > >
> > > > (2) In the previous patch, we lifted the 4GB limitation on the
> > > > stack address (while preserving the memory type restriction as
> AcpiNVS).
> > > > However, you continue to allocate the stack with
> > > > AllocateAcpiNvsMemoryBelow4G().
> > > >
> > > > I don't think that's consistent with the purpose of this patch
> > > > set, or with the documentation change in the previous patch. We
> > > > should allocate the stack as AcpiNVS without address limitation.
> > > >
> > > > And then we can remove the AllocateAcpiNvsMemoryBelow4G()
> > function
> > > > altogether.
> > >
> > > Nevermind, I'm just seeing the next patch.
> > >
> > > (You might want to add a hint about the next patch to the commit
> > > message of this patch -- "we'll handle the stack in the next
> > > patch".)
> > >
> > > So only my question (1) remains for this patch, i.e. why not use
> > > AllocateZeroPages().
> > >
> > > Thanks,
> > > Laszlo
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel

  reply	other threads:[~2018-08-13  5:52 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10  4:19 [Patch v3 0/5] Change CpuS3Data memory type and address limitation Eric Dong
2018-08-10  4:19 ` [Patch v3 1/5] UefiCpuPkg/PiSmmCpuDxeSmm: Use GDT/IDT saved in Smram Eric Dong
2018-08-10 15:40   ` Laszlo Ersek
2018-08-13  1:54     ` Dong, Eric
2018-08-14 12:51       ` Laszlo Ersek
2018-08-13  5:42     ` Ni, Ruiyu
2018-08-10  4:19 ` [Patch v3 2/5] UefiCpuPkg/AcpiCpuData.h: Remove AcpiNVS and Below 4G limitation Eric Dong
2018-08-10 15:58   ` Laszlo Ersek
2018-08-13  5:42   ` Ni, Ruiyu
2018-08-10  4:19 ` [Patch v3 3/5] UefiCpuPkg/CpuS3DataDxe: Change Memory Type and address limitation Eric Dong
2018-08-10 16:12   ` Laszlo Ersek
2018-08-10 16:15     ` Laszlo Ersek
2018-08-13  1:50       ` Dong, Eric
2018-08-13  5:38         ` Ni, Ruiyu
2018-08-13  5:52           ` Ni, Ruiyu [this message]
2018-08-14 12:49             ` Laszlo Ersek
2018-08-10  4:19 ` [Patch v3 4/5] UefiCpuPkg/CpuS3DataDxe: Remove below 4G limitation Eric Dong
2018-08-10 16:22   ` Laszlo Ersek
2018-08-13  5:41   ` Ni, Ruiyu
2018-08-10  4:19 ` [Patch v3 5/5] UefiCpuPkg/RegisterCpuFeaturesLib: Combine implementation Eric Dong
2018-08-10 16:34   ` Laszlo Ersek
2018-08-13  5:41   ` Ni, Ruiyu
2018-08-10 16:39 ` [Patch v3 0/5] Change CpuS3Data memory type and address limitation Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=734D49CCEBEEF84792F5B80ED585239D5BDD0813@SHSMSX104.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox