On Sun, Nov 09, 2014 at 10:13:54AM -0800, Jordan Justen wrote:
> On 2014-11-08 14:02:00, Gabriel L. Somlo wrote:
> > Since in OVMF both PEI_CORE and PEIM run from RAM, and thus may
> > utilize global variables, use the "Base" AcpiTimerLib instance
> > (instead of BaseRom) to take advantage of the improved efficiency
> > of storing the timer register IO address in a global variable.
> > 
> > This leaves only SEC using the BaseRomAcpiTimerLib instance.
> > 
> > Contributed-under: TianoCore Contribution Agreement 1.0
> > Signed-off-by: Gabriel Somlo <[email protected]>
> > ---
> >  
> > [...]
> >  
> > +  //
> > +  // Check to see if the Power Management Base Address is already enabled
> > +  //
> > +  if ((PciRead8 (PmRegMisc) & PMIOSE) == 0) {
> > +    //
> > +    // If the Power Management Base Address is not programmed,
> > +    // then program the Power Management Base Address from a PCD.
> > +    //
> > +    PciAndThenOr32 (Pmba, (UINT32) ~0xFFC0, PcdGet16 
> > (PcdAcpiPmBaseAddress));
> > +
> > +    //
> > +    // Enable PMBA I/O port decodes in PMREGMISC
> > +    //
> > +    PciOr8 (PmRegMisc, PMIOSE);
> 
> Wouldn't the 'Rom' version program this during SEC?
> 
> I don't think we should access the PCD in BaseAcpiTimerLib.

I seem to remember someone earlier in the thread mentioning that it's
possible for SEC *not* to run, in which case it's PEI's job to enable
PMBA. Laszlo ? :)

Thanks,
--Gabriel

------------------------------------------------------------------------------
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://pubads.g.doubleclick.net/gampad/clk?id=154624111&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to