From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: citrix.com, ip: 162.221.156.55, mailfrom: prvs=99536ed25=anthony.perard@citrix.com) Received: from SMTP03.CITRIX.COM (SMTP03.CITRIX.COM [162.221.156.55]) by groups.io with SMTP; Tue, 09 Apr 2019 04:27:46 -0700 X-IronPort-AV: E=Sophos;i="5.60,329,1549929600"; d="scan'208";a="83096415" From: "Anthony PERARD" To: CC: Jordan Justen , Laszlo Ersek , Ard Biesheuvel , Julien Grall , , Anthony PERARD Subject: [PATCH v2 20/31] OvmfPkg: Import XENMEM_memory_map hypercall to Xen/memory.h Date: Tue, 9 Apr 2019 12:08:33 +0100 Message-ID: <20190409110844.14746-21-anthony.perard@citrix.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190409110844.14746-1-anthony.perard@citrix.com> References: <20190409110844.14746-1-anthony.perard@citrix.com> MIME-Version: 1.0 Return-Path: anthony.perard@citrix.com Content-Transfer-Encoding: 8bit Content-Type: text/plain This is copied over from the public header of the Xen Project, with the type name modified to build on OVMF. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Anthony PERARD --- OvmfPkg/Include/IndustryStandard/Xen/memory.h | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/OvmfPkg/Include/IndustryStandard/Xen/memory.h b/OvmfPkg/Include/IndustryStandard/Xen/memory.h index 020155962c..b00a87097d 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/memory.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/memory.h @@ -81,6 +81,29 @@ struct xen_remove_from_physmap { typedef struct xen_remove_from_physmap xen_remove_from_physmap_t; DEFINE_XEN_GUEST_HANDLE(xen_remove_from_physmap_t); +/* + * Returns the pseudo-physical memory map as it was when the domain + * was started (specified by XENMEM_set_memory_map). + * arg == addr of xen_memory_map_t. + */ +#define XENMEM_memory_map 9 +struct xen_memory_map { + /* + * On call the number of entries which can be stored in buffer. On + * return the number of entries which have been stored in + * buffer. + */ + UINT32 nr_entries; + + /* + * Entries in the buffer are in the same format as returned by the + * BIOS INT 0x15 EAX=0xE820 call. + */ + XEN_GUEST_HANDLE(void) buffer; +}; +typedef struct xen_memory_map xen_memory_map_t; +DEFINE_XEN_GUEST_HANDLE(xen_memory_map_t); + #endif /* __XEN_PUBLIC_MEMORY_H__ */ /* -- Anthony PERARD