Commit 8dfbe4e839ef775be5e365b2e458d4bc43ce600f
1 parent
4acb54ba
microblaze: Add syscall, signal and termbits defs for linux-user.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Showing
4 changed files
with
656 additions
and
0 deletions
linux-user/microblaze/syscall.h
0 → 100644
1 | +#define UNAME_MACHINE "microblaze" | |
2 | + | |
3 | +/* We use microblaze_reg_t to keep things similar to the kernel sources. */ | |
4 | +typedef uint32_t microblaze_reg_t; | |
5 | + | |
6 | +struct target_pt_regs { | |
7 | + microblaze_reg_t r0; | |
8 | + microblaze_reg_t r1; | |
9 | + microblaze_reg_t r2; | |
10 | + microblaze_reg_t r3; | |
11 | + microblaze_reg_t r4; | |
12 | + microblaze_reg_t r5; | |
13 | + microblaze_reg_t r6; | |
14 | + microblaze_reg_t r7; | |
15 | + microblaze_reg_t r8; | |
16 | + microblaze_reg_t r9; | |
17 | + microblaze_reg_t r10; | |
18 | + microblaze_reg_t r11; | |
19 | + microblaze_reg_t r12; | |
20 | + microblaze_reg_t r13; | |
21 | + microblaze_reg_t r14; | |
22 | + microblaze_reg_t r15; | |
23 | + microblaze_reg_t r16; | |
24 | + microblaze_reg_t r17; | |
25 | + microblaze_reg_t r18; | |
26 | + microblaze_reg_t r19; | |
27 | + microblaze_reg_t r20; | |
28 | + microblaze_reg_t r21; | |
29 | + microblaze_reg_t r22; | |
30 | + microblaze_reg_t r23; | |
31 | + microblaze_reg_t r24; | |
32 | + microblaze_reg_t r25; | |
33 | + microblaze_reg_t r26; | |
34 | + microblaze_reg_t r27; | |
35 | + microblaze_reg_t r28; | |
36 | + microblaze_reg_t r29; | |
37 | + microblaze_reg_t r30; | |
38 | + microblaze_reg_t r31; | |
39 | + microblaze_reg_t pc; | |
40 | + microblaze_reg_t msr; | |
41 | + microblaze_reg_t ear; | |
42 | + microblaze_reg_t esr; | |
43 | + microblaze_reg_t fsr; | |
44 | + uint32_t kernel_mode; | |
45 | +}; | ... | ... |
linux-user/microblaze/syscall_nr.h
0 → 100644
1 | +#define TARGET_NR_restart_syscall 0 /* ok */ | |
2 | +#define TARGET_NR_exit 1 /* ok */ | |
3 | +#define TARGET_NR_fork 2 /* not for no MMU - weird */ | |
4 | +#define TARGET_NR_read 3 /* ok */ | |
5 | +#define TARGET_NR_write 4 /* ok */ | |
6 | +#define TARGET_NR_open 5 /* openat */ | |
7 | +#define TARGET_NR_close 6 /* ok */ | |
8 | +#define TARGET_NR_waitpid 7 /* waitid */ | |
9 | +#define TARGET_NR_creat 8 /* openat */ | |
10 | +#define TARGET_NR_link 9 /* linkat */ | |
11 | +#define TARGET_NR_unlink 10 /* unlinkat */ | |
12 | +#define TARGET_NR_execve 11 /* ok */ | |
13 | +#define TARGET_NR_chdir 12 /* ok */ | |
14 | +#define TARGET_NR_time 13 /* obsolete -> sys_gettimeofday */ | |
15 | +#define TARGET_NR_mknod 14 /* mknodat */ | |
16 | +#define TARGET_NR_chmod 15 /* fchmodat */ | |
17 | +#define TARGET_NR_lchown 16 /* ok */ | |
18 | +#define TARGET_NR_break 17 /* don't know */ | |
19 | +#define TARGET_NR_oldstat 18 /* remove */ | |
20 | +#define TARGET_NR_lseek 19 /* ok */ | |
21 | +#define TARGET_NR_getpid 20 /* ok */ | |
22 | +#define TARGET_NR_mount 21 /* ok */ | |
23 | +#define TARGET_NR_umount 22 /* ok */ /* use only umount2 */ | |
24 | +#define TARGET_NR_setuid 23 /* ok */ | |
25 | +#define TARGET_NR_getuid 24 /* ok */ | |
26 | +#define TARGET_NR_stime 25 /* obsolete -> sys_settimeofday */ | |
27 | +#define TARGET_NR_ptrace 26 /* ok */ | |
28 | +#define TARGET_NR_alarm 27 /* obsolete -> sys_setitimer */ | |
29 | +#define TARGET_NR_oldfstat 28 /* remove */ | |
30 | +#define TARGET_NR_pause 29 /* obsolete -> sys_rt_sigtimedwait */ | |
31 | +#define TARGET_NR_utime 30 /* obsolete -> sys_utimesat */ | |
32 | +#define TARGET_NR_stty 31 /* remove */ | |
33 | +#define TARGET_NR_gtty 32 /* remove */ | |
34 | +#define TARGET_NR_access 33 /* faccessat */ | |
35 | +#define TARGET_NR_nice 34 /* can be implemented by sys_setpriority */ | |
36 | +#define TARGET_NR_ftime 35 /* remove */ | |
37 | +#define TARGET_NR_sync 36 /* ok */ | |
38 | +#define TARGET_NR_kill 37 /* ok */ | |
39 | +#define TARGET_NR_rename 38 /* renameat */ | |
40 | +#define TARGET_NR_mkdir 39 /* mkdirat */ | |
41 | +#define TARGET_NR_rmdir 40 /* unlinkat */ | |
42 | +#define TARGET_NR_dup 41 /* ok */ | |
43 | +#define TARGET_NR_pipe 42 /* ok */ | |
44 | +#define TARGET_NR_times 43 /* ok */ | |
45 | +#define TARGET_NR_prof 44 /* remove */ | |
46 | +#define TARGET_NR_brk 45 /* ok -mmu, nommu specific */ | |
47 | +#define TARGET_NR_setgid 46 /* ok */ | |
48 | +#define TARGET_NR_getgid 47 /* ok */ | |
49 | +#define TARGET_NR_signal 48 /* obsolete -> sys_rt_sigaction */ | |
50 | +#define TARGET_NR_geteuid 49 /* ok */ | |
51 | +#define TARGET_NR_getegid 50 /* ok */ | |
52 | +#define TARGET_NR_acct 51 /* add it and then I can disable it */ | |
53 | +#define TARGET_NR_umount2 52 /* remove */ | |
54 | +#define TARGET_NR_lock 53 /* remove */ | |
55 | +#define TARGET_NR_ioctl 54 /* ok */ | |
56 | +#define TARGET_NR_fcntl 55 /* ok -> 64bit version*/ | |
57 | +#define TARGET_NR_mpx 56 /* remove */ | |
58 | +#define TARGET_NR_setpgid 57 /* ok */ | |
59 | +#define TARGET_NR_ulimit 58 /* remove */ | |
60 | +#define TARGET_NR_oldolduname 59 /* remove */ | |
61 | +#define TARGET_NR_umask 60 /* ok */ | |
62 | +#define TARGET_NR_chroot 61 /* ok */ | |
63 | +#define TARGET_NR_ustat 62 /* obsolete -> statfs64 */ | |
64 | +#define TARGET_NR_dup2 63 /* ok */ | |
65 | +#define TARGET_NR_getppid 64 /* ok */ | |
66 | +#define TARGET_NR_getpgrp 65 /* obsolete -> sys_getpgid */ | |
67 | +#define TARGET_NR_setsid 66 /* ok */ | |
68 | +#define TARGET_NR_sigaction 67 /* obsolete -> rt_sigaction */ | |
69 | +#define TARGET_NR_sgetmask 68 /* obsolete -> sys_rt_sigprocmask */ | |
70 | +#define TARGET_NR_ssetmask 69 /* obsolete ->sys_rt_sigprocmask */ | |
71 | +#define TARGET_NR_setreuid 70 /* ok */ | |
72 | +#define TARGET_NR_setregid 71 /* ok */ | |
73 | +#define TARGET_NR_sigsuspend 72 /* obsolete -> rt_sigsuspend */ | |
74 | +#define TARGET_NR_sigpending 73 /* obsolete -> sys_rt_sigpending */ | |
75 | +#define TARGET_NR_sethostname 74 /* ok */ | |
76 | +#define TARGET_NR_setrlimit 75 /* ok */ | |
77 | +#define TARGET_NR_getrlimit 76 /* ok Back compatible 2Gig limited rlimit */ | |
78 | +#define TARGET_NR_getrusage 77 /* ok */ | |
79 | +#define TARGET_NR_gettimeofday 78 /* ok */ | |
80 | +#define TARGET_NR_settimeofday 79 /* ok */ | |
81 | +#define TARGET_NR_getgroups 80 /* ok */ | |
82 | +#define TARGET_NR_setgroups 81 /* ok */ | |
83 | +#define TARGET_NR_select 82 /* obsolete -> sys_pselect7 */ | |
84 | +#define TARGET_NR_symlink 83 /* symlinkat */ | |
85 | +#define TARGET_NR_oldlstat 84 /* remove */ | |
86 | +#define TARGET_NR_readlink 85 /* obsolete -> sys_readlinkat */ | |
87 | +#define TARGET_NR_uselib 86 /* remove */ | |
88 | +#define TARGET_NR_swapon 87 /* ok */ | |
89 | +#define TARGET_NR_reboot 88 /* ok */ | |
90 | +#define TARGET_NR_readdir 89 /* remove ? */ | |
91 | +#define TARGET_NR_mmap 90 /* obsolete -> sys_mmap2 */ | |
92 | +#define TARGET_NR_munmap 91 /* ok - mmu and nommu */ | |
93 | +#define TARGET_NR_truncate 92 /* ok or truncate64 */ | |
94 | +#define TARGET_NR_ftruncate 93 /* ok or ftruncate64 */ | |
95 | +#define TARGET_NR_fchmod 94 /* ok */ | |
96 | +#define TARGET_NR_fchown 95 /* ok */ | |
97 | +#define TARGET_NR_getpriority 96 /* ok */ | |
98 | +#define TARGET_NR_setpriority 97 /* ok */ | |
99 | +#define TARGET_NR_profil 98 /* remove */ | |
100 | +#define TARGET_NR_statfs 99 /* ok or statfs64 */ | |
101 | +#define TARGET_NR_fstatfs 100 /* ok or fstatfs64 */ | |
102 | +#define TARGET_NR_ioperm 101 /* remove */ | |
103 | +#define TARGET_NR_socketcall 102 /* remove */ | |
104 | +#define TARGET_NR_syslog 103 /* ok */ | |
105 | +#define TARGET_NR_setitimer 104 /* ok */ | |
106 | +#define TARGET_NR_getitimer 105 /* ok */ | |
107 | +#define TARGET_NR_stat 106 /* remove */ | |
108 | +#define TARGET_NR_lstat 107 /* remove */ | |
109 | +#define TARGET_NR_fstat 108 /* remove */ | |
110 | +#define TARGET_NR_olduname 109 /* remove */ | |
111 | +#define TARGET_NR_iopl 110 /* remove */ | |
112 | +#define TARGET_NR_vhangup 111 /* ok */ | |
113 | +#define TARGET_NR_idle 112 /* remove */ | |
114 | +#define TARGET_NR_vm86old 113 /* remove */ | |
115 | +#define TARGET_NR_wait4 114 /* obsolete -> waitid */ | |
116 | +#define TARGET_NR_swapoff 115 /* ok */ | |
117 | +#define TARGET_NR_sysinfo 116 /* ok */ | |
118 | +#define TARGET_NR_ipc 117 /* remove - direct call */ | |
119 | +#define TARGET_NR_fsync 118 /* ok */ | |
120 | +#define TARGET_NR_sigreturn 119 /* obsolete -> sys_rt_sigreturn */ | |
121 | +#define TARGET_NR_clone 120 /* ok */ | |
122 | +#define TARGET_NR_setdomainname 121 /* ok */ | |
123 | +#define TARGET_NR_uname 122 /* remove */ | |
124 | +#define TARGET_NR_modify_ldt 123 /* remove */ | |
125 | +#define TARGET_NR_adjtimex 124 /* ok */ | |
126 | +#define TARGET_NR_mprotect 125 /* remove */ | |
127 | +#define TARGET_NR_sigprocmask 126 /* obsolete -> sys_rt_sigprocmask */ | |
128 | +#define TARGET_NR_create_module 127 /* remove */ | |
129 | +#define TARGET_NR_init_module 128 /* ok */ | |
130 | +#define TARGET_NR_delete_module 129 /* ok */ | |
131 | +#define TARGET_NR_get_kernel_syms 130 /* remove */ | |
132 | +#define TARGET_NR_quotactl 131 /* ok */ | |
133 | +#define TARGET_NR_getpgid 132 /* ok */ | |
134 | +#define TARGET_NR_fchdir 133 /* ok */ | |
135 | +#define TARGET_NR_bdflush 134 /* remove */ | |
136 | +#define TARGET_NR_sysfs 135 /* needed for busybox */ | |
137 | +#define TARGET_NR_personality 136 /* ok */ | |
138 | +#define TARGET_NR_afs_syscall 137 /* Syscall for Andrew File System */ | |
139 | +#define TARGET_NR_setfsuid 138 /* ok */ | |
140 | +#define TARGET_NR_setfsgid 139 /* ok */ | |
141 | +#define TARGET_NR__llseek 140 /* remove only lseek */ | |
142 | +#define TARGET_NR_getdents 141 /* ok or getdents64 */ | |
143 | +#define TARGET_NR__newselect 142 /* remove */ | |
144 | +#define TARGET_NR_flock 143 /* ok */ | |
145 | +#define TARGET_NR_msync 144 /* remove */ | |
146 | +#define TARGET_NR_readv 145 /* ok */ | |
147 | +#define TARGET_NR_writev 146 /* ok */ | |
148 | +#define TARGET_NR_getsid 147 /* ok */ | |
149 | +#define TARGET_NR_fdatasync 148 /* ok */ | |
150 | +#define TARGET_NR__sysctl 149 /* remove */ | |
151 | +#define TARGET_NR_mlock 150 /* ok - nommu or mmu */ | |
152 | +#define TARGET_NR_munlock 151 /* ok - nommu or mmu */ | |
153 | +#define TARGET_NR_mlockall 152 /* ok - nommu or mmu */ | |
154 | +#define TARGET_NR_munlockall 153 /* ok - nommu or mmu */ | |
155 | +#define TARGET_NR_sched_setparam 154 /* ok */ | |
156 | +#define TARGET_NR_sched_getparam 155 /* ok */ | |
157 | +#define TARGET_NR_sched_setscheduler 156 /* ok */ | |
158 | +#define TARGET_NR_sched_getscheduler 157 /* ok */ | |
159 | +#define TARGET_NR_sched_yield 158 /* ok */ | |
160 | +#define TARGET_NR_sched_get_priority_max 159 /* ok */ | |
161 | +#define TARGET_NR_sched_get_priority_min 160 /* ok */ | |
162 | +#define TARGET_NR_sched_rr_get_interval 161 /* ok */ | |
163 | +#define TARGET_NR_nanosleep 162 /* ok */ | |
164 | +#define TARGET_NR_mremap 163 /* ok - nommu or mmu */ | |
165 | +#define TARGET_NR_setresuid 164 /* ok */ | |
166 | +#define TARGET_NR_getresuid 165 /* ok */ | |
167 | +#define TARGET_NR_vm86 166 /* remove */ | |
168 | +#define TARGET_NR_query_module 167 /* ok */ | |
169 | +#define TARGET_NR_poll 168 /* obsolete -> sys_ppoll */ | |
170 | +#define TARGET_NR_nfsservctl 169 /* ok */ | |
171 | +#define TARGET_NR_setresgid 170 /* ok */ | |
172 | +#define TARGET_NR_getresgid 171 /* ok */ | |
173 | +#define TARGET_NR_prctl 172 /* ok */ | |
174 | +#define TARGET_NR_rt_sigreturn 173 /* ok */ | |
175 | +#define TARGET_NR_rt_sigaction 174 /* ok */ | |
176 | +#define TARGET_NR_rt_sigprocmask 175 /* ok */ | |
177 | +#define TARGET_NR_rt_sigpending 176 /* ok */ | |
178 | +#define TARGET_NR_rt_sigtimedwait 177 /* ok */ | |
179 | +#define TARGET_NR_rt_sigqueueinfo 178 /* ok */ | |
180 | +#define TARGET_NR_rt_sigsuspend 179 /* ok */ | |
181 | +#define TARGET_NR_pread64 180 /* ok */ | |
182 | +#define TARGET_NR_pwrite64 181 /* ok */ | |
183 | +#define TARGET_NR_chown 182 /* obsolete -> fchownat */ | |
184 | +#define TARGET_NR_getcwd 183 /* ok */ | |
185 | +#define TARGET_NR_capget 184 /* ok */ | |
186 | +#define TARGET_NR_capset 185 /* ok */ | |
187 | +#define TARGET_NR_sigaltstack 186 /* remove */ | |
188 | +#define TARGET_NR_sendfile 187 /* ok -> exist 64bit version*/ | |
189 | +#define TARGET_NR_getpmsg 188 /* remove - some people actually want streams */ | |
190 | +#define TARGET_NR_putpmsg 189 /* remove - some people actually want streams */ | |
191 | +#define TARGET_NR_vfork 190 /* for noMMU - group with clone -> maybe remove */ | |
192 | +#define TARGET_NR_ugetrlimit 191 /* remove - SuS compliant getrlimit */ | |
193 | +#define TARGET_NR_mmap2 192 /* ok */ | |
194 | +#define TARGET_NR_truncate64 193 /* ok */ | |
195 | +#define TARGET_NR_ftruncate64 194 /* ok */ | |
196 | +#define TARGET_NR_stat64 195 /* remove _ARCH_WANT_STAT64 */ | |
197 | +#define TARGET_NR_lstat64 196 /* remove _ARCH_WANT_STAT64 */ | |
198 | +#define TARGET_NR_fstat64 197 /* remove _ARCH_WANT_STAT64 */ | |
199 | +#define TARGET_NR_lchown32 198 /* ok - without 32 */ | |
200 | +#define TARGET_NR_getuid32 199 /* ok - without 32 */ | |
201 | +#define TARGET_NR_getgid32 200 /* ok - without 32 */ | |
202 | +#define TARGET_NR_geteuid32 201 /* ok - without 32 */ | |
203 | +#define TARGET_NR_getegid32 202 /* ok - without 32 */ | |
204 | +#define TARGET_NR_setreuid32 203 /* ok - without 32 */ | |
205 | +#define TARGET_NR_setregid32 204 /* ok - without 32 */ | |
206 | +#define TARGET_NR_getgroups32 205 /* ok - without 32 */ | |
207 | +#define TARGET_NR_setgroups32 206 /* ok - without 32 */ | |
208 | +#define TARGET_NR_fchown32 207 /* ok - without 32 */ | |
209 | +#define TARGET_NR_setresuid32 208 /* ok - without 32 */ | |
210 | +#define TARGET_NR_getresuid32 209 /* ok - without 32 */ | |
211 | +#define TARGET_NR_setresgid32 210 /* ok - without 32 */ | |
212 | +#define TARGET_NR_getresgid32 211 /* ok - without 32 */ | |
213 | +#define TARGET_NR_chown32 212 /* ok - without 32 -obsolete -> fchownat */ | |
214 | +#define TARGET_NR_setuid32 213 /* ok - without 32 */ | |
215 | +#define TARGET_NR_setgid32 214 /* ok - without 32 */ | |
216 | +#define TARGET_NR_setfsuid32 215 /* ok - without 32 */ | |
217 | +#define TARGET_NR_setfsgid32 216 /* ok - without 32 */ | |
218 | +#define TARGET_NR_pivot_root 217 /* ok */ | |
219 | +#define TARGET_NR_mincore 218 /* ok */ | |
220 | +#define TARGET_NR_madvise 219 /* ok */ | |
221 | +//#define TARGET_NR_madvise1 219 /* remove delete when C lib stub is removed */ | |
222 | +#define TARGET_NR_getdents64 220 /* ok */ | |
223 | +#define TARGET_NR_fcntl64 221 /* ok */ | |
224 | +/* 223 is unused */ | |
225 | +#define TARGET_NR_gettid 224 /* ok */ | |
226 | +#define TARGET_NR_readahead 225 /* ok */ | |
227 | +#define TARGET_NR_setxattr 226 /* ok */ | |
228 | +#define TARGET_NR_lsetxattr 227 /* ok */ | |
229 | +#define TARGET_NR_fsetxattr 228 /* ok */ | |
230 | +#define TARGET_NR_getxattr 229 /* ok */ | |
231 | +#define TARGET_NR_lgetxattr 230 /* ok */ | |
232 | +#define TARGET_NR_fgetxattr 231 /* ok */ | |
233 | +#define TARGET_NR_listxattr 232 /* ok */ | |
234 | +#define TARGET_NR_llistxattr 233 /* ok */ | |
235 | +#define TARGET_NR_flistxattr 234 /* ok */ | |
236 | +#define TARGET_NR_removexattr 235 /* ok */ | |
237 | +#define TARGET_NR_lremovexattr 236 /* ok */ | |
238 | +#define TARGET_NR_fremovexattr 237 /* ok */ | |
239 | +#define TARGET_NR_tkill 238 /* ok */ | |
240 | +#define TARGET_NR_sendfile64 239 /* ok */ | |
241 | +#define TARGET_NR_futex 240 /* ok */ | |
242 | +#define TARGET_NR_sched_setaffinity 241 /* ok */ | |
243 | +#define TARGET_NR_sched_getaffinity 242 /* ok */ | |
244 | +#define TARGET_NR_set_thread_area 243 /* remove */ | |
245 | +#define TARGET_NR_get_thread_area 244 /* remove */ | |
246 | +#define TARGET_NR_io_setup 245 /* ok */ | |
247 | +#define TARGET_NR_io_destroy 246 /* ok */ | |
248 | +#define TARGET_NR_io_getevents 247 /* ok */ | |
249 | +#define TARGET_NR_io_submit 248 /* ok */ | |
250 | +#define TARGET_NR_io_cancel 249 /* ok */ | |
251 | +#define TARGET_NR_fadvise64 250 /* remove -> sys_fadvise64_64 */ | |
252 | +/* 251 is available for reuse (was briefly sys_set_zone_reclaim) */ | |
253 | +#define TARGET_NR_exit_group 252 /* ok */ | |
254 | +#define TARGET_NR_lookup_dcookie 253 /* ok */ | |
255 | +#define TARGET_NR_epoll_create 254 /* ok */ | |
256 | +#define TARGET_NR_epoll_ctl 255 /* ok */ | |
257 | +#define TARGET_NR_epoll_wait 256 /* obsolete -> sys_epoll_pwait */ | |
258 | +#define TARGET_NR_remap_file_pages 257 /* only for mmu */ | |
259 | +#define TARGET_NR_set_tid_address 258 /* ok */ | |
260 | +#define TARGET_NR_timer_create 259 /* ok */ | |
261 | +#define TARGET_NR_timer_settime (TARGET_NR_timer_create+1) /* 260 */ /* ok */ | |
262 | +#define TARGET_NR_timer_gettime (TARGET_NR_timer_create+2) /* 261 */ /* ok */ | |
263 | +#define TARGET_NR_timer_getoverrun (TARGET_NR_timer_create+3) /* 262 */ /* ok */ | |
264 | +#define TARGET_NR_timer_delete (TARGET_NR_timer_create+4) /* 263 */ /* ok */ | |
265 | +#define TARGET_NR_clock_settime (TARGET_NR_timer_create+5) /* 264 */ /* ok */ | |
266 | +#define TARGET_NR_clock_gettime (TARGET_NR_timer_create+6) /* 265 */ /* ok */ | |
267 | +#define TARGET_NR_clock_getres (TARGET_NR_timer_create+7) /* 266 */ /* ok */ | |
268 | +#define TARGET_NR_clock_nanosleep (TARGET_NR_timer_create+8) /* 267 */ /* ok */ | |
269 | +#define TARGET_NR_statfs64 268 /* ok */ | |
270 | +#define TARGET_NR_fstatfs64 269 /* ok */ | |
271 | +#define TARGET_NR_tgkill 270 /* ok */ | |
272 | +#define TARGET_NR_utimes 271 /* obsolete -> sys_futimesat */ | |
273 | +#define TARGET_NR_fadvise64_64 272 /* ok */ | |
274 | +#define TARGET_NR_vserver 273 /* ok */ | |
275 | +#define TARGET_NR_mbind 274 /* only for mmu */ | |
276 | +#define TARGET_NR_get_mempolicy 275 /* only for mmu */ | |
277 | +#define TARGET_NR_set_mempolicy 276 /* only for mmu */ | |
278 | +#define TARGET_NR_mq_open 277 /* ok */ | |
279 | +#define TARGET_NR_mq_unlink (TARGET_NR_mq_open+1) /* 278 */ /* ok */ | |
280 | +#define TARGET_NR_mq_timedsend (TARGET_NR_mq_open+2) /* 279 */ /* ok */ | |
281 | +#define TARGET_NR_mq_timedreceive (TARGET_NR_mq_open+3) /* 280 */ /* ok */ | |
282 | +#define TARGET_NR_mq_notify (TARGET_NR_mq_open+4) /* 281 */ /* ok */ | |
283 | +#define TARGET_NR_mq_getsetattr (TARGET_NR_mq_open+5) /* 282 */ /* ok */ | |
284 | +#define TARGET_NR_kexec_load 283 /* ok */ | |
285 | +#define TARGET_NR_waitid 284 /* ok */ | |
286 | +/* #define TARGET_NR_sys_setaltroot 285 */ | |
287 | +#define TARGET_NR_add_key 286 /* ok */ | |
288 | +#define TARGET_NR_request_key 287 /* ok */ | |
289 | +#define TARGET_NR_keyctl 288 /* ok */ | |
290 | +#define TARGET_NR_ioprio_set 289 /* ok */ | |
291 | +#define TARGET_NR_ioprio_get 290 /* ok */ | |
292 | +#define TARGET_NR_inotify_init 291 /* ok */ | |
293 | +#define TARGET_NR_inotify_add_watch 292 /* ok */ | |
294 | +#define TARGET_NR_inotify_rm_watch 293 /* ok */ | |
295 | +#define TARGET_NR_migrate_pages 294 /* mmu */ | |
296 | +#define TARGET_NR_openat 295 /* ok */ | |
297 | +#define TARGET_NR_mkdirat 296 /* ok */ | |
298 | +#define TARGET_NR_mknodat 297 /* ok */ | |
299 | +#define TARGET_NR_fchownat 298 /* ok */ | |
300 | +#define TARGET_NR_futimesat 299 /* obsolete -> sys_utimesat */ | |
301 | +#define TARGET_NR_fstatat64 300 /* stat64 */ | |
302 | +#define TARGET_NR_unlinkat 301 /* ok */ | |
303 | +#define TARGET_NR_renameat 302 /* ok */ | |
304 | +#define TARGET_NR_linkat 303 /* ok */ | |
305 | +#define TARGET_NR_symlinkat 304 /* ok */ | |
306 | +#define TARGET_NR_readlinkat 305 /* ok */ | |
307 | +#define TARGET_NR_fchmodat 306 /* ok */ | |
308 | +#define TARGET_NR_faccessat 307 /* ok */ | |
309 | +#define TARGET_NR_pselect6 308 /* obsolete -> sys_pselect7 */ | |
310 | +#define TARGET_NR_ppoll 309 /* ok */ | |
311 | +#define TARGET_NR_unshare 310 /* ok */ | |
312 | +#define TARGET_NR_set_robust_list 311 /* ok */ | |
313 | +#define TARGET_NR_get_robust_list 312 /* ok */ | |
314 | +#define TARGET_NR_splice 313 /* ok */ | |
315 | +#define TARGET_NR_sync_file_range 314 /* ok */ | |
316 | +#define TARGET_NR_tee 315 /* ok */ | |
317 | +#define TARGET_NR_vmsplice 316 /* ok */ | |
318 | +#define TARGET_NR_move_pages 317 /* mmu */ | |
319 | +#define TARGET_NR_getcpu 318 /* ok */ | |
320 | +#define TARGET_NR_epoll_pwait 319 /* ok */ | |
321 | +#define TARGET_NR_utimensat 320 /* ok */ | |
322 | +#define TARGET_NR_signalfd 321 /* ok */ | |
323 | +#define TARGET_NR_timerfd_create 322 /* ok */ | |
324 | +#define TARGET_NR_eventfd 323 /* ok */ | |
325 | +#define TARGET_NR_fallocate 324 /* ok */ | |
326 | +#define TARGET_NR_semtimedop 325 /* ok - semaphore group */ | |
327 | +#define TARGET_NR_timerfd_settime 326 /* ok */ | |
328 | +#define TARGET_NR_timerfd_gettime 327 /* ok */ | |
329 | +/* sysv ipc syscalls */ | |
330 | +#define TARGET_NR_semctl 328 /* ok */ | |
331 | +#define TARGET_NR_semget 329 /* ok */ | |
332 | +#define TARGET_NR_semop 330 /* ok */ | |
333 | +#define TARGET_NR_msgctl 331 /* ok */ | |
334 | +#define TARGET_NR_msgget 332 /* ok */ | |
335 | +#define TARGET_NR_msgrcv 333 /* ok */ | |
336 | +#define TARGET_NR_msgsnd 334 /* ok */ | |
337 | +#define TARGET_NR_shmat 335 /* ok */ | |
338 | +#define TARGET_NR_shmctl 336 /* ok */ | |
339 | +#define TARGET_NR_shmdt 337 /* ok */ | |
340 | +#define TARGET_NR_shmget 338 /* ok */ | |
341 | + | |
342 | + | |
343 | +#define TARGET_NR_signalfd4 339 /* new */ | |
344 | +#define TARGET_NR_eventfd2 340 /* new */ | |
345 | +#define TARGET_NR_epoll_create1 341 /* new */ | |
346 | +#define TARGET_NR_dup3 342 /* new */ | |
347 | +#define TARGET_NR_pipe2 343 /* new */ | |
348 | +#define TARGET_NR_inotify_init1 344 /* new */ | |
349 | +#define TARGET_NR_socket 345 /* new */ | |
350 | +#define TARGET_NR_socketpair 346 /* new */ | |
351 | +#define TARGET_NR_bind 347 /* new */ | |
352 | +#define TARGET_NR_listen 348 /* new */ | |
353 | +#define TARGET_NR_accept 349 /* new */ | |
354 | +#define TARGET_NR_connect 350 /* new */ | |
355 | +#define TARGET_NR_getsockname 351 /* new */ | |
356 | +#define TARGET_NR_getpeername 352 /* new */ | |
357 | +#define TARGET_NR_sendto 353 /* new */ | |
358 | +#define TARGET_NR_send 354 /* new */ | |
359 | +#define TARGET_NR_recvfrom 355 /* new */ | |
360 | +#define TARGET_NR_recv 356 /* new */ | |
361 | +#define TARGET_NR_setsockopt 357 /* new */ | |
362 | +#define TARGET_NR_getsockopt 358 /* new */ | |
363 | +#define TARGET_NR_shutdown 359 /* new */ | |
364 | +#define TARGET_NR_sendmsg 360 /* new */ | |
365 | +#define TARGET_NR_recvmsg 361 /* new */ | |
366 | +#define TARGET_NR_accept04 362 /* new */ | |
367 | + | |
368 | +#define TARGET_NR_syscalls 363 | |
369 | + | ... | ... |
linux-user/microblaze/target_signal.h
0 → 100644
1 | +#ifndef TARGET_SIGNAL_H | |
2 | +#define TARGET_SIGNAL_H | |
3 | + | |
4 | +#include "cpu.h" | |
5 | + | |
6 | +/* this struct defines a stack used during syscall handling */ | |
7 | + | |
8 | +typedef struct target_sigaltstack { | |
9 | + abi_ulong ss_sp; | |
10 | + abi_ulong ss_size; | |
11 | + abi_long ss_flags; | |
12 | +} target_stack_t; | |
13 | + | |
14 | + | |
15 | +/* | |
16 | + * sigaltstack controls | |
17 | + */ | |
18 | +#define TARGET_SS_ONSTACK 1 | |
19 | +#define TARGET_SS_DISABLE 2 | |
20 | + | |
21 | +#define TARGET_MINSIGSTKSZ 2048 | |
22 | +#define TARGET_SIGSTKSZ 8192 | |
23 | + | |
24 | +static inline abi_ulong get_sp_from_cpustate(CPUMBState *state) | |
25 | +{ | |
26 | + return state->regs[14]; | |
27 | +} | |
28 | + | |
29 | +#endif /* TARGET_SIGNAL_H */ | ... | ... |
linux-user/microblaze/termbits.h
0 → 100644
1 | +/* from asm/termbits.h */ | |
2 | + | |
3 | +#define TARGET_NCCS 19 | |
4 | + | |
5 | +struct target_termios { | |
6 | + unsigned int c_iflag; /* input mode flags */ | |
7 | + unsigned int c_oflag; /* output mode flags */ | |
8 | + unsigned int c_cflag; /* control mode flags */ | |
9 | + unsigned int c_lflag; /* local mode flags */ | |
10 | + unsigned char c_line; /* line discipline */ | |
11 | + unsigned char c_cc[TARGET_NCCS]; /* control characters */ | |
12 | +}; | |
13 | + | |
14 | +/* c_iflag bits */ | |
15 | +#define TARGET_IGNBRK 0000001 | |
16 | +#define TARGET_BRKINT 0000002 | |
17 | +#define TARGET_IGNPAR 0000004 | |
18 | +#define TARGET_PARMRK 0000010 | |
19 | +#define TARGET_INPCK 0000020 | |
20 | +#define TARGET_ISTRIP 0000040 | |
21 | +#define TARGET_INLCR 0000100 | |
22 | +#define TARGET_IGNCR 0000200 | |
23 | +#define TARGET_ICRNL 0000400 | |
24 | +#define TARGET_IUCLC 0001000 | |
25 | +#define TARGET_IXON 0002000 | |
26 | +#define TARGET_IXANY 0004000 | |
27 | +#define TARGET_IXOFF 0010000 | |
28 | +#define TARGET_IMAXBEL 0020000 | |
29 | + | |
30 | +/* c_oflag bits */ | |
31 | +#define TARGET_OPOST 0000001 | |
32 | +#define TARGET_OLCUC 0000002 | |
33 | +#define TARGET_ONLCR 0000004 | |
34 | +#define TARGET_OCRNL 0000010 | |
35 | +#define TARGET_ONOCR 0000020 | |
36 | +#define TARGET_ONLRET 0000040 | |
37 | +#define TARGET_OFILL 0000100 | |
38 | +#define TARGET_OFDEL 0000200 | |
39 | +#define TARGET_NLDLY 0000400 | |
40 | +#define TARGET_NL0 0000000 | |
41 | +#define TARGET_NL1 0000400 | |
42 | +#define TARGET_CRDLY 0003000 | |
43 | +#define TARGET_CR0 0000000 | |
44 | +#define TARGET_CR1 0001000 | |
45 | +#define TARGET_CR2 0002000 | |
46 | +#define TARGET_CR3 0003000 | |
47 | +#define TARGET_TABDLY 0014000 | |
48 | +#define TARGET_TAB0 0000000 | |
49 | +#define TARGET_TAB1 0004000 | |
50 | +#define TARGET_TAB2 0010000 | |
51 | +#define TARGET_TAB3 0014000 | |
52 | +#define TARGET_XTABS 0014000 | |
53 | +#define TARGET_BSDLY 0020000 | |
54 | +#define TARGET_BS0 0000000 | |
55 | +#define TARGET_BS1 0020000 | |
56 | +#define TARGET_VTDLY 0040000 | |
57 | +#define TARGET_VT0 0000000 | |
58 | +#define TARGET_VT1 0040000 | |
59 | +#define TARGET_FFDLY 0100000 | |
60 | +#define TARGET_FF0 0000000 | |
61 | +#define TARGET_FF1 0100000 | |
62 | + | |
63 | +/* c_cflag bit meaning */ | |
64 | +#define TARGET_CBAUD 0010017 | |
65 | +#define TARGET_B0 0000000 /* hang up */ | |
66 | +#define TARGET_B50 0000001 | |
67 | +#define TARGET_B75 0000002 | |
68 | +#define TARGET_B110 0000003 | |
69 | +#define TARGET_B134 0000004 | |
70 | +#define TARGET_B150 0000005 | |
71 | +#define TARGET_B200 0000006 | |
72 | +#define TARGET_B300 0000007 | |
73 | +#define TARGET_B600 0000010 | |
74 | +#define TARGET_B1200 0000011 | |
75 | +#define TARGET_B1800 0000012 | |
76 | +#define TARGET_B2400 0000013 | |
77 | +#define TARGET_B4800 0000014 | |
78 | +#define TARGET_B9600 0000015 | |
79 | +#define TARGET_B19200 0000016 | |
80 | +#define TARGET_B38400 0000017 | |
81 | +#define TARGET_EXTA B19200 | |
82 | +#define TARGET_EXTB B38400 | |
83 | +#define TARGET_CSIZE 0000060 | |
84 | +#define TARGET_CS5 0000000 | |
85 | +#define TARGET_CS6 0000020 | |
86 | +#define TARGET_CS7 0000040 | |
87 | +#define TARGET_CS8 0000060 | |
88 | +#define TARGET_CSTOPB 0000100 | |
89 | +#define TARGET_CREAD 0000200 | |
90 | +#define TARGET_PARENB 0000400 | |
91 | +#define TARGET_PARODD 0001000 | |
92 | +#define TARGET_HUPCL 0002000 | |
93 | +#define TARGET_CLOCAL 0004000 | |
94 | +#define TARGET_CBAUDEX 0010000 | |
95 | +#define TARGET_B57600 0010001 | |
96 | +#define TARGET_B115200 0010002 | |
97 | +#define TARGET_B230400 0010003 | |
98 | +#define TARGET_B460800 0010004 | |
99 | +#define TARGET_CIBAUD 002003600000 /* input baud rate (not used) */ | |
100 | +#define TARGET_CRTSCTS 020000000000 /* flow control */ | |
101 | + | |
102 | +/* c_lflag bits */ | |
103 | +#define TARGET_ISIG 0000001 | |
104 | +#define TARGET_ICANON 0000002 | |
105 | +#define TARGET_XCASE 0000004 | |
106 | +#define TARGET_ECHO 0000010 | |
107 | +#define TARGET_ECHOE 0000020 | |
108 | +#define TARGET_ECHOK 0000040 | |
109 | +#define TARGET_ECHONL 0000100 | |
110 | +#define TARGET_NOFLSH 0000200 | |
111 | +#define TARGET_TOSTOP 0000400 | |
112 | +#define TARGET_ECHOCTL 0001000 | |
113 | +#define TARGET_ECHOPRT 0002000 | |
114 | +#define TARGET_ECHOKE 0004000 | |
115 | +#define TARGET_FLUSHO 0010000 | |
116 | +#define TARGET_PENDIN 0040000 | |
117 | +#define TARGET_IEXTEN 0100000 | |
118 | + | |
119 | +/* c_cc character offsets */ | |
120 | +#define TARGET_VINTR 0 | |
121 | +#define TARGET_VQUIT 1 | |
122 | +#define TARGET_VERASE 2 | |
123 | +#define TARGET_VKILL 3 | |
124 | +#define TARGET_VEOF 4 | |
125 | +#define TARGET_VTIME 5 | |
126 | +#define TARGET_VMIN 6 | |
127 | +#define TARGET_VSWTC 7 | |
128 | +#define TARGET_VSTART 8 | |
129 | +#define TARGET_VSTOP 9 | |
130 | +#define TARGET_VSUSP 10 | |
131 | +#define TARGET_VEOL 11 | |
132 | +#define TARGET_VREPRINT 12 | |
133 | +#define TARGET_VDISCARD 13 | |
134 | +#define TARGET_VWERASE 14 | |
135 | +#define TARGET_VLNEXT 15 | |
136 | +#define TARGET_VEOL2 16 | |
137 | + | |
138 | +/* ioctls */ | |
139 | + | |
140 | +#define TARGET_TCGETS 0x5401 | |
141 | +#define TARGET_TCSETS 0x5402 | |
142 | +#define TARGET_TCSETSW 0x5403 | |
143 | +#define TARGET_TCSETSF 0x5404 | |
144 | +#define TARGET_TCGETA 0x5405 | |
145 | +#define TARGET_TCSETA 0x5406 | |
146 | +#define TARGET_TCSETAW 0x5407 | |
147 | +#define TARGET_TCSETAF 0x5408 | |
148 | +#define TARGET_TCSBRK 0x5409 | |
149 | +#define TARGET_TCXONC 0x540A | |
150 | +#define TARGET_TCFLSH 0x540B | |
151 | + | |
152 | +#define TARGET_TIOCEXCL 0x540C | |
153 | +#define TARGET_TIOCNXCL 0x540D | |
154 | +#define TARGET_TIOCSCTTY 0x540E | |
155 | +#define TARGET_TIOCGPGRP 0x540F | |
156 | +#define TARGET_TIOCSPGRP 0x5410 | |
157 | +#define TARGET_TIOCOUTQ 0x5411 | |
158 | +#define TARGET_TIOCSTI 0x5412 | |
159 | +#define TARGET_TIOCGWINSZ 0x5413 | |
160 | +#define TARGET_TIOCSWINSZ 0x5414 | |
161 | +#define TARGET_TIOCMGET 0x5415 | |
162 | +#define TARGET_TIOCMBIS 0x5416 | |
163 | +#define TARGET_TIOCMBIC 0x5417 | |
164 | +#define TARGET_TIOCMSET 0x5418 | |
165 | +#define TARGET_TIOCGSOFTCAR 0x5419 | |
166 | +#define TARGET_TIOCSSOFTCAR 0x541A | |
167 | +#define TARGET_FIONREAD 0x541B | |
168 | +#define TARGET_TIOCINQ TARGET_FIONREAD | |
169 | +#define TARGET_TIOCLINUX 0x541C | |
170 | +#define TARGET_TIOCCONS 0x541D | |
171 | +#define TARGET_TIOCGSERIAL 0x541E | |
172 | +#define TARGET_TIOCSSERIAL 0x541F | |
173 | +#define TARGET_TIOCPKT 0x5420 | |
174 | +#define TARGET_FIONBIO 0x5421 | |
175 | +#define TARGET_TIOCNOTTY 0x5422 | |
176 | +#define TARGET_TIOCSETD 0x5423 | |
177 | +#define TARGET_TIOCGETD 0x5424 | |
178 | +#define TARGET_TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */ | |
179 | +#define TARGET_TIOCTTYGSTRUCT 0x5426 /* For debugging only */ | |
180 | +#define TARGET_TIOCSBRK 0x5427 /* BSD compatibility */ | |
181 | +#define TARGET_TIOCCBRK 0x5428 /* BSD compatibility */ | |
182 | +#define TARGET_TIOCGSID 0x5429 /* Return the session ID of FD */ | |
183 | +#define TARGET_TIOCGPTN TARGET_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */ | |
184 | +#define TARGET_TIOCSPTLCK TARGET_IOW('T',0x31, int) /* Lock/unlock Pty */ | |
185 | + | |
186 | +#define TARGET_FIONCLEX 0x5450 /* these numbers need to be adjusted. */ | |
187 | +#define TARGET_FIOCLEX 0x5451 | |
188 | +#define TARGET_FIOASYNC 0x5452 | |
189 | +#define TARGET_TIOCSERCONFIG 0x5453 | |
190 | +#define TARGET_TIOCSERGWILD 0x5454 | |
191 | +#define TARGET_TIOCSERSWILD 0x5455 | |
192 | +#define TARGET_TIOCGLCKTRMIOS 0x5456 | |
193 | +#define TARGET_TIOCSLCKTRMIOS 0x5457 | |
194 | +#define TARGET_TIOCSERGSTRUCT 0x5458 /* For debugging only */ | |
195 | +#define TARGET_TIOCSERGETLSR 0x5459 /* Get line status register */ | |
196 | +#define TARGET_TIOCSERGETMULTI 0x545A /* Get multiport config */ | |
197 | +#define TARGET_TIOCSERSETMULTI 0x545B /* Set multiport config */ | |
198 | + | |
199 | +#define TARGET_TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */ | |
200 | +#define TARGET_TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */ | |
201 | +#define TARGET_TIOCGHAYESESP 0x545E /* Get Hayes ESP configuration */ | |
202 | +#define TARGET_TIOCSHAYESESP 0x545F /* Set Hayes ESP configuration */ | |
203 | + | |
204 | +/* Used for packet mode */ | |
205 | +#define TARGET_TIOCPKT_DATA 0 | |
206 | +#define TARGET_TIOCPKT_FLUSHREAD 1 | |
207 | +#define TARGET_TIOCPKT_FLUSHWRITE 2 | |
208 | +#define TARGET_TIOCPKT_STOP 4 | |
209 | +#define TARGET_TIOCPKT_START 8 | |
210 | +#define TARGET_TIOCPKT_NOSTOP 16 | |
211 | +#define TARGET_TIOCPKT_DOSTOP 32 | |
212 | + | |
213 | +#define TARGET_TIOCSER_TEMT 0x01 /* Transmitter physically empty */ | ... | ... |