[edk2-devel] [PATCH v3 21/35] OvmfPkg/XenPlatformPei: Introduce XenPvhDetected

Anthony PERARD anthony.perard at citrix.com
Thu Jul 4 14:42:19 UTC 2019


XenPvhDetected() can be used to figure out if OVMF has started via the
Xen PVH entry point.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard at citrix.com>
Acked-by: Laszlo Ersek <lersek at redhat.com>
---
 OvmfPkg/XenPlatformPei/Platform.h |  5 +++++
 OvmfPkg/XenPlatformPei/Xen.c      | 13 +++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/OvmfPkg/XenPlatformPei/Platform.h b/OvmfPkg/XenPlatformPei/Platform.h
index 4a80057bdc..db9a62572f 100644
--- a/OvmfPkg/XenPlatformPei/Platform.h
+++ b/OvmfPkg/XenPlatformPei/Platform.h
@@ -99,6 +99,11 @@ XenHvmloaderDetected (
   VOID

   );

 

+BOOLEAN

+XenPvhDetected (

+  VOID

+  );

+

 VOID

 AmdSevInitialize (

   VOID

diff --git a/OvmfPkg/XenPlatformPei/Xen.c b/OvmfPkg/XenPlatformPei/Xen.c
index 7d1696bb22..188e831c5c 100644
--- a/OvmfPkg/XenPlatformPei/Xen.c
+++ b/OvmfPkg/XenPlatformPei/Xen.c
@@ -214,6 +214,19 @@ XenHvmloaderDetected (
   return (mXenHvmloaderInfo != NULL);

 }

 

+BOOLEAN

+XenPvhDetected (

+  VOID

+  )

+{

+  //

+  // This function should only be used after XenConnect

+  //

+  ASSERT (mXenInfo.VersionMajor != 0);

+

+  return mXenHvmloaderInfo == NULL;

+}

+

 VOID

 XenPublishRamRegions (

   VOID

-- 
Anthony PERARD


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#43305): https://edk2.groups.io/g/devel/message/43305
Mute This Topic: https://groups.io/mt/32308729/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list