mirror of https://github.com/acidanthera/audk.git
OvmfPkg/PlatformPei: Add mXen boolean to indicate Xen is running
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Wei Liu <wei.liu2@citrix.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15201 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1bb6bfaa08
commit
b621bb0a3c
|
@ -424,13 +424,13 @@ InitializePlatform (
|
||||||
|
|
||||||
PublishPeiMemory ();
|
PublishPeiMemory ();
|
||||||
|
|
||||||
if (XenLeaf != 0) {
|
if (mXen) {
|
||||||
PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
|
PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
|
||||||
} else {
|
} else {
|
||||||
TopOfMemory = MemDetect ();
|
TopOfMemory = MemDetect ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (XenLeaf != 0) {
|
if (mXen) {
|
||||||
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
|
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
|
||||||
InitializeXen (XenLeaf);
|
InitializeXen (XenLeaf);
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ InitializePlatform (
|
||||||
|
|
||||||
PeiFvInitialization ();
|
PeiFvInitialization ();
|
||||||
|
|
||||||
if (XenLeaf != 0) {
|
if (mXen) {
|
||||||
XenMemMapInitialization ();
|
XenMemMapInitialization ();
|
||||||
} else {
|
} else {
|
||||||
MemMapInitialization (TopOfMemory);
|
MemMapInitialization (TopOfMemory);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Platform PEI module include file.
|
Platform PEI module include file.
|
||||||
|
|
||||||
Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
which accompanies this distribution. The full text of the license may be found at
|
which accompanies this distribution. The full text of the license may be found at
|
||||||
|
@ -84,6 +84,8 @@ XenDetect (
|
||||||
VOID
|
VOID
|
||||||
);
|
);
|
||||||
|
|
||||||
|
extern BOOLEAN mXen;
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
XenGetE820Map (
|
XenGetE820Map (
|
||||||
EFI_E820_ENTRY64 **Entries,
|
EFI_E820_ENTRY64 **Entries,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**@file
|
/**@file
|
||||||
Xen Platform PEI support
|
Xen Platform PEI support
|
||||||
|
|
||||||
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
|
Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
|
||||||
Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>
|
Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
|
@ -31,6 +31,8 @@
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
#include "Xen.h"
|
#include "Xen.h"
|
||||||
|
|
||||||
|
BOOLEAN mXen = FALSE;
|
||||||
|
|
||||||
EFI_XEN_INFO mXenInfo;
|
EFI_XEN_INFO mXenInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -131,6 +133,7 @@ XenDetect (
|
||||||
Signature[12] = '\0';
|
Signature[12] = '\0';
|
||||||
|
|
||||||
if (!AsciiStrCmp ((CHAR8 *) Signature, "XenVMMXenVMM")) {
|
if (!AsciiStrCmp ((CHAR8 *) Signature, "XenVMMXenVMM")) {
|
||||||
|
mXen = TRUE;
|
||||||
return XenLeaf;
|
return XenLeaf;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue