diff options
author | Anthony PERARD <anthony.perard@citrix.com> | 2014-10-31 21:25:11 +0000 |
---|---|---|
committer | jljusten <jljusten@Edk2> | 2014-10-31 21:25:11 +0000 |
commit | 8f148aee19d34f12372f924aae776e3781b66a59 (patch) | |
tree | 69de513841b69b124522e9b7d102a31a2691ffc8 /OvmfPkg | |
parent | d8cfdb5fb1638173f98084cf48860036f7b86b22 (diff) | |
download | edk2-platforms-8f148aee19d34f12372f924aae776e3781b66a59.tar.xz |
OvmfPkg/Include/...Xen: Convert __i386__/__x86_64__ to MDE_CPU_IA32/MDE_CPU_X64.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16293 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg')
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/README | 3 | ||||
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h | 8 | ||||
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h | 2 | ||||
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/io/blkif.h | 6 | ||||
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h | 4 | ||||
-rw-r--r-- | OvmfPkg/Include/IndustryStandard/Xen/xen.h | 2 |
6 files changed, 14 insertions, 11 deletions
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/README b/OvmfPkg/Include/IndustryStandard/Xen/README index 0553ed729c..8cb7f715b7 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/README +++ b/OvmfPkg/Include/IndustryStandard/Xen/README @@ -32,3 +32,6 @@ s/([^a-zA-Z0-9_]|^)unsigned char([^a-zA-Z0-9_]|$)/\1UINT8\2/g s/([^a-zA-Z0-9_]|^)char([^a-zA-Z0-9_]|$)/\1CHAR8\2/g
s/([^a-zA-Z0-9_]|^)unsigned long([^a-zA-Z0-9_]|$)/\1UINTN\2/g
s/([^a-zA-Z0-9_]|^)long([^a-zA-Z0-9_]|$)/\1INTN\2/g
+
+s/__i386__/MDE_CPU_IA32/g
+s/__x86_64__/MDE_CPU_X64/g
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h b/OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h index 00ba175e1e..684ca688c0 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/arch-x86/xen.h @@ -59,9 +59,9 @@ #endif
#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
-#if defined(__i386__)
+#if defined(MDE_CPU_IA32)
#include "xen-x86_32.h"
-#elif defined(__x86_64__)
+#elif defined(MDE_CPU_X64)
#include "xen-x86_64.h"
#endif
@@ -82,7 +82,7 @@ typedef UINTN xen_ulong_t; typedef UINT64 tsc_timestamp_t; /* RDTSC timestamp */
-#ifdef __i386__
+#ifdef MDE_CPU_IA32
#pragma pack(4)
#endif
struct arch_shared_info {
@@ -93,7 +93,7 @@ struct arch_shared_info { UINT64 pad[32];
};
typedef struct arch_shared_info arch_shared_info_t;
-#ifdef __i386__
+#ifdef MDE_CPU_IA32
#pragma pack()
#endif
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h b/OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h index 9646b9b145..cac33359ce 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/hvm/params.h @@ -54,7 +54,7 @@ #define HVM_PARAM_BUFIOREQ_PFN 6
#define HVM_PARAM_BUFIOREQ_EVTCHN 26
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
/* Expose Viridian interfaces to this HVM guest? */
#define HVM_PARAM_VIRIDIAN 9
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/io/blkif.h b/OvmfPkg/Include/IndustryStandard/Xen/io/blkif.h index 5130e3a4f0..ebed5799bc 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/io/blkif.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/io/blkif.h @@ -530,7 +530,7 @@ struct blkif_request_segment { /*
* Starting ring element for any I/O request.
*/
-#if defined(__i386__)
+#if defined(MDE_CPU_IA32)
//
// pack(4) is necessary when these structs are compiled for Ia32.
// Without it, the struct will have a different alignment than the one
@@ -571,7 +571,7 @@ struct blkif_request_indirect { blkif_sector_t sector_number;/* start sector idx on disk (r/w only) */
blkif_vdev_t handle; /* same as for read/write requests */
grant_ref_t indirect_grefs[BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST];
-#ifdef __i386__
+#ifdef MDE_CPU_IA32
UINT64 pad; /* Make it 64 byte aligned on i386 */
#endif
};
@@ -583,7 +583,7 @@ struct blkif_response { INT16 status; /* BLKIF_RSP_??? */
};
typedef struct blkif_response blkif_response_t;
-#if defined(__i386__)
+#if defined(MDE_CPU_IA32)
#pragma pack()
#endif
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h b/OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h index 5982a8b991..e2cbd871aa 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/io/protocols.h @@ -27,9 +27,9 @@ #define XEN_IO_PROTO_ABI_X86_64 "x86_64-abi"
#define XEN_IO_PROTO_ABI_ARM "arm-abi"
-#if defined(__i386__)
+#if defined(MDE_CPU_IA32)
# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_32
-#elif defined(__x86_64__)
+#elif defined(MDE_CPU_X64)
# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_X86_64
#elif defined(__arm__) || defined(__aarch64__)
# define XEN_IO_PROTO_ABI_NATIVE XEN_IO_PROTO_ABI_ARM
diff --git a/OvmfPkg/Include/IndustryStandard/Xen/xen.h b/OvmfPkg/Include/IndustryStandard/Xen/xen.h index 9289800be0..79697fcb61 100644 --- a/OvmfPkg/Include/IndustryStandard/Xen/xen.h +++ b/OvmfPkg/Include/IndustryStandard/Xen/xen.h @@ -29,7 +29,7 @@ #include "xen-compat.h"
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(MDE_CPU_IA32) || defined(MDE_CPU_X64)
#include "arch-x86/xen.h"
#elif defined(__arm__) || defined (__aarch64__)
#include "arch-arm.h"
|