Commit 6180a1818ad1f6147983e48314ab6cbf49d4f084
1 parent
d3eead2e
new directory structure
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@391 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
5 changed files
with
17 additions
and
306 deletions
exec.c
@@ -27,13 +27,8 @@ | @@ -27,13 +27,8 @@ | ||
27 | #include <sys/mman.h> | 27 | #include <sys/mman.h> |
28 | 28 | ||
29 | #include "config.h" | 29 | #include "config.h" |
30 | -#ifdef TARGET_I386 | ||
31 | -#include "cpu-i386.h" | ||
32 | -#endif | ||
33 | -#ifdef TARGET_ARM | ||
34 | -#include "cpu-arm.h" | ||
35 | -#endif | ||
36 | -#include "exec.h" | 30 | +#include "cpu.h" |
31 | +#include "exec-all.h" | ||
37 | 32 | ||
38 | //#define DEBUG_TB_INVALIDATE | 33 | //#define DEBUG_TB_INVALIDATE |
39 | //#define DEBUG_FLUSH | 34 | //#define DEBUG_FLUSH |
gdbstub.c
@@ -28,14 +28,9 @@ | @@ -28,14 +28,9 @@ | ||
28 | #include <signal.h> | 28 | #include <signal.h> |
29 | 29 | ||
30 | #include "config.h" | 30 | #include "config.h" |
31 | -#ifdef TARGET_I386 | ||
32 | -#include "cpu-i386.h" | ||
33 | -#endif | ||
34 | -#ifdef TARGET_ARM | ||
35 | -#include "cpu-arm.h" | ||
36 | -#endif | 31 | +#include "cpu.h" |
37 | #include "thunk.h" | 32 | #include "thunk.h" |
38 | -#include "exec.h" | 33 | +#include "exec-all.h" |
39 | 34 | ||
40 | //#define DEBUG_GDB | 35 | //#define DEBUG_GDB |
41 | 36 |
hw/vga.c
linux-user/qemu.h
@@ -6,15 +6,8 @@ | @@ -6,15 +6,8 @@ | ||
6 | #include <signal.h> | 6 | #include <signal.h> |
7 | #include "syscall_defs.h" | 7 | #include "syscall_defs.h" |
8 | 8 | ||
9 | -#if defined(TARGET_I386) | ||
10 | -#include "cpu-i386.h" | ||
11 | -#include "syscall-i386.h" | ||
12 | -#elif defined(TARGET_ARM) | ||
13 | -#include "cpu-arm.h" | ||
14 | -#include "syscall-arm.h" | ||
15 | -#else | ||
16 | -#error unsupported target CPU | ||
17 | -#endif | 9 | +#include "cpu.h" |
10 | +#include "syscall.h" | ||
18 | 11 | ||
19 | /* This struct is used to hold certain information about the image. | 12 | /* This struct is used to hold certain information about the image. |
20 | * Basically, it replicates in user space what would be certain | 13 | * Basically, it replicates in user space what would be certain |
linux-user/syscall_defs.h
@@ -4,284 +4,7 @@ | @@ -4,284 +4,7 @@ | ||
4 | most of them stay the same, so we handle it by puting ifdefs if | 4 | most of them stay the same, so we handle it by puting ifdefs if |
5 | necessary */ | 5 | necessary */ |
6 | 6 | ||
7 | -#define TARGET_NR_exit 1 | ||
8 | -#define TARGET_NR_fork 2 | ||
9 | -#define TARGET_NR_read 3 | ||
10 | -#define TARGET_NR_write 4 | ||
11 | -#define TARGET_NR_open 5 | ||
12 | -#define TARGET_NR_close 6 | ||
13 | -#define TARGET_NR_waitpid 7 | ||
14 | -#define TARGET_NR_creat 8 | ||
15 | -#define TARGET_NR_link 9 | ||
16 | -#define TARGET_NR_unlink 10 | ||
17 | -#define TARGET_NR_execve 11 | ||
18 | -#define TARGET_NR_chdir 12 | ||
19 | -#define TARGET_NR_time 13 | ||
20 | -#define TARGET_NR_mknod 14 | ||
21 | -#define TARGET_NR_chmod 15 | ||
22 | -#define TARGET_NR_lchown 16 | ||
23 | -#define TARGET_NR_break 17 | ||
24 | -#define TARGET_NR_oldstat 18 | ||
25 | -#define TARGET_NR_lseek 19 | ||
26 | -#define TARGET_NR_getpid 20 | ||
27 | -#define TARGET_NR_mount 21 | ||
28 | -#define TARGET_NR_umount 22 | ||
29 | -#define TARGET_NR_setuid 23 | ||
30 | -#define TARGET_NR_getuid 24 | ||
31 | -#define TARGET_NR_stime 25 | ||
32 | -#define TARGET_NR_ptrace 26 | ||
33 | -#define TARGET_NR_alarm 27 | ||
34 | -#define TARGET_NR_oldfstat 28 | ||
35 | -#define TARGET_NR_pause 29 | ||
36 | -#define TARGET_NR_utime 30 | ||
37 | -#define TARGET_NR_stty 31 | ||
38 | -#define TARGET_NR_gtty 32 | ||
39 | -#define TARGET_NR_access 33 | ||
40 | -#define TARGET_NR_nice 34 | ||
41 | -#define TARGET_NR_ftime 35 | ||
42 | -#define TARGET_NR_sync 36 | ||
43 | -#define TARGET_NR_kill 37 | ||
44 | -#define TARGET_NR_rename 38 | ||
45 | -#define TARGET_NR_mkdir 39 | ||
46 | -#define TARGET_NR_rmdir 40 | ||
47 | -#define TARGET_NR_dup 41 | ||
48 | -#define TARGET_NR_pipe 42 | ||
49 | -#define TARGET_NR_times 43 | ||
50 | -#define TARGET_NR_prof 44 | ||
51 | -#define TARGET_NR_brk 45 | ||
52 | -#define TARGET_NR_setgid 46 | ||
53 | -#define TARGET_NR_getgid 47 | ||
54 | -#define TARGET_NR_signal 48 | ||
55 | -#define TARGET_NR_geteuid 49 | ||
56 | -#define TARGET_NR_getegid 50 | ||
57 | -#define TARGET_NR_acct 51 | ||
58 | -#define TARGET_NR_umount2 52 | ||
59 | -#define TARGET_NR_lock 53 | ||
60 | -#define TARGET_NR_ioctl 54 | ||
61 | -#define TARGET_NR_fcntl 55 | ||
62 | -#define TARGET_NR_mpx 56 | ||
63 | -#define TARGET_NR_setpgid 57 | ||
64 | -#define TARGET_NR_ulimit 58 | ||
65 | -#define TARGET_NR_oldolduname 59 | ||
66 | -#define TARGET_NR_umask 60 | ||
67 | -#define TARGET_NR_chroot 61 | ||
68 | -#define TARGET_NR_ustat 62 | ||
69 | -#define TARGET_NR_dup2 63 | ||
70 | -#define TARGET_NR_getppid 64 | ||
71 | -#define TARGET_NR_getpgrp 65 | ||
72 | -#define TARGET_NR_setsid 66 | ||
73 | -#define TARGET_NR_sigaction 67 | ||
74 | -#define TARGET_NR_sgetmask 68 | ||
75 | -#define TARGET_NR_ssetmask 69 | ||
76 | -#define TARGET_NR_setreuid 70 | ||
77 | -#define TARGET_NR_setregid 71 | ||
78 | -#define TARGET_NR_sigsuspend 72 | ||
79 | -#define TARGET_NR_sigpending 73 | ||
80 | -#define TARGET_NR_sethostname 74 | ||
81 | -#define TARGET_NR_setrlimit 75 | ||
82 | -#define TARGET_NR_getrlimit 76 /* Back compatible 2Gig limited rlimit */ | ||
83 | -#define TARGET_NR_getrusage 77 | ||
84 | -#define TARGET_NR_gettimeofday 78 | ||
85 | -#define TARGET_NR_settimeofday 79 | ||
86 | -#define TARGET_NR_getgroups 80 | ||
87 | -#define TARGET_NR_setgroups 81 | ||
88 | -#define TARGET_NR_select 82 | ||
89 | -#define TARGET_NR_symlink 83 | ||
90 | -#define TARGET_NR_oldlstat 84 | ||
91 | -#define TARGET_NR_readlink 85 | ||
92 | -#define TARGET_NR_uselib 86 | ||
93 | -#define TARGET_NR_swapon 87 | ||
94 | -#define TARGET_NR_reboot 88 | ||
95 | -#define TARGET_NR_readdir 89 | ||
96 | -#define TARGET_NR_mmap 90 | ||
97 | -#define TARGET_NR_munmap 91 | ||
98 | -#define TARGET_NR_truncate 92 | ||
99 | -#define TARGET_NR_ftruncate 93 | ||
100 | -#define TARGET_NR_fchmod 94 | ||
101 | -#define TARGET_NR_fchown 95 | ||
102 | -#define TARGET_NR_getpriority 96 | ||
103 | -#define TARGET_NR_setpriority 97 | ||
104 | -#define TARGET_NR_profil 98 | ||
105 | -#define TARGET_NR_statfs 99 | ||
106 | -#define TARGET_NR_fstatfs 100 | ||
107 | -#define TARGET_NR_ioperm 101 | ||
108 | -#define TARGET_NR_socketcall 102 | ||
109 | -#define TARGET_NR_syslog 103 | ||
110 | -#define TARGET_NR_setitimer 104 | ||
111 | -#define TARGET_NR_getitimer 105 | ||
112 | -#define TARGET_NR_stat 106 | ||
113 | -#define TARGET_NR_lstat 107 | ||
114 | -#define TARGET_NR_fstat 108 | ||
115 | -#define TARGET_NR_olduname 109 | ||
116 | -#define TARGET_NR_iopl 110 | ||
117 | -#define TARGET_NR_vhangup 111 | ||
118 | -#define TARGET_NR_idle 112 | ||
119 | -#define TARGET_NR_vm86old 113 | ||
120 | -#define TARGET_NR_wait4 114 | ||
121 | -#define TARGET_NR_swapoff 115 | ||
122 | -#define TARGET_NR_sysinfo 116 | ||
123 | -#define TARGET_NR_ipc 117 | ||
124 | -#define TARGET_NR_fsync 118 | ||
125 | -#define TARGET_NR_sigreturn 119 | ||
126 | -#define TARGET_NR_clone 120 | ||
127 | -#define TARGET_NR_setdomainname 121 | ||
128 | -#define TARGET_NR_uname 122 | ||
129 | -#define TARGET_NR_modify_ldt 123 | ||
130 | -#define TARGET_NR_adjtimex 124 | ||
131 | -#define TARGET_NR_mprotect 125 | ||
132 | -#define TARGET_NR_sigprocmask 126 | ||
133 | -#define TARGET_NR_create_module 127 | ||
134 | -#define TARGET_NR_init_module 128 | ||
135 | -#define TARGET_NR_delete_module 129 | ||
136 | -#define TARGET_NR_get_kernel_syms 130 | ||
137 | -#define TARGET_NR_quotactl 131 | ||
138 | -#define TARGET_NR_getpgid 132 | ||
139 | -#define TARGET_NR_fchdir 133 | ||
140 | -#define TARGET_NR_bdflush 134 | ||
141 | -#define TARGET_NR_sysfs 135 | ||
142 | -#define TARGET_NR_personality 136 | ||
143 | -#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ | ||
144 | -#define TARGET_NR_setfsuid 138 | ||
145 | -#define TARGET_NR_setfsgid 139 | ||
146 | -#define TARGET_NR__llseek 140 | ||
147 | -#define TARGET_NR_getdents 141 | ||
148 | -#define TARGET_NR__newselect 142 | ||
149 | -#define TARGET_NR_flock 143 | ||
150 | -#define TARGET_NR_msync 144 | ||
151 | -#define TARGET_NR_readv 145 | ||
152 | -#define TARGET_NR_writev 146 | ||
153 | -#define TARGET_NR_getsid 147 | ||
154 | -#define TARGET_NR_fdatasync 148 | ||
155 | -#define TARGET_NR__sysctl 149 | ||
156 | -#define TARGET_NR_mlock 150 | ||
157 | -#define TARGET_NR_munlock 151 | ||
158 | -#define TARGET_NR_mlockall 152 | ||
159 | -#define TARGET_NR_munlockall 153 | ||
160 | -#define TARGET_NR_sched_setparam 154 | ||
161 | -#define TARGET_NR_sched_getparam 155 | ||
162 | -#define TARGET_NR_sched_setscheduler 156 | ||
163 | -#define TARGET_NR_sched_getscheduler 157 | ||
164 | -#define TARGET_NR_sched_yield 158 | ||
165 | -#define TARGET_NR_sched_get_priority_max 159 | ||
166 | -#define TARGET_NR_sched_get_priority_min 160 | ||
167 | -#define TARGET_NR_sched_rr_get_interval 161 | ||
168 | -#define TARGET_NR_nanosleep 162 | ||
169 | -#define TARGET_NR_mremap 163 | ||
170 | -#define TARGET_NR_setresuid 164 | ||
171 | -#define TARGET_NR_getresuid 165 | ||
172 | -#define TARGET_NR_vm86 166 | ||
173 | -#define TARGET_NR_query_module 167 | ||
174 | -#define TARGET_NR_poll 168 | ||
175 | -#define TARGET_NR_nfsservctl 169 | ||
176 | -#define TARGET_NR_setresgid 170 | ||
177 | -#define TARGET_NR_getresgid 171 | ||
178 | -#define TARGET_NR_prctl 172 | ||
179 | -#define TARGET_NR_rt_sigreturn 173 | ||
180 | -#define TARGET_NR_rt_sigaction 174 | ||
181 | -#define TARGET_NR_rt_sigprocmask 175 | ||
182 | -#define TARGET_NR_rt_sigpending 176 | ||
183 | -#define TARGET_NR_rt_sigtimedwait 177 | ||
184 | -#define TARGET_NR_rt_sigqueueinfo 178 | ||
185 | -#define TARGET_NR_rt_sigsuspend 179 | ||
186 | -#define TARGET_NR_pread 180 | ||
187 | -#define TARGET_NR_pwrite 181 | ||
188 | -#define TARGET_NR_chown 182 | ||
189 | -#define TARGET_NR_getcwd 183 | ||
190 | -#define TARGET_NR_capget 184 | ||
191 | -#define TARGET_NR_capset 185 | ||
192 | -#define TARGET_NR_sigaltstack 186 | ||
193 | -#define TARGET_NR_sendfile 187 | ||
194 | -#define TARGET_NR_getpmsg 188 /* some people actually want streams */ | ||
195 | -#define TARGET_NR_putpmsg 189 /* some people actually want streams */ | ||
196 | -#define TARGET_NR_vfork 190 | ||
197 | -#define TARGET_NR_ugetrlimit 191 /* SuS compliant getrlimit */ | ||
198 | -#define TARGET_NR_mmap2 192 | ||
199 | -#define TARGET_NR_truncate64 193 | ||
200 | -#define TARGET_NR_ftruncate64 194 | ||
201 | -#define TARGET_NR_stat64 195 | ||
202 | -#define TARGET_NR_lstat64 196 | ||
203 | -#define TARGET_NR_fstat64 197 | ||
204 | -#define TARGET_NR_lchown32 198 | ||
205 | -#define TARGET_NR_getuid32 199 | ||
206 | -#define TARGET_NR_getgid32 200 | ||
207 | -#define TARGET_NR_geteuid32 201 | ||
208 | -#define TARGET_NR_getegid32 202 | ||
209 | -#define TARGET_NR_setreuid32 203 | ||
210 | -#define TARGET_NR_setregid32 204 | ||
211 | -#define TARGET_NR_getgroups32 205 | ||
212 | -#define TARGET_NR_setgroups32 206 | ||
213 | -#define TARGET_NR_fchown32 207 | ||
214 | -#define TARGET_NR_setresuid32 208 | ||
215 | -#define TARGET_NR_getresuid32 209 | ||
216 | -#define TARGET_NR_setresgid32 210 | ||
217 | -#define TARGET_NR_getresgid32 211 | ||
218 | -#define TARGET_NR_chown32 212 | ||
219 | -#define TARGET_NR_setuid32 213 | ||
220 | -#define TARGET_NR_setgid32 214 | ||
221 | -#define TARGET_NR_setfsuid32 215 | ||
222 | -#define TARGET_NR_setfsgid32 216 | ||
223 | - | ||
224 | -#if defined(TARGET_I386) | ||
225 | -#define TARGET_NR_pivot_root 217 | ||
226 | -#define TARGET_NR_mincore 218 | ||
227 | -#define TARGET_NR_madvise 219 | ||
228 | -#define TARGET_NR_madvise1 219 /* delete when C lib stub is removed */ | ||
229 | -#define TARGET_NR_getdents64 220 | ||
230 | -#endif | ||
231 | - | ||
232 | -#if defined(TARGET_ARM) | ||
233 | -#define TARGET_NR_getdents64 217 | ||
234 | -#define TARGET_NR_pivot_root 218 | ||
235 | -#define TARGET_NR_mincore 219 | ||
236 | -#define TARGET_NR_madvise 220 | ||
237 | -#endif | ||
238 | - | ||
239 | -#define TARGET_NR_fcntl64 221 | ||
240 | -#define TARGET_NR_security 223 /* syscall for security modules */ | ||
241 | -#define TARGET_NR_gettid 224 | ||
242 | -#define TARGET_NR_readahead 225 | ||
243 | -#define TARGET_NR_setxattr 226 | ||
244 | -#define TARGET_NR_lsetxattr 227 | ||
245 | -#define TARGET_NR_fsetxattr 228 | ||
246 | -#define TARGET_NR_getxattr 229 | ||
247 | -#define TARGET_NR_lgetxattr 230 | ||
248 | -#define TARGET_NR_fgetxattr 231 | ||
249 | -#define TARGET_NR_listxattr 232 | ||
250 | -#define TARGET_NR_llistxattr 233 | ||
251 | -#define TARGET_NR_flistxattr 234 | ||
252 | -#define TARGET_NR_removexattr 235 | ||
253 | -#define TARGET_NR_lremovexattr 236 | ||
254 | -#define TARGET_NR_fremovexattr 237 | ||
255 | -#define TARGET_NR_tkill 238 | ||
256 | -#define TARGET_NR_sendfile64 239 | ||
257 | -#define TARGET_NR_futex 240 | ||
258 | -#define TARGET_NR_sched_setaffinity 241 | ||
259 | -#define TARGET_NR_sched_getaffinity 242 | ||
260 | -#define TARGET_NR_set_thread_area 243 | ||
261 | -#define TARGET_NR_get_thread_area 244 | ||
262 | -#define TARGET_NR_io_setup 245 | ||
263 | -#define TARGET_NR_io_destroy 246 | ||
264 | -#define TARGET_NR_io_getevents 247 | ||
265 | -#define TARGET_NR_io_submit 248 | ||
266 | -#define TARGET_NR_io_cancel 249 | ||
267 | -#define TARGET_NR_fadvise64 250 | ||
268 | - | ||
269 | -#define TARGET_NR_exit_group 252 | ||
270 | -#define TARGET_NR_lookup_dcookie 253 | ||
271 | -#define TARGET_NR_epoll_create 254 | ||
272 | -#define TARGET_NR_epoll_ctl 255 | ||
273 | -#define TARGET_NR_epoll_wait 256 | ||
274 | -#define TARGET_NR_remap_file_pages 257 | ||
275 | -#define TARGET_NR_set_tid_address 258 | ||
276 | -#define TARGET_NR_timer_create 259 | ||
277 | -#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) | ||
278 | -#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) | ||
279 | -#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) | ||
280 | -#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) | ||
281 | -#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) | ||
282 | -#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) | ||
283 | -#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) | ||
284 | -#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) | 7 | +#include "syscall_nr.h" |
285 | 8 | ||
286 | #define SOCKOP_socket 1 | 9 | #define SOCKOP_socket 1 |
287 | #define SOCKOP_bind 2 | 10 | #define SOCKOP_bind 2 |
@@ -321,7 +44,7 @@ | @@ -321,7 +44,7 @@ | ||
321 | #define TARGET_IOC_WRITE 1U | 44 | #define TARGET_IOC_WRITE 1U |
322 | #define TARGET_IOC_READ 2U | 45 | #define TARGET_IOC_READ 2U |
323 | 46 | ||
324 | -#elif defined(TARGET_PPC) || defined(TARGET_ALPHA) | 47 | +#elif defined(TARGET_PPC) || defined(TARGET_ALPHA) || defined(TARGET_SPARC) |
325 | 48 | ||
326 | #define TARGET_IOC_SIZEBITS 13 | 49 | #define TARGET_IOC_SIZEBITS 13 |
327 | #define TARGET_IOC_DIRBITS 3 | 50 | #define TARGET_IOC_DIRBITS 3 |
@@ -392,6 +115,11 @@ struct target_tms { | @@ -392,6 +115,11 @@ struct target_tms { | ||
392 | target_clock_t tms_cstime; | 115 | target_clock_t tms_cstime; |
393 | }; | 116 | }; |
394 | 117 | ||
118 | +struct target_utimbuf { | ||
119 | + target_long actime; | ||
120 | + target_long modtime; | ||
121 | +}; | ||
122 | + | ||
395 | struct target_sel_arg_struct { | 123 | struct target_sel_arg_struct { |
396 | target_long n; | 124 | target_long n; |
397 | target_long inp, outp, exp; | 125 | target_long inp, outp, exp; |
@@ -551,7 +279,7 @@ struct target_sigaction; | @@ -551,7 +279,7 @@ struct target_sigaction; | ||
551 | int do_sigaction(int sig, const struct target_sigaction *act, | 279 | int do_sigaction(int sig, const struct target_sigaction *act, |
552 | struct target_sigaction *oact); | 280 | struct target_sigaction *oact); |
553 | 281 | ||
554 | -#if defined(TARGET_I386) || defined(TARGET_ARM) | 282 | +#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) |
555 | 283 | ||
556 | #define TARGET_SA_NOCLDSTOP 0x00000001 | 284 | #define TARGET_SA_NOCLDSTOP 0x00000001 |
557 | #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ | 285 | #define TARGET_SA_NOCLDWAIT 0x00000002 /* not supported yet */ |
@@ -936,7 +664,7 @@ struct target_pollfd { | @@ -936,7 +664,7 @@ struct target_pollfd { | ||
936 | #define TARGET_HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ | 664 | #define TARGET_HDIO_SET_PIO_MODE 0x0327 /* reconfig interface to new speed */ |
937 | 665 | ||
938 | 666 | ||
939 | -#if defined(TARGET_I386) || defined(TARGET_ARM) | 667 | +#if defined(TARGET_I386) || defined(TARGET_ARM) || defined(TARGET_SPARC) |
940 | 668 | ||
941 | /* 0x54 is just a magic number to make these relatively unique ('T') */ | 669 | /* 0x54 is just a magic number to make these relatively unique ('T') */ |
942 | 670 |