]> git.proxmox.com Git - mirror_edk2.git/commitdiff
OvmfPkg: Import XENMEM_memory_map hypercall to Xen/memory.h
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 13 Aug 2019 11:31:05 +0000 (12:31 +0100)
committerLaszlo Ersek <lersek@redhat.com>
Wed, 21 Aug 2019 16:03:49 +0000 (18:03 +0200)
The informations to make a XENMEM_memory_map hypercall is copied over
from the public header of the Xen Project, with the type name modified
to build on OVMF.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1689
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20190813113119.14804-22-anthony.perard@citrix.com>

OvmfPkg/Include/IndustryStandard/Xen/memory.h

index 81e981331a80088ed22b22763f34419e5f5fa022..4a33a26d4eba359dea943819bebfb30e44721c89 100644 (file)
@@ -65,6 +65,29 @@ struct xen_remove_from_physmap {
 typedef struct xen_remove_from_physmap xen_remove_from_physmap_t;\r
 DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t);\r
 \r
+/*\r
+ * Returns the pseudo-physical memory map as it was when the domain\r
+ * was started (specified by XENMEM_set_memory_map).\r
+ * arg == addr of xen_memory_map_t.\r
+ */\r
+#define XENMEM_memory_map           9\r
+struct xen_memory_map {\r
+    /*\r
+     * On call the number of entries which can be stored in buffer. On\r
+     * return the number of entries which have been stored in\r
+     * buffer.\r
+     */\r
+    UINT32 nr_entries;\r
+\r
+    /*\r
+     * Entries in the buffer are in the same format as returned by the\r
+     * BIOS INT 0x15 EAX=0xE820 call.\r
+     */\r
+    XEN_GUEST_HANDLE(void) buffer;\r
+};\r
+typedef struct xen_memory_map xen_memory_map_t;\r
+DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t);\r
+\r
 #endif /* __XEN_PUBLIC_MEMORY_H__ */\r
 \r
 /*\r