mirror of https://github.com/acidanthera/audk.git
OvmfPkg: key PMBA setup in Platform PEI off of PMREGMISC/PMIOSE, not Xen
This matches the logic in AcpiTimerLib. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13723 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
931a0c74ed
commit
0e20a1864f
|
@ -214,7 +214,7 @@ MemMapInitialization (
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
MiscInitialization (
|
MiscInitialization (
|
||||||
BOOLEAN Xen
|
VOID
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -227,7 +227,12 @@ MiscInitialization (
|
||||||
//
|
//
|
||||||
BuildCpuHob (36, 16);
|
BuildCpuHob (36, 16);
|
||||||
|
|
||||||
if (!Xen) {
|
//
|
||||||
|
// If PMREGMISC/PMIOSE is set, assume the ACPI PMBA has been configured (for
|
||||||
|
// example by Xen) and skip the setup here. This matches the logic in
|
||||||
|
// AcpiTimerLibConstructor ().
|
||||||
|
//
|
||||||
|
if ((PciRead8 (PCI_LIB_ADDRESS (0, 1, 3, 0x80)) & 0x01) == 0) {
|
||||||
//
|
//
|
||||||
// The PEI phase should be exited with fully accessibe PIIX4 IO space:
|
// The PEI phase should be exited with fully accessibe PIIX4 IO space:
|
||||||
// 1. set PMBA
|
// 1. set PMBA
|
||||||
|
@ -331,9 +336,7 @@ InitializePlatform (
|
||||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
|
||||||
EFI_PHYSICAL_ADDRESS TopOfMemory;
|
EFI_PHYSICAL_ADDRESS TopOfMemory;
|
||||||
BOOLEAN Xen;
|
|
||||||
|
|
||||||
DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));
|
DEBUG ((EFI_D_ERROR, "Platform PEIM Loaded\n"));
|
||||||
|
|
||||||
|
@ -341,8 +344,7 @@ InitializePlatform (
|
||||||
|
|
||||||
TopOfMemory = MemDetect ();
|
TopOfMemory = MemDetect ();
|
||||||
|
|
||||||
Status = InitializeXen ();
|
InitializeXen ();
|
||||||
Xen = EFI_ERROR (Status) ? FALSE : TRUE;
|
|
||||||
|
|
||||||
ReserveEmuVariableNvStore ();
|
ReserveEmuVariableNvStore ();
|
||||||
|
|
||||||
|
@ -350,7 +352,7 @@ InitializePlatform (
|
||||||
|
|
||||||
MemMapInitialization (TopOfMemory);
|
MemMapInitialization (TopOfMemory);
|
||||||
|
|
||||||
MiscInitialization (Xen);
|
MiscInitialization ();
|
||||||
|
|
||||||
BootModeInitialization ();
|
BootModeInitialization ();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue