ia64/xen-unstable

changeset 10746:80055bb36dc7

[powerpc] add PowerPC support to libxc
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author kaf24@firebug.cl.cam.ac.uk
date Fri Jul 14 10:37:12 2006 +0100 (2006-07-14)
parents 129e981a7700
children 69c4f7963a19
files tools/libxc/Makefile tools/libxc/xc_load_elf.c tools/libxc/xenctrl.h
line diff
     1.1 --- a/tools/libxc/Makefile	Fri Jul 14 10:31:36 2006 +0100
     1.2 +++ b/tools/libxc/Makefile	Fri Jul 14 10:37:12 2006 +0100
     1.3 @@ -26,11 +26,12 @@ CTRL_SRCS-$(CONFIG_X86) += xc_ptrace.c x
     1.4  CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
     1.5  
     1.6  GUEST_SRCS-y :=
     1.7 -GUEST_SRCS-y += xc_linux_build.c
     1.8  GUEST_SRCS-y += xc_load_bin.c
     1.9  GUEST_SRCS-y += xc_load_elf.c
    1.10  GUEST_SRCS-y += xg_private.c
    1.11 -GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c
    1.12 +GUEST_SRCS-$(CONFIG_POWERPC) += xc_ppc_linux_build.c
    1.13 +GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c
    1.14 +GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c xc_linux_build.c
    1.15  GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c
    1.16  GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
    1.17  
     2.1 --- a/tools/libxc/xc_load_elf.c	Fri Jul 14 10:31:36 2006 +0100
     2.2 +++ b/tools/libxc/xc_load_elf.c	Fri Jul 14 10:37:12 2006 +0100
     2.3 @@ -38,6 +38,10 @@ loadelfsymtab(
     2.4  #define ELFCLASS   ELFCLASS64
     2.5  #define ELFDATA    ELFDATA2LSB
     2.6  #define ELFMACHINE EM_X86_64
     2.7 +#elif defined(__powerpc__)
     2.8 +#define ELFCLASS   ELFCLASS64
     2.9 +#define ELFDATA    ELFDATA2MSB
    2.10 +#define ELFMACHINE EM_PPC64
    2.11  #endif
    2.12  
    2.13  int probe_elf(const char *image,
     3.1 --- a/tools/libxc/xenctrl.h	Fri Jul 14 10:31:36 2006 +0100
     3.2 +++ b/tools/libxc/xenctrl.h	Fri Jul 14 10:37:12 2006 +0100
     3.3 @@ -47,6 +47,11 @@
     3.4  #define mb()
     3.5  #define rmb()
     3.6  #define wmb()
     3.7 +#elif defined(__powerpc__)
     3.8 +/* XXX loosen these up later */
     3.9 +#define mb()   __asm__ __volatile__ ("sync" : : : "memory")
    3.10 +#define rmb()  __asm__ __volatile__ ("sync" : : : "memory") /* lwsync? */
    3.11 +#define wmb()  __asm__ __volatile__ ("sync" : : : "memory") /* eieio? */
    3.12  #else
    3.13  #error "Define barriers"
    3.14  #endif