summaryrefslogtreecommitdiff
path: root/OvmfPkg
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2014-02-01 21:22:12 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2014-02-01 21:22:12 +0000
commitb621bb0a3ce81cabc31e28e055e3206068d5aa77 (patch)
tree49327d677e280b2b9ae88600e832920c74705e9f /OvmfPkg
parent1bb6bfaa082be625512297a3250be58e2f999341 (diff)
downloadedk2-platforms-b621bb0a3ce81cabc31e28e055e3206068d5aa77.tar.xz
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
Diffstat (limited to 'OvmfPkg')
-rw-r--r--OvmfPkg/PlatformPei/Platform.c6
-rw-r--r--OvmfPkg/PlatformPei/Platform.h4
-rw-r--r--OvmfPkg/PlatformPei/Xen.c5
3 files changed, 10 insertions, 5 deletions
diff --git a/OvmfPkg/PlatformPei/Platform.c b/OvmfPkg/PlatformPei/Platform.c
index 01460639b1..0763f21fac 100644
--- a/OvmfPkg/PlatformPei/Platform.c
+++ b/OvmfPkg/PlatformPei/Platform.c
@@ -424,13 +424,13 @@ InitializePlatform (
PublishPeiMemory ();
- if (XenLeaf != 0) {
+ if (mXen) {
PcdSetBool (PcdPciDisableBusEnumeration, TRUE);
} else {
TopOfMemory = MemDetect ();
}
- if (XenLeaf != 0) {
+ if (mXen) {
DEBUG ((EFI_D_INFO, "Xen was detected\n"));
InitializeXen (XenLeaf);
}
@@ -439,7 +439,7 @@ InitializePlatform (
PeiFvInitialization ();
- if (XenLeaf != 0) {
+ if (mXen) {
XenMemMapInitialization ();
} else {
MemMapInitialization (TopOfMemory);
diff --git a/OvmfPkg/PlatformPei/Platform.h b/OvmfPkg/PlatformPei/Platform.h
index 5378b9d8e7..cc371c57f7 100644
--- a/OvmfPkg/PlatformPei/Platform.h
+++ b/OvmfPkg/PlatformPei/Platform.h
@@ -1,7 +1,7 @@
/** @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
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
@@ -84,6 +84,8 @@ XenDetect (
VOID
);
+extern BOOLEAN mXen;
+
EFI_STATUS
XenGetE820Map (
EFI_E820_ENTRY64 **Entries,
diff --git a/OvmfPkg/PlatformPei/Xen.c b/OvmfPkg/PlatformPei/Xen.c
index 8e5d79e8b8..0f75fa7983 100644
--- a/OvmfPkg/PlatformPei/Xen.c
+++ b/OvmfPkg/PlatformPei/Xen.c
@@ -1,7 +1,7 @@
/**@file
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>
This program and the accompanying materials
@@ -31,6 +31,8 @@
#include "Platform.h"
#include "Xen.h"
+BOOLEAN mXen = FALSE;
+
EFI_XEN_INFO mXenInfo;
/**
@@ -131,6 +133,7 @@ XenDetect (
Signature[12] = '\0';
if (!AsciiStrCmp ((CHAR8 *) Signature, "XenVMMXenVMM")) {
+ mXen = TRUE;
return XenLeaf;
}
}