direct-io.hg

changeset 12954:176c7264715c

[POWERPC][XEN] Rename "Mambo" to "systemsim".
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Fri Nov 10 16:45:25 2006 -0600 (2006-11-10)
parents a60e804c0a31
children 228c34916020
files xen/arch/powerpc/Makefile xen/arch/powerpc/dart.c xen/arch/powerpc/exceptions.h xen/arch/powerpc/mambo.S xen/arch/powerpc/mm.c xen/arch/powerpc/systemsim.S xen/include/asm-powerpc/config.h xen/include/asm-powerpc/msr.h xen/include/asm-powerpc/powerpc64/string.h xen/include/asm-powerpc/processor.h
line diff
     1.1 --- a/xen/arch/powerpc/Makefile	Fri Nov 03 16:53:17 2006 -0500
     1.2 +++ b/xen/arch/powerpc/Makefile	Fri Nov 10 16:45:25 2006 -0600
     1.3 @@ -22,7 +22,7 @@ obj-y += float.o
     1.4  obj-y += hcalls.o
     1.5  obj-y += iommu.o
     1.6  obj-y += irq.o
     1.7 -obj-y += mambo.o
     1.8 +obj-y += systemsim.o
     1.9  obj-y += memory.o
    1.10  obj-y += mm.o
    1.11  obj-y += mpic.o
     2.1 --- a/xen/arch/powerpc/dart.c	Fri Nov 03 16:53:17 2006 -0500
     2.2 +++ b/xen/arch/powerpc/dart.c	Fri Nov 10 16:45:25 2006 -0600
     2.3 @@ -189,10 +189,8 @@ static int find_dart(struct dart_info *d
     2.4      ofdn_t n;
     2.5      char compat[128];
     2.6  
     2.7 -
     2.8 -    if (on_mambo()) {
     2.9 -        /* mambo has no dart */
    2.10 -        DBG("%s: Mambo does not support a dart\n", __func__);
    2.11 +    if (on_systemsim()) {
    2.12 +        DBG("%s: systemsim does not support a dart\n", __func__);
    2.13          return -1;
    2.14      }
    2.15  
     3.1 --- a/xen/arch/powerpc/exceptions.h	Fri Nov 03 16:53:17 2006 -0500
     3.2 +++ b/xen/arch/powerpc/exceptions.h	Fri Nov 10 16:45:25 2006 -0600
     3.3 @@ -44,8 +44,6 @@ extern void program_exception(
     3.4  
     3.5  extern long xen_hvcall_jump(struct cpu_user_regs *regs, ulong address);
     3.6  
     3.7 -extern void *mambo_memset(void *, int, ulong);
     3.8 -extern void *mambo_memcpy(void *, const void *, ulong);
     3.9  extern void sleep(void);
    3.10  extern void idle_loop(void);
    3.11  
     4.1 --- a/xen/arch/powerpc/mambo.S	Fri Nov 03 16:53:17 2006 -0500
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,64 +0,0 @@
     4.4 -/*
     4.5 - * Copyright (C) 2005 Jimi Xenidis <jimix@watson.ibm.com>, IBM Corporation
     4.6 - *
     4.7 - * This program is free software; you can redistribute it and/or modify
     4.8 - * it under the terms of the GNU General Public License as published by
     4.9 - * the Free Software Foundation; either version 2 of the License, or
    4.10 - * (at your option) any later version.
    4.11 - * 
    4.12 - * This program is distributed in the hope that it will be useful,
    4.13 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.14 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.15 - * GNU General Public License for more details.
    4.16 - * 
    4.17 - * You should have received a copy of the GNU General Public License
    4.18 - * along with this program; if not, write to the Free Software
    4.19 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    4.20 - *
    4.21 - */
    4.22 -
    4.23 -#include <asm/config.h>
    4.24 -#include <asm/processor.h>
    4.25 -
    4.26 -_GLOBAL(mambo_callthru)
    4.27 -	.long 0x000eaeb0
    4.28 -	blr
    4.29 -
    4.30 -_GLOBAL(mambo_write)
    4.31 -	mr	r5, r4
    4.32 -	mr	r4, r3
    4.33 -	li	r3, 0		# Write console code
    4.34 -	
    4.35 -	li	r6, 0
    4.36 -	/* need to fix return value */
    4.37 -	mflr	r7
    4.38 -	bl	_ENTRY(mambo_callthru)
    4.39 -	mtlr	r7
    4.40 -	mr	r3, r5
    4.41 -	blr
    4.42 -
    4.43 -_GLOBAL(mambo_memset)
    4.44 -	mr	r6, r5
    4.45 -	mr	r5, r4
    4.46 -	mr	r4, r3
    4.47 -	li	r3, 0x47	# memset
    4.48 -	/* need to fix return value */
    4.49 -	mflr	r7
    4.50 -	bl	_ENTRY(mambo_callthru)
    4.51 -	mtlr	r7
    4.52 -	mr	r3, r4
    4.53 -	blr
    4.54 -
    4.55 -_GLOBAL(mambo_memcpy)
    4.56 -	mr	r6, r5
    4.57 -	mr	r5, r4
    4.58 -	mr	r4, r3
    4.59 -	li	r3, 0x45 # memcpy
    4.60 -	/* need to fix return value */
    4.61 -	mflr	r7
    4.62 -	bl	_ENTRY(mambo_callthru)
    4.63 -	mtlr	r7
    4.64 -	mr	r3, r4
    4.65 -	blr
    4.66 -
    4.67 -	
     5.1 --- a/xen/arch/powerpc/mm.c	Fri Nov 03 16:53:17 2006 -0500
     5.2 +++ b/xen/arch/powerpc/mm.c	Fri Nov 10 16:45:25 2006 -0600
     5.3 @@ -27,6 +27,7 @@
     5.4  #include <xen/perfc.h>
     5.5  #include <asm/init.h>
     5.6  #include <asm/page.h>
     5.7 +#include <asm/string.h>
     5.8  
     5.9  #ifdef VERBOSE
    5.10  #define MEM_LOG(_f, _a...)                                  \
    5.11 @@ -276,9 +277,8 @@ long arch_memory_op(int op, XEN_GUEST_HA
    5.12  
    5.13  extern void copy_page(void *dp, void *sp)
    5.14  {
    5.15 -    if (on_mambo()) {
    5.16 -        extern void *mambo_memcpy(void *,const void *,__kernel_size_t);
    5.17 -        mambo_memcpy(dp, sp, PAGE_SIZE);
    5.18 +    if (on_systemsim()) {
    5.19 +        systemsim_memcpy(dp, sp, PAGE_SIZE);
    5.20      } else {
    5.21          memcpy(dp, sp, PAGE_SIZE);
    5.22      }
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/xen/arch/powerpc/systemsim.S	Fri Nov 10 16:45:25 2006 -0600
     6.3 @@ -0,0 +1,64 @@
     6.4 +/*
     6.5 + * Copyright (C) 2005 Jimi Xenidis <jimix@watson.ibm.com>, IBM Corporation
     6.6 + *
     6.7 + * This program is free software; you can redistribute it and/or modify
     6.8 + * it under the terms of the GNU General Public License as published by
     6.9 + * the Free Software Foundation; either version 2 of the License, or
    6.10 + * (at your option) any later version.
    6.11 + * 
    6.12 + * This program is distributed in the hope that it will be useful,
    6.13 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
    6.14 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    6.15 + * GNU General Public License for more details.
    6.16 + * 
    6.17 + * You should have received a copy of the GNU General Public License
    6.18 + * along with this program; if not, write to the Free Software
    6.19 + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
    6.20 + *
    6.21 + */
    6.22 +
    6.23 +#include <asm/config.h>
    6.24 +#include <asm/processor.h>
    6.25 +
    6.26 +_GLOBAL(systemsim_callthru)
    6.27 +	.long 0x000eaeb0
    6.28 +	blr
    6.29 +
    6.30 +_GLOBAL(systemsim_write)
    6.31 +	mr	r5, r4
    6.32 +	mr	r4, r3
    6.33 +	li	r3, 0		# Write console code
    6.34 +	
    6.35 +	li	r6, 0
    6.36 +	/* need to fix return value */
    6.37 +	mflr	r7
    6.38 +	bl	_ENTRY(systemsim_callthru)
    6.39 +	mtlr	r7
    6.40 +	mr	r3, r5
    6.41 +	blr
    6.42 +
    6.43 +_GLOBAL(systemsim_memset)
    6.44 +	mr	r6, r5
    6.45 +	mr	r5, r4
    6.46 +	mr	r4, r3
    6.47 +	li	r3, 0x47	# memset
    6.48 +	/* need to fix return value */
    6.49 +	mflr	r7
    6.50 +	bl	_ENTRY(systemsim_callthru)
    6.51 +	mtlr	r7
    6.52 +	mr	r3, r4
    6.53 +	blr
    6.54 +
    6.55 +_GLOBAL(systemsim_memcpy)
    6.56 +	mr	r6, r5
    6.57 +	mr	r5, r4
    6.58 +	mr	r4, r3
    6.59 +	li	r3, 0x45 # memcpy
    6.60 +	/* need to fix return value */
    6.61 +	mflr	r7
    6.62 +	bl	_ENTRY(systemsim_callthru)
    6.63 +	mtlr	r7
    6.64 +	mr	r3, r4
    6.65 +	blr
    6.66 +
    6.67 +	
     7.1 --- a/xen/include/asm-powerpc/config.h	Fri Nov 03 16:53:17 2006 -0500
     7.2 +++ b/xen/include/asm-powerpc/config.h	Fri Nov 10 16:45:25 2006 -0600
     7.3 @@ -21,7 +21,7 @@
     7.4  #ifndef __PPC_CONFIG_H__
     7.5  #define __PPC_CONFIG_H__
     7.6  
     7.7 -#define CONFIG_MAMBO 1
     7.8 +#define CONFIG_SYSTEMSIM 1
     7.9  #define HYPERVISOR_VIRT_START 0x0 /* XXX temp hack for common/kernel.c */
    7.10  
    7.11  
     8.1 --- a/xen/include/asm-powerpc/msr.h	Fri Nov 03 16:53:17 2006 -0500
     8.2 +++ b/xen/include/asm-powerpc/msr.h	Fri Nov 10 16:45:25 2006 -0600
     8.3 @@ -51,9 +51,9 @@
     8.4  #define MSR_RI      ULL(0x0000000000000002)
     8.5  #define MSR_LE      ULL(0x0000000000000001)
     8.6  
     8.7 -/* MSR bits set on the Mambo simulator */
     8.8 +/* MSR bits set on the systemsim simulator */
     8.9  #define MSR_SIM     ULL(0x0000000020000000)
    8.10 -#define MSR_MAMBO   ULL(0x0000000010000000)
    8.11 +#define MSR_SYSTEMSIM ULL(0x0000000010000000)
    8.12  
    8.13  /* On a trap, srr1's copy of msr defines some bits as follows: */
    8.14  #define MSR_TRAP_FE     ULL(0x0000000000100000) /* Floating Point Exception */
     9.1 --- a/xen/include/asm-powerpc/powerpc64/string.h	Fri Nov 03 16:53:17 2006 -0500
     9.2 +++ b/xen/include/asm-powerpc/powerpc64/string.h	Fri Nov 10 16:45:25 2006 -0600
     9.3 @@ -37,4 +37,7 @@ extern void * memmove(void *,const void 
     9.4  extern int memcmp(const void *,const void *,__kernel_size_t);
     9.5  extern void * memchr(const void *,int,__kernel_size_t);
     9.6  
     9.7 +extern void *systemsim_memset(void *, int, ulong);
     9.8 +extern void *systemsim_memcpy(void *, const void *, ulong);
     9.9 +
    9.10  #endif
    10.1 --- a/xen/include/asm-powerpc/processor.h	Fri Nov 03 16:53:17 2006 -0500
    10.2 +++ b/xen/include/asm-powerpc/processor.h	Fri Nov 10 16:45:25 2006 -0600
    10.3 @@ -276,13 +276,13 @@ static inline unsigned mfdsisr(void)
    10.4      return val;
    10.5  }
    10.6  
    10.7 -#ifdef CONFIG_MAMBO
    10.8 -static inline int on_mambo(void)
    10.9 +#ifdef CONFIG_SYSTEMSIM
   10.10 +static inline int on_systemsim(void)
   10.11  {
   10.12 -    return !!(mfmsr() & MSR_MAMBO);
   10.13 +    return !!(mfmsr() & MSR_SYSTEMSIM);
   10.14  }
   10.15 -#else /* CONFIG_MAMBO */
   10.16 -static inline int on_mambo(void) { return 0; }
   10.17 +#else /* CONFIG_SYSTEMSIM */
   10.18 +static inline int on_systemsim(void) { return 0; }
   10.19  #endif
   10.20  
   10.21  #endif /* __ASSEMBLY__ */