OvmfPkg/AcpiTimerLib: don't use possibly unset PMBA register (PEI phase)
We should store the right value to the PMBA (if the PMBA needs
initialization) before setting mAcpiTimerIoAddr from the PMBA.
Cc: Gabriel Somlo <somlo@cmu.edu>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Fixes: f122712b42
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Tested-by: Gabriel Somlo <somlo@cmu.edu>
This commit is contained in:
@@ -63,8 +63,6 @@ AcpiTimerLibConstructor (
|
|||||||
return RETURN_UNSUPPORTED;
|
return RETURN_UNSUPPORTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
mAcpiTimerIoAddr = (PciRead32 (Pmba) & ~PMBA_RTE) + ACPI_TIMER_OFFSET;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check to see if the Power Management Base Address is already enabled
|
// Check to see if the Power Management Base Address is already enabled
|
||||||
//
|
//
|
||||||
@@ -81,6 +79,7 @@ AcpiTimerLibConstructor (
|
|||||||
PciOr8 (AcpiCtlReg, AcpiEnBit);
|
PciOr8 (AcpiCtlReg, AcpiEnBit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mAcpiTimerIoAddr = (PciRead32 (Pmba) & ~PMBA_RTE) + ACPI_TIMER_OFFSET;
|
||||||
return RETURN_SUCCESS;
|
return RETURN_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user