WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[Xen-devel] [PATCH 7 of 8] [powerpc] add PowerPC support to libxc

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH 7 of 8] [powerpc] add PowerPC support to libxc
From: Hollis Blanchard <hollisb@xxxxxxxxxx>
Date: Wed, 12 Jul 2006 17:55:41 -0500
Cc: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 12 Jul 2006 15:59:42 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1152744934@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Hollis Blanchard <hollisb@xxxxxxxxxx>
# Date 1152744261 18000
# Node ID 8400d02096faf9fd566c9ea73a57811ac5d34acd
# Parent  d3533a195a15902ad8b7bd0b9118118fae18e79c
[powerpc] add PowerPC support to libxc
Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx>

diff -r d3533a195a15 -r 8400d02096fa tools/libxc/Makefile
--- a/tools/libxc/Makefile      Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/Makefile      Wed Jul 12 17:44:21 2006 -0500
@@ -26,11 +26,13 @@ CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
 CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
 
 GUEST_SRCS-y :=
-GUEST_SRCS-y += xc_linux_build.c
 GUEST_SRCS-y += xc_load_bin.c
 GUEST_SRCS-y += xc_load_elf.c
 GUEST_SRCS-y += xg_private.c
-GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c
+GUEST_SRCS-$(CONFIG_POWERPC) += xc_ppc_linux_build.c
+GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c
+GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c xc_linux_build.c
+GUEST_SRCS-$(CONFIG_PLAN9) += xc_load_aout9.c
 GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
 GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
 
diff -r d3533a195a15 -r 8400d02096fa tools/libxc/xc_load_elf.c
--- a/tools/libxc/xc_load_elf.c Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/xc_load_elf.c Wed Jul 12 17:44:21 2006 -0500
@@ -38,6 +38,10 @@ loadelfsymtab(
 #define ELFCLASS   ELFCLASS64
 #define ELFDATA    ELFDATA2LSB
 #define ELFMACHINE EM_X86_64
+#elif defined(__powerpc__)
+#define ELFCLASS   ELFCLASS64
+#define ELFDATA    ELFDATA2MSB
+#define ELFMACHINE EM_PPC64
 #endif
 
 int probe_elf(const char *image,
diff -r d3533a195a15 -r 8400d02096fa tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h     Wed Jul 12 17:42:46 2006 -0500
+++ b/tools/libxc/xenctrl.h     Wed Jul 12 17:44:21 2006 -0500
@@ -47,6 +47,11 @@
 #define mb()
 #define rmb()
 #define wmb()
+#elif defined(__powerpc__)
+/* XXX loosen these up later */
+#define mb()   __asm__ __volatile__ ("sync" : : : "memory")
+#define rmb()  __asm__ __volatile__ ("sync" : : : "memory") /* lwsync? */
+#define wmb()  __asm__ __volatile__ ("sync" : : : "memory") /* eieio? */
 #else
 #error "Define barriers"
 #endif

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel