New ppc64-linux-user target.

Allow use of PowerPC 970 for debugging (softmmu would not run, for now).


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3246 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
j_mayer 2007-09-27 01:14:15 +00:00
parent b8d3f5d126
commit 92a343da3f
5 changed files with 13 additions and 39 deletions

2
configure vendored
View file

@ -501,7 +501,7 @@ if test -z "$target_list" ; then
fi fi
# the following are Linux specific # the following are Linux specific
if [ "$linux_user" = "yes" ] ; then if [ "$linux_user" = "yes" ] ; then
target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user ppc-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user $target_list" target_list="i386-linux-user arm-linux-user armeb-linux-user sparc-linux-user ppc-linux-user mips-linux-user mipsel-linux-user m68k-linux-user alpha-linux-user ppc64-linux-user $target_list"
fi fi
# the following are Darwin specific # the following are Darwin specific
if [ "$darwin_user" = "yes" ] ; then if [ "$darwin_user" = "yes" ] ; then

View file

@ -1315,6 +1315,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs,
interp_load_addr, interp_load_addr,
(interpreter_type == INTERPRETER_AOUT ? 0 : 1), (interpreter_type == INTERPRETER_AOUT ? 0 : 1),
info); info);
info->load_addr = reloc_func_desc;
info->start_brk = info->brk = elf_brk; info->start_brk = info->brk = elf_brk;
info->end_code = end_code; info->end_code = end_code;
info->start_code = start_code; info->start_code = start_code;

View file

@ -65,18 +65,21 @@ struct target_revectored_struct {
#define TARGET_SHMGET 23 #define TARGET_SHMGET 23
#define TARGET_SHMCTL 24 #define TARGET_SHMCTL 24
#if 0 // To make it compile, even if the definition in syscall.c is bugged
struct target_msgbuf { struct target_msgbuf {
int mtype; int mtype;
char mtext[1]; char mtext[1];
}; };
#endif
struct target_ipc_kludge { struct target_ipc_kludge {
unsigned int msgp; /* Really (struct msgbuf *) */ unsigned int msgp; /* Really (struct msgbuf *) */
int msgtyp; int msgtyp;
}; };
#if 0 // To make it compile, even if the definition in syscall.c is bugged
struct target_ipc_perm { struct target_ipc_perm {
int key; int __key;
unsigned short uid; unsigned short uid;
unsigned short gid; unsigned short gid;
unsigned short cuid; unsigned short cuid;
@ -84,7 +87,9 @@ struct target_ipc_perm {
unsigned short mode; unsigned short mode;
unsigned short seq; unsigned short seq;
}; };
#endif
#if 0 // To make it compile, even if the definition in syscall.c is bugged
struct target_msqid_ds { struct target_msqid_ds {
struct target_ipc_perm msg_perm; struct target_ipc_perm msg_perm;
unsigned int msg_first; /* really struct target_msg* */ unsigned int msg_first; /* really struct target_msg* */
@ -100,7 +105,9 @@ struct target_msqid_ds {
unsigned short msg_lspid; unsigned short msg_lspid;
unsigned short msg_lrpid; unsigned short msg_lrpid;
}; };
#endif
#if 0 // To make it compile, even if the definition in syscall.c is bugged
struct target_shmid_ds { struct target_shmid_ds {
struct target_ipc_perm shm_perm; struct target_ipc_perm shm_perm;
int shm_segsz; int shm_segsz;
@ -114,17 +121,10 @@ struct target_shmid_ds {
unsigned long *shm_pages; unsigned long *shm_pages;
void *attaches; /* really struct shm_desc * */ void *attaches; /* really struct shm_desc * */
}; };
#endif
#define TARGET_IPC_RMID 0 #define TARGET_IPC_RMID 0
#define TARGET_IPC_SET 1 #define TARGET_IPC_SET 1
#define TARGET_IPC_STAT 2 #define TARGET_IPC_STAT 2
union target_semun { #define UNAME_MACHINE "ppc64"
int val;
unsigned int buf; /* really struct semid_ds * */
unsigned int array; /* really unsigned short * */
unsigned int __buf; /* really struct seminfo * */
unsigned int __pad; /* really void* */
};
#define UNAME_MACHINE "ppc"

View file

@ -16,6 +16,7 @@
* task_struct fields in the kernel * task_struct fields in the kernel
*/ */
struct image_info { struct image_info {
target_ulong load_addr;
unsigned long start_code; unsigned long start_code;
unsigned long end_code; unsigned long end_code;
unsigned long start_data; unsigned long start_data;

View file

@ -3368,7 +3368,6 @@ static void init_proc_7455 (CPUPPCState *env)
#if defined (TARGET_PPC64) #if defined (TARGET_PPC64)
/* PowerPC 970 */ /* PowerPC 970 */
#if defined (TODO)
#define POWERPC_INSNS_970 (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ #define POWERPC_INSNS_970 (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \
PPC_64B | PPC_ALTIVEC | \ PPC_64B | PPC_ALTIVEC | \
PPC_64_BRIDGE | PPC_SLBI) PPC_64_BRIDGE | PPC_SLBI)
@ -3408,10 +3407,8 @@ static void init_proc_970 (CPUPPCState *env)
/* Allocate hardware IRQ controller */ /* Allocate hardware IRQ controller */
ppc970_irq_init(env); ppc970_irq_init(env);
} }
#endif /* TODO */
/* PowerPC 970FX (aka G5) */ /* PowerPC 970FX (aka G5) */
#if defined (TODO)
#define POWERPC_INSNS_970FX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ #define POWERPC_INSNS_970FX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \
PPC_64B | PPC_ALTIVEC | \ PPC_64B | PPC_ALTIVEC | \
PPC_64_BRIDGE | PPC_SLBI) PPC_64_BRIDGE | PPC_SLBI)
@ -3451,10 +3448,8 @@ static void init_proc_970FX (CPUPPCState *env)
/* Allocate hardware IRQ controller */ /* Allocate hardware IRQ controller */
ppc970_irq_init(env); ppc970_irq_init(env);
} }
#endif /* TODO */
/* PowerPC 970 GX */ /* PowerPC 970 GX */
#if defined (TODO)
#define POWERPC_INSNS_970GX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ #define POWERPC_INSNS_970GX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \
PPC_64B | PPC_ALTIVEC | \ PPC_64B | PPC_ALTIVEC | \
PPC_64_BRIDGE | PPC_SLBI) PPC_64_BRIDGE | PPC_SLBI)
@ -3494,7 +3489,6 @@ static void init_proc_970GX (CPUPPCState *env)
/* Allocate hardware IRQ controller */ /* Allocate hardware IRQ controller */
ppc970_irq_init(env); ppc970_irq_init(env);
} }
#endif /* TODO */
/* PowerPC 620 */ /* PowerPC 620 */
#if defined (TODO) #if defined (TODO)
@ -4897,50 +4891,28 @@ static ppc_def_t ppc_defs[] = {
/* POWER6A */ /* POWER6A */
POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A, 0xFFFFFFFF, POWER6), POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A, 0xFFFFFFFF, POWER6),
#endif #endif
#if defined (TODO)
/* PowerPC 970 */ /* PowerPC 970 */
POWERPC_DEF("970", CPU_POWERPC_970, 0xFFFFFFFF, 970), POWERPC_DEF("970", CPU_POWERPC_970, 0xFFFFFFFF, 970),
#endif
#if defined (TODO)
/* PowerPC 970FX (G5) */ /* PowerPC 970FX (G5) */
POWERPC_DEF("970fx", CPU_POWERPC_970FX, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx", CPU_POWERPC_970FX, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970FX v1.0 (G5) */ /* PowerPC 970FX v1.0 (G5) */
POWERPC_DEF("970fx1.0", CPU_POWERPC_970FX_v10, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx1.0", CPU_POWERPC_970FX_v10, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970FX v2.0 (G5) */ /* PowerPC 970FX v2.0 (G5) */
POWERPC_DEF("970fx2.0", CPU_POWERPC_970FX_v20, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx2.0", CPU_POWERPC_970FX_v20, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970FX v2.1 (G5) */ /* PowerPC 970FX v2.1 (G5) */
POWERPC_DEF("970fx2.1", CPU_POWERPC_970FX_v21, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx2.1", CPU_POWERPC_970FX_v21, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970FX v3.0 (G5) */ /* PowerPC 970FX v3.0 (G5) */
POWERPC_DEF("970fx3.0", CPU_POWERPC_970FX_v30, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx3.0", CPU_POWERPC_970FX_v30, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970FX v3.1 (G5) */ /* PowerPC 970FX v3.1 (G5) */
POWERPC_DEF("970fx3.1", CPU_POWERPC_970FX_v31, 0xFFFFFFFF, 970FX), POWERPC_DEF("970fx3.1", CPU_POWERPC_970FX_v31, 0xFFFFFFFF, 970FX),
#endif
#if defined (TODO)
/* PowerPC 970GX (G5) */ /* PowerPC 970GX (G5) */
POWERPC_DEF("970gx", CPU_POWERPC_970GX, 0xFFFFFFFF, 970GX), POWERPC_DEF("970gx", CPU_POWERPC_970GX, 0xFFFFFFFF, 970GX),
#endif
#if defined (TODO)
/* PowerPC 970MP */ /* PowerPC 970MP */
POWERPC_DEF("970mp", CPU_POWERPC_970MP, 0xFFFFFFFF, 970), POWERPC_DEF("970mp", CPU_POWERPC_970MP, 0xFFFFFFFF, 970),
#endif
#if defined (TODO)
/* PowerPC 970MP v1.0 */ /* PowerPC 970MP v1.0 */
POWERPC_DEF("970mp1.0", CPU_POWERPC_970MP_v10, 0xFFFFFFFF, 970), POWERPC_DEF("970mp1.0", CPU_POWERPC_970MP_v10, 0xFFFFFFFF, 970),
#endif
#if defined (TODO)
/* PowerPC 970MP v1.1 */ /* PowerPC 970MP v1.1 */
POWERPC_DEF("970mp1.1", CPU_POWERPC_970MP_v11, 0xFFFFFFFF, 970), POWERPC_DEF("970mp1.1", CPU_POWERPC_970MP_v11, 0xFFFFFFFF, 970),
#endif
#if defined (TODO) #if defined (TODO)
/* PowerPC Cell */ /* PowerPC Cell */
POWERPC_DEF("Cell", CPU_POWERPC_CELL, 0xFFFFFFFF, 970), POWERPC_DEF("Cell", CPU_POWERPC_CELL, 0xFFFFFFFF, 970),