We had a similar problem in the past where we allocated memory for a PPI that 
had two pointers (to two additional blocks of allocated memory that had our 
data).  When permanent memory was installed the PPI pointer was migrated, but 
the pointers inside the PPI were not migrated.  Our Pei module had to fix up 
the pointers in the PPI after memory was discovered.

To fix, our PEI Module called NotifyPpi(gPeiMemoryDiscoveredPpiGuid) (now 
gEfiPeiMemoryDiscoveredPpiGuid?).
When the notify routine got called, it would locate the PPI, reallocate those 
two additional blocks of data again (and fill them with our data), and finally 
patch the PPI to point to the two new blocks of data.

Allen

-----Original Message-----
From: Gao, Liming [mailto:[email protected]] 
Sent: Thursday, October 16, 2014 9:17 PM
To: [email protected]
Subject: Re: [edk2] PPIs passed into the PEI Core entry point get zero'ed out 
when permanent memory is installed?

Andrew:
  If TemporaryRamSupportPpi is installed, it will migrate the full temp memory 
to permanent memory. If it is not ready, PeiCore will migrate the full temp 
memory. After memory is migrated, PeiCore will convert PPI pointers in temp 
memory. You can see ConvertPpiPointers() in MdeModulePkg\Core\Pei\Ppi\Ppi.c 
that covers all temp memory: heap, stack and hole. So, PPI pointers should be 
converted to the permanent memory. But, if PPI data is the temp memory, it 
can't be converted by PeiCore, because PeiCore doesn't understand the specific 
PPI data format. 

Thanks
Liming
-----Original Message-----
From: Andrew Fish [mailto:[email protected]] 
Sent: Monday, September 29, 2014 10:06 AM
To: [email protected]
Subject: [edk2] PPIs passed into the PEI Core entry point get zero'ed out when 
permanent memory is installed?

I don't see any place in the PI specs that state the PPIs passed from SEC to 
the PEI core don't make it past memory getting discovered. 

The PPI lists getting passed up are on the stack and were allocated prior to 
calling the PEI Core Main. Just like: 
https://svn.code.sf.net/p/edk2/code/trunk/edk2/EmulatorPkg/Sec/Sec.c

I see this failure in the EmulatorPkg and on real hardware too. 

Thanks,

Andrew Fish
------------------------------------------------------------------------------
Slashdot TV.  Videos for Nerds.  Stuff that Matters.
http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to