]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg/PlatformPei: Add mXen boolean to indicate Xen is running
authorJordan Justen <jordan.l.justen@intel.com>
Sat, 1 Feb 2014 21:22:12 +0000 (21:22 +0000)
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>
Sat, 1 Feb 2014 21:22:12 +0000 (21:22 +0000)
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

OvmfPkg/PlatformPei/Platform.c
OvmfPkg/PlatformPei/Platform.h
OvmfPkg/PlatformPei/Xen.c

index 01460639b1d399d15bce5c485d54e2256a0dfb4d..0763f21fac862d7ab1a1e68a82bdfe72d46f6850 100644 (file)
@@ -424,13 +424,13 @@ InitializePlatform (
 \r
   PublishPeiMemory ();\r
 \r
 \r
   PublishPeiMemory ();\r
 \r
-  if (XenLeaf != 0) {\r
+  if (mXen) {\r
     PcdSetBool (PcdPciDisableBusEnumeration, TRUE);\r
   } else {\r
     TopOfMemory = MemDetect ();\r
   }\r
 \r
     PcdSetBool (PcdPciDisableBusEnumeration, TRUE);\r
   } else {\r
     TopOfMemory = MemDetect ();\r
   }\r
 \r
-  if (XenLeaf != 0) {\r
+  if (mXen) {\r
     DEBUG ((EFI_D_INFO, "Xen was detected\n"));\r
     InitializeXen (XenLeaf);\r
   }\r
     DEBUG ((EFI_D_INFO, "Xen was detected\n"));\r
     InitializeXen (XenLeaf);\r
   }\r
@@ -439,7 +439,7 @@ InitializePlatform (
 \r
   PeiFvInitialization ();\r
 \r
 \r
   PeiFvInitialization ();\r
 \r
-  if (XenLeaf != 0) {\r
+  if (mXen) {\r
     XenMemMapInitialization ();\r
   } else {\r
     MemMapInitialization (TopOfMemory);\r
     XenMemMapInitialization ();\r
   } else {\r
     MemMapInitialization (TopOfMemory);\r
index 5378b9d8e78d9c551c20632ee451685ce5da54f0..cc371c57f7d49a40ce6094598ba4ba57225c6a1c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Platform PEI module include file.\r
 \r
 /** @file\r
   Platform PEI module include file.\r
 \r
-  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -84,6 +84,8 @@ XenDetect (
   VOID\r
   );\r
 \r
   VOID\r
   );\r
 \r
+extern BOOLEAN mXen;\r
+\r
 EFI_STATUS\r
 XenGetE820Map (\r
   EFI_E820_ENTRY64 **Entries,\r
 EFI_STATUS\r
 XenGetE820Map (\r
   EFI_E820_ENTRY64 **Entries,\r
index 8e5d79e8b8fd0e7d8e21ca673ee2179990924b9a..0f75fa798320a4bdd8a81c38ca31d63e5678a1e3 100644 (file)
@@ -1,7 +1,7 @@
 /**@file\r
   Xen Platform PEI support\r
 \r
 /**@file\r
   Xen Platform PEI support\r
 \r
-  Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
   Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>\r
 \r
   This program and the accompanying materials\r
   Copyright (c) 2011, Andrei Warkentin <andreiw@motorola.com>\r
 \r
   This program and the accompanying materials\r
@@ -31,6 +31,8 @@
 #include "Platform.h"\r
 #include "Xen.h"\r
 \r
 #include "Platform.h"\r
 #include "Xen.h"\r
 \r
+BOOLEAN mXen = FALSE;\r
+\r
 EFI_XEN_INFO mXenInfo;\r
 \r
 /**\r
 EFI_XEN_INFO mXenInfo;\r
 \r
 /**\r
@@ -131,6 +133,7 @@ XenDetect (
     Signature[12] = '\0';\r
 \r
     if (!AsciiStrCmp ((CHAR8 *) Signature, "XenVMMXenVMM")) {\r
     Signature[12] = '\0';\r
 \r
     if (!AsciiStrCmp ((CHAR8 *) Signature, "XenVMMXenVMM")) {\r
+      mXen = TRUE;\r
       return XenLeaf;\r
     }\r
   }\r
       return XenLeaf;\r
     }\r
   }\r