I am not sure how you did it for Ovmf.
In general, we use below way for real platform, for your information only.

1) In code boot, a DXE phase platform driver allocates OS-Reserved Memory type 
(EfiReservedType, or EfiAcpiNvs) for S3 PeiCore usage during code boot, and 
save address and length.
2) In S3 boot, MemoryInit module, it looks for this information, and install 
pei memory by using the saved information.
Then we can make sure all memory touched in S3 phase be reserved.

And AllocatePool *should* get memory there.

Thank you
Yao Jiewen


-----Original Message-----
From: Laszlo Ersek [mailto:ler...@redhat.com] 
Sent: Tuesday, December 10, 2013 1:38 PM
To: Yao, Jiewen
Cc: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] [RFC v2 22/24] UefiCpuPkg: S3Resume2Pei: allow 
preallocation of PEI_S3_RESUME_STATE

On 12/10/13 06:27, Yao, Jiewen wrote:
> If Ovmf "preallocate everything necessary in runtime services data
> *or* acpi NVS type areas for the S3 resume path", the all S3 
> AllocatePool or AllocatePages *should* be in those memory.
> 
> Would you please investigate why you cannot get memory reserved when 
> you call AllocatePool? You may dump Hob data structure to see where is 
> the available memory.
> 
> It might be a PeiCore issue (on memory management), or Ovmf issue (on 
> installing wrong memory location in S3 phase), per my understanding.

OK, then I guess OVMF does not install the right memory location (I assume you 
mean "pool") in S3 phase then. What should we do?

If I can specify an AcpiNVS memory range very early (in PlatformPei) and all 
AllocatePool() calls in PEI will just work off that (as a pool), that would be 
optimal.

Thanks
Laszlo

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to