Commit 92a343da3f50db3130f988b14650eb09e9748d11
1 parent
b8d3f5d1
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
Showing
5 changed files
with
13 additions
and
39 deletions
configure
... | ... | @@ -501,7 +501,7 @@ if test -z "$target_list" ; then |
501 | 501 | fi |
502 | 502 | # the following are Linux specific |
503 | 503 | if [ "$linux_user" = "yes" ] ; then |
504 | - 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" | |
504 | + 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" | |
505 | 505 | fi |
506 | 506 | # the following are Darwin specific |
507 | 507 | if [ "$darwin_user" = "yes" ] ; then | ... | ... |
linux-user/elfload.c
... | ... | @@ -1315,6 +1315,7 @@ int load_elf_binary(struct linux_binprm * bprm, struct target_pt_regs * regs, |
1315 | 1315 | interp_load_addr, |
1316 | 1316 | (interpreter_type == INTERPRETER_AOUT ? 0 : 1), |
1317 | 1317 | info); |
1318 | + info->load_addr = reloc_func_desc; | |
1318 | 1319 | info->start_brk = info->brk = elf_brk; |
1319 | 1320 | info->end_code = end_code; |
1320 | 1321 | info->start_code = start_code; | ... | ... |
linux-user/ppc64/syscall.h
... | ... | @@ -65,18 +65,21 @@ struct target_revectored_struct { |
65 | 65 | #define TARGET_SHMGET 23 |
66 | 66 | #define TARGET_SHMCTL 24 |
67 | 67 | |
68 | +#if 0 // To make it compile, even if the definition in syscall.c is bugged | |
68 | 69 | struct target_msgbuf { |
69 | 70 | int mtype; |
70 | 71 | char mtext[1]; |
71 | 72 | }; |
73 | +#endif | |
72 | 74 | |
73 | 75 | struct target_ipc_kludge { |
74 | 76 | unsigned int msgp; /* Really (struct msgbuf *) */ |
75 | 77 | int msgtyp; |
76 | 78 | }; |
77 | 79 | |
80 | +#if 0 // To make it compile, even if the definition in syscall.c is bugged | |
78 | 81 | struct target_ipc_perm { |
79 | - int key; | |
82 | + int __key; | |
80 | 83 | unsigned short uid; |
81 | 84 | unsigned short gid; |
82 | 85 | unsigned short cuid; |
... | ... | @@ -84,7 +87,9 @@ struct target_ipc_perm { |
84 | 87 | unsigned short mode; |
85 | 88 | unsigned short seq; |
86 | 89 | }; |
90 | +#endif | |
87 | 91 | |
92 | +#if 0 // To make it compile, even if the definition in syscall.c is bugged | |
88 | 93 | struct target_msqid_ds { |
89 | 94 | struct target_ipc_perm msg_perm; |
90 | 95 | unsigned int msg_first; /* really struct target_msg* */ |
... | ... | @@ -100,7 +105,9 @@ struct target_msqid_ds { |
100 | 105 | unsigned short msg_lspid; |
101 | 106 | unsigned short msg_lrpid; |
102 | 107 | }; |
108 | +#endif | |
103 | 109 | |
110 | +#if 0 // To make it compile, even if the definition in syscall.c is bugged | |
104 | 111 | struct target_shmid_ds { |
105 | 112 | struct target_ipc_perm shm_perm; |
106 | 113 | int shm_segsz; |
... | ... | @@ -114,17 +121,10 @@ struct target_shmid_ds { |
114 | 121 | unsigned long *shm_pages; |
115 | 122 | void *attaches; /* really struct shm_desc * */ |
116 | 123 | }; |
124 | +#endif | |
117 | 125 | |
118 | 126 | #define TARGET_IPC_RMID 0 |
119 | 127 | #define TARGET_IPC_SET 1 |
120 | 128 | #define TARGET_IPC_STAT 2 |
121 | 129 | |
122 | -union target_semun { | |
123 | - int val; | |
124 | - unsigned int buf; /* really struct semid_ds * */ | |
125 | - unsigned int array; /* really unsigned short * */ | |
126 | - unsigned int __buf; /* really struct seminfo * */ | |
127 | - unsigned int __pad; /* really void* */ | |
128 | -}; | |
129 | - | |
130 | -#define UNAME_MACHINE "ppc" | |
130 | +#define UNAME_MACHINE "ppc64" | ... | ... |
linux-user/qemu.h
target-ppc/translate_init.c
... | ... | @@ -3368,7 +3368,6 @@ static void init_proc_7455 (CPUPPCState *env) |
3368 | 3368 | |
3369 | 3369 | #if defined (TARGET_PPC64) |
3370 | 3370 | /* PowerPC 970 */ |
3371 | -#if defined (TODO) | |
3372 | 3371 | #define POWERPC_INSNS_970 (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ |
3373 | 3372 | PPC_64B | PPC_ALTIVEC | \ |
3374 | 3373 | PPC_64_BRIDGE | PPC_SLBI) |
... | ... | @@ -3408,10 +3407,8 @@ static void init_proc_970 (CPUPPCState *env) |
3408 | 3407 | /* Allocate hardware IRQ controller */ |
3409 | 3408 | ppc970_irq_init(env); |
3410 | 3409 | } |
3411 | -#endif /* TODO */ | |
3412 | 3410 | |
3413 | 3411 | /* PowerPC 970FX (aka G5) */ |
3414 | -#if defined (TODO) | |
3415 | 3412 | #define POWERPC_INSNS_970FX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ |
3416 | 3413 | PPC_64B | PPC_ALTIVEC | \ |
3417 | 3414 | PPC_64_BRIDGE | PPC_SLBI) |
... | ... | @@ -3451,10 +3448,8 @@ static void init_proc_970FX (CPUPPCState *env) |
3451 | 3448 | /* Allocate hardware IRQ controller */ |
3452 | 3449 | ppc970_irq_init(env); |
3453 | 3450 | } |
3454 | -#endif /* TODO */ | |
3455 | 3451 | |
3456 | 3452 | /* PowerPC 970 GX */ |
3457 | -#if defined (TODO) | |
3458 | 3453 | #define POWERPC_INSNS_970GX (POWERPC_INSNS_WORKS | PPC_FLOAT_FSQRT | \ |
3459 | 3454 | PPC_64B | PPC_ALTIVEC | \ |
3460 | 3455 | PPC_64_BRIDGE | PPC_SLBI) |
... | ... | @@ -3494,7 +3489,6 @@ static void init_proc_970GX (CPUPPCState *env) |
3494 | 3489 | /* Allocate hardware IRQ controller */ |
3495 | 3490 | ppc970_irq_init(env); |
3496 | 3491 | } |
3497 | -#endif /* TODO */ | |
3498 | 3492 | |
3499 | 3493 | /* PowerPC 620 */ |
3500 | 3494 | #if defined (TODO) |
... | ... | @@ -4897,50 +4891,28 @@ static ppc_def_t ppc_defs[] = { |
4897 | 4891 | /* POWER6A */ |
4898 | 4892 | POWERPC_DEF("POWER6A", CPU_POWERPC_POWER6A, 0xFFFFFFFF, POWER6), |
4899 | 4893 | #endif |
4900 | -#if defined (TODO) | |
4901 | 4894 | /* PowerPC 970 */ |
4902 | 4895 | POWERPC_DEF("970", CPU_POWERPC_970, 0xFFFFFFFF, 970), |
4903 | -#endif | |
4904 | -#if defined (TODO) | |
4905 | 4896 | /* PowerPC 970FX (G5) */ |
4906 | 4897 | POWERPC_DEF("970fx", CPU_POWERPC_970FX, 0xFFFFFFFF, 970FX), |
4907 | -#endif | |
4908 | -#if defined (TODO) | |
4909 | 4898 | /* PowerPC 970FX v1.0 (G5) */ |
4910 | 4899 | POWERPC_DEF("970fx1.0", CPU_POWERPC_970FX_v10, 0xFFFFFFFF, 970FX), |
4911 | -#endif | |
4912 | -#if defined (TODO) | |
4913 | 4900 | /* PowerPC 970FX v2.0 (G5) */ |
4914 | 4901 | POWERPC_DEF("970fx2.0", CPU_POWERPC_970FX_v20, 0xFFFFFFFF, 970FX), |
4915 | -#endif | |
4916 | -#if defined (TODO) | |
4917 | 4902 | /* PowerPC 970FX v2.1 (G5) */ |
4918 | 4903 | POWERPC_DEF("970fx2.1", CPU_POWERPC_970FX_v21, 0xFFFFFFFF, 970FX), |
4919 | -#endif | |
4920 | -#if defined (TODO) | |
4921 | 4904 | /* PowerPC 970FX v3.0 (G5) */ |
4922 | 4905 | POWERPC_DEF("970fx3.0", CPU_POWERPC_970FX_v30, 0xFFFFFFFF, 970FX), |
4923 | -#endif | |
4924 | -#if defined (TODO) | |
4925 | 4906 | /* PowerPC 970FX v3.1 (G5) */ |
4926 | 4907 | POWERPC_DEF("970fx3.1", CPU_POWERPC_970FX_v31, 0xFFFFFFFF, 970FX), |
4927 | -#endif | |
4928 | -#if defined (TODO) | |
4929 | 4908 | /* PowerPC 970GX (G5) */ |
4930 | 4909 | POWERPC_DEF("970gx", CPU_POWERPC_970GX, 0xFFFFFFFF, 970GX), |
4931 | -#endif | |
4932 | -#if defined (TODO) | |
4933 | 4910 | /* PowerPC 970MP */ |
4934 | 4911 | POWERPC_DEF("970mp", CPU_POWERPC_970MP, 0xFFFFFFFF, 970), |
4935 | -#endif | |
4936 | -#if defined (TODO) | |
4937 | 4912 | /* PowerPC 970MP v1.0 */ |
4938 | 4913 | POWERPC_DEF("970mp1.0", CPU_POWERPC_970MP_v10, 0xFFFFFFFF, 970), |
4939 | -#endif | |
4940 | -#if defined (TODO) | |
4941 | 4914 | /* PowerPC 970MP v1.1 */ |
4942 | 4915 | POWERPC_DEF("970mp1.1", CPU_POWERPC_970MP_v11, 0xFFFFFFFF, 970), |
4943 | -#endif | |
4944 | 4916 | #if defined (TODO) |
4945 | 4917 | /* PowerPC Cell */ |
4946 | 4918 | POWERPC_DEF("Cell", CPU_POWERPC_CELL, 0xFFFFFFFF, 970), | ... | ... |