blob: 4b54a5414357dc86436e54e21dcb777e9c7454ab [file] [log] [blame]
/*
* Copyright (c) 2010-2013, 2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
* not be construed as granting a license to any other intellectual
* property including but not limited to intellectual property relating
* to a hardware implementation of the functionality of the software
* licensed hereunder. You may use the software subject to the license
* terms below provided that you ensure that this notice is replicated
* unmodified and in its entirety in all distributions of the software,
* modified or unmodified, in source code or in binary form.
*
* Copyright (c) 2003-2005 The Regents of The University of Michigan
* Copyright (c) 2007-2008 The Florida State University
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met: redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer;
* redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution;
* neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Authors: Korey Sewell
* Stephen Hines
* Ali Saidi
* Giacomo Gabrielli
*/
#include "arch/arm/linux/process.hh"
#include <sys/syscall.h>
#include "arch/arm/isa_traits.hh"
#include "arch/arm/linux/linux.hh"
#include "base/loader/object_file.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "kern/linux/linux.hh"
#include "sim/process.hh"
#include "sim/syscall_desc.hh"
#include "sim/syscall_emul.hh"
#include "sim/system.hh"
using namespace std;
using namespace ArmISA;
namespace
{
class ArmLinuxObjectFileLoader : public Process::Loader
{
public:
Process *
load(ProcessParams *params, ObjectFile *obj_file) override
{
auto arch = obj_file->getArch();
auto opsys = obj_file->getOpSys();
if (arch != ObjectFile::Arm && arch != ObjectFile::Thumb &&
arch != ObjectFile::Arm64) {
return nullptr;
}
if (opsys == ObjectFile::UnknownOpSys) {
warn("Unknown operating system; assuming Linux.");
opsys = ObjectFile::Linux;
}
if (opsys == ObjectFile::LinuxArmOABI) {
fatal("gem5 does not support ARM OABI binaries. Please recompile "
"with an EABI compiler.");
}
if (opsys != ObjectFile::Linux)
return nullptr;
if (arch == ObjectFile::Arm64)
return new ArmLinuxProcess64(params, obj_file, arch);
else
return new ArmLinuxProcess32(params, obj_file, arch);
}
};
ArmLinuxObjectFileLoader loader;
} // anonymous namespace
/// Target uname() handler.
static SyscallReturn
unameFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
int index = 0;
auto process = tc->getProcessPtr();
TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index));
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "m5.eecs.umich.edu");
strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
strcpy(name->machine, "armv7l");
name.copyOut(tc->getVirtProxy());
return 0;
}
/// Target uname() handler.
static SyscallReturn
unameFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
int index = 0;
auto process = tc->getProcessPtr();
TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index));
strcpy(name->sysname, "Linux");
strcpy(name->nodename, "gem5");
strcpy(name->release, process->release.c_str());
strcpy(name->version, "#1 SMP Sat Dec 1 00:00:00 GMT 2012");
strcpy(name->machine, "armv8l");
name.copyOut(tc->getVirtProxy());
return 0;
}
/// Target set_tls() handler.
static SyscallReturn
setTLSFunc32(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
int index = 0;
auto process = tc->getProcessPtr();
uint32_t tlsPtr = process->getSyscallArg(tc, index);
tc->getVirtProxy().writeBlob(ArmLinuxProcess32::commPage + 0x0ff0,
&tlsPtr, sizeof(tlsPtr));
tc->setMiscReg(MISCREG_TPIDRURO,tlsPtr);
return 0;
}
static SyscallReturn
setTLSFunc64(SyscallDesc *desc, int callnum, ThreadContext *tc)
{
int index = 0;
auto process = tc->getProcessPtr();
uint32_t tlsPtr = process->getSyscallArg(tc, index);
tc->setMiscReg(MISCREG_TPIDRRO_EL0, tlsPtr);
return 0;
}
static SyscallDescABI<DefaultSyscallABI> syscallDescs32[] = {
/* 0 */ { "syscall" },
/* 1 */ { "exit", exitFunc },
/* 2 */ { "fork" },
/* 3 */ { "read", readFunc<ArmLinux32> },
/* 4 */ { "write", writeFunc<ArmLinux32> },
/* 5 */ { "open", openFunc<ArmLinux32> },
/* 6 */ { "close", closeFunc },
/* 7 */ { "unused#7" },
/* 8 */ { "creat" },
/* 9 */ { "link" },
/* 10 */ { "unlink", unlinkFunc },
/* 11 */ { "execve", execveFunc<ArmLinux32> },
/* 12 */ { "chdir" },
/* 13 */ { "time", timeFunc<ArmLinux32> },
/* 14 */ { "mknod" },
/* 15 */ { "chmod", chmodFunc<ArmLinux32> },
/* 16 */ { "lchown", chownFunc },
/* 17 */ { "unused#17" },
/* 18 */ { "unused#18" },
/* 19 */ { "lseek", lseekFunc },
/* 20 */ { "getpid", getpidFunc },
/* 21 */ { "mount" },
/* 22 */ { "umount" },
/* 23 */ { "setuid", ignoreFunc },
/* 24 */ { "getuid", getuidFunc },
/* 25 */ { "stime" },
/* 26 */ { "ptrace" },
/* 27 */ { "alarm" },
/* 28 */ { "unused#28" },
/* 29 */ { "pause" },
/* 30 */ { "utime" },
/* 31 */ { "unused#31" },
/* 32 */ { "unused#32" },
/* 33 */ { "access", accessFunc },
/* 34 */ { "nice" },
/* 35 */ { "unused#35" },
/* 36 */ { "sync" },
/* 37 */ { "kill", ignoreFunc },
/* 38 */ { "rename", renameFunc },
/* 39 */ { "mkdir", mkdirFunc },
/* 40 */ { "rmdir" },
/* 41 */ { "dup", dupFunc },
/* 42 */ { "pipe", pipePseudoFunc },
/* 43 */ { "times", timesFunc<ArmLinux32> },
/* 44 */ { "unused#44" },
/* 45 */ { "brk", brkFunc },
/* 46 */ { "setgid" },
/* 47 */ { "getgid", getgidFunc },
/* 48 */ { "unused#48" },
/* 49 */ { "geteuid", geteuidFunc },
/* 50 */ { "getegid", getegidFunc },
/* 51 */ { "acct" },
/* 52 */ { "umount2" },
/* 53 */ { "unused#53" },
/* 54 */ { "ioctl", ioctlFunc<ArmLinux32> },
/* 55 */ { "fcntl", fcntlFunc },
/* 56 */ { "unused#56" },
/* 57 */ { "setpgid" },
/* 58 */ { "unused#58" },
/* 59 */ { "unused#59" },
/* 60 */ { "umask", umaskFunc },
/* 61 */ { "chroot" },
/* 62 */ { "ustat" },
/* 63 */ { "dup2" },
/* 64 */ { "getppid", getppidFunc },
/* 65 */ { "getpgrp" },
/* 66 */ { "setsid" },
/* 67 */ { "sigaction" },
/* 68 */ { "unused#68" },
/* 69 */ { "unused#69" },
/* 70 */ { "setreuid" },
/* 71 */ { "setregid" },
/* 72 */ { "sigsuspend" },
/* 73 */ { "sigpending" },
/* 74 */ { "sethostname", ignoreFunc },
/* 75 */ { "setrlimit", ignoreFunc },
/* 76 */ { "getrlimit", getrlimitFunc<ArmLinux32> },
/* 77 */ { "getrusage", getrusageFunc<ArmLinux32> },
/* 78 */ { "gettimeofday", gettimeofdayFunc<ArmLinux32> },
/* 79 */ { "settimeofday" },
/* 80 */ { "getgroups" },
/* 81 */ { "setgroups" },
/* 82 */ { "reserved#82" },
/* 83 */ { "symlink" },
/* 84 */ { "unused#84" },
/* 85 */ { "readlink", readlinkFunc },
/* 86 */ { "uselib" },
/* 87 */ { "swapon" },
/* 88 */ { "reboot" },
/* 89 */ { "readdir" },
/* 90 */ { "mmap", mmapFunc<ArmLinux32> },
/* 91 */ { "munmap", munmapFunc },
/* 92 */ { "truncate", truncateFunc },
/* 93 */ { "ftruncate", ftruncateFunc },
/* 94 */ { "fchmod" },
/* 95 */ { "fchown" },
/* 96 */ { "getpriority" },
/* 97 */ { "setpriority" },
/* 98 */ { "unused#98" },
/* 99 */ { "statfs" },
/* 100 */ { "fstatfs" },
/* 101 */ { "unused#101" },
/* 102 */ { "socketcall" },
/* 103 */ { "syslog" },
/* 104 */ { "setitimer" },
/* 105 */ { "getitimer" },
/* 106 */ { "stat", statFunc<ArmLinux32> },
/* 107 */ { "lstat" },
/* 108 */ { "fstat", fstatFunc<ArmLinux32> },
/* 109 */ { "unused#109" },
/* 110 */ { "unused#101" },
/* 111 */ { "vhangup" },
/* 112 */ { "unused#112" },
/* 113 */ { "syscall" },
/* 114 */ { "wait4" },
/* 115 */ { "swapoff" },
/* 116 */ { "sysinfo", sysinfoFunc<ArmLinux32> },
/* 117 */ { "ipc" },
/* 118 */ { "fsync" },
/* 119 */ { "sigreturn" },
/* 120 */ { "clone", cloneFunc<ArmLinux32> },
/* 121 */ { "setdomainname" },
/* 122 */ { "uname", unameFunc32 },
/* 123 */ { "unused#123" },
/* 124 */ { "adjtimex" },
/* 125 */ { "mprotect", ignoreFunc },
/* 126 */ { "sigprocmask", ignoreWarnOnceFunc },
/* 127 */ { "unused#127" },
/* 128 */ { "init_module" },
/* 129 */ { "delete_module" },
/* 130 */ { "unused#130" },
/* 131 */ { "quotactl" },
/* 132 */ { "getpgid" },
/* 133 */ { "fchdir" },
/* 134 */ { "bdflush" },
/* 135 */ { "sysfs" },
/* 136 */ { "personality" },
/* 137 */ { "reserved#138" },
/* 138 */ { "setfsuid" },
/* 139 */ { "setfsgid" },
/* 140 */ { "llseek", _llseekFunc },
#if defined(SYS_getdents)
/* 141 */ { "getdents", getdentsFunc },
#else
/* 141 */ { "getdents" },
#endif
/* 142 */ { "newselect" },
/* 143 */ { "flock" },
/* 144 */ { "msync" },
/* 145 */ { "readv" },
/* 146 */ { "writev", writevFunc<ArmLinux32> },
/* 147 */ { "getsid" },
/* 148 */ { "fdatasync" },
/* 149 */ { "sysctl" },
/* 150 */ { "mlock" },
/* 151 */ { "munlock" },
/* 152 */ { "mlockall" },
/* 153 */ { "munlockall" },
/* 154 */ { "sched_setparam" },
/* 155 */ { "sched_getparam" },
/* 156 */ { "sched_setscheduler" },
/* 157 */ { "sched_getscheduler" },
/* 158 */ { "sched_yield" },
/* 159 */ { "sched_get_priority_max" },
/* 160 */ { "sched_get_priority_min" },
/* 161 */ { "sched_rr_get_interval" },
/* 162 */ { "nanosleep", ignoreWarnOnceFunc },
/* 163 */ { "mremap", mremapFunc<ArmLinux32> }, // ARM-specific
/* 164 */ { "setresuid" },
/* 165 */ { "getresuid" },
/* 166 */ { "unused#166" },
/* 167 */ { "unused#167" },
/* 168 */ { "poll" },
/* 169 */ { "nfsservctl" },
/* 170 */ { "setresgid" },
/* 171 */ { "getresgid" },
/* 172 */ { "prctl" },
/* 173 */ { "rt_sigreturn" },
/* 174 */ { "rt_sigaction", ignoreWarnOnceFunc },
/* 175 */ { "rt_sigprocmask", ignoreWarnOnceFunc },
/* 176 */ { "rt_sigpending" },
/* 177 */ { "rt_sigtimedwait" },
/* 178 */ { "rt_sigqueueinfo", ignoreFunc },
/* 179 */ { "rt_sigsuspend" },
/* 180 */ { "pread64" },
/* 181 */ { "pwrite64" },
/* 182 */ { "chown" },
/* 183 */ { "getcwd", getcwdFunc },
/* 184 */ { "capget" },
/* 185 */ { "capset" },
/* 186 */ { "sigaltstack" },
/* 187 */ { "sendfile" },
/* 188 */ { "unused#188" },
/* 189 */ { "unused#189" },
/* 190 */ { "vfork" },
/* 191 */ { "getrlimit", getrlimitFunc<ArmLinux32> },
/* 192 */ { "mmap2", mmapFunc<ArmLinux32> },
/* 193 */ { "truncate64" },
/* 194 */ { "ftruncate64", ftruncate64Func },
/* 195 */ { "stat64", stat64Func<ArmLinux32> },
/* 196 */ { "lstat64", lstat64Func<ArmLinux32> },
/* 197 */ { "fstat64", fstat64Func<ArmLinux32> },
/* 198 */ { "lchown" },
/* 199 */ { "getuid", getuidFunc },
/* 200 */ { "getgid", getgidFunc },
/* 201 */ { "geteuid", geteuidFunc },
/* 202 */ { "getegid", getegidFunc },
/* 203 */ { "setreuid" },
/* 204 */ { "setregid" },
/* 205 */ { "getgroups" },
/* 206 */ { "setgroups" },
/* 207 */ { "fchown" },
/* 208 */ { "setresuid" },
/* 209 */ { "getresuid" },
/* 210 */ { "setresgid" },
/* 211 */ { "getresgid" },
/* 212 */ { "chown" },
/* 213 */ { "setuid" },
/* 214 */ { "setgid" },
/* 215 */ { "setfsuid" },
/* 216 */ { "setfsgid" },
#if defined(SYS_getdents64)
/* 217 */ { "getdents64", getdents64Func },
#else
/* 217 */ { "getdents64" },
#endif
/* 218 */ { "pivot_root" },
/* 219 */ { "mincore" },
/* 220 */ { "madvise", ignoreFunc },
/* 221 */ { "fcntl64", fcntl64Func },
/* 222 */ { "unused#222" },
/* 223 */ { "unknown#223" },
/* 224 */ { "gettid", gettidFunc },
/* 225 */ { "readahead" },
/* 226 */ { "setxattr" },
/* 227 */ { "lsetxattr" },
/* 228 */ { "fsetxattr" },
/* 229 */ { "getxattr" },
/* 230 */ { "lgetxattr" },
/* 231 */ { "fgetxattr" },
/* 232 */ { "listxattr" },
/* 233 */ { "llistxattr" },
/* 234 */ { "flistxattr" },
/* 235 */ { "removexattr" },
/* 236 */ { "lremovexattr" },
/* 237 */ { "fremovexattr" },
/* 238 */ { "tkill" },
/* 239 */ { "sendfile64" },
/* 240 */ { "futex", futexFunc<ArmLinux32> },
/* 241 */ { "sched_setaffinity" },
/* 242 */ { "sched_getaffinity", ignoreFunc },
/* 243 */ { "io_setup" },
/* 244 */ { "io_destroy" },
/* 245 */ { "io_getevents" },
/* 246 */ { "io_submit" },
/* 247 */ { "io_cancel" },
/* 248 */ { "exit_group", exitGroupFunc },
/* 249 */ { "lookup_dcookie" },
/* 250 */ { "epoll_create" },
/* 251 */ { "epoll_ctl" },
/* 252 */ { "epoll_wait" },
/* 253 */ { "remap_file_pages" },
/* 254 */ { "unused#254" },
/* 255 */ { "unused#255" },
/* 256 */ { "set_tid_address", setTidAddressFunc },
/* 257 */ { "timer_create" },
/* 258 */ { "timer_settime" },
/* 259 */ { "timer_gettime" },
/* 260 */ { "timer_getoverrun" },
/* 261 */ { "timer_delete" },
/* 262 */ { "clock_settime" },
/* 263 */ { "clock_gettime", clock_gettimeFunc<ArmLinux32> },
/* 264 */ { "clock_getres", clock_getresFunc<ArmLinux32> },
/* 265 */ { "clock_nanosleep" },
/* 266 */ { "statfs64" },
/* 267 */ { "fstatfs64" },
/* 268 */ { "tgkill", tgkillFunc<ArmLinux32> },
/* 269 */ { "utimes" },
/* 270 */ { "arm_fadvise64_64" },
/* 271 */ { "pciconfig_iobase" },
/* 272 */ { "pciconfig_read" },
/* 273 */ { "pciconfig_write" },
/* 274 */ { "mq_open" },
/* 275 */ { "mq_unlink" },
/* 276 */ { "mq_timedsend" },
/* 277 */ { "mq_timedreceive" },
/* 278 */ { "mq_notify" },
/* 279 */ { "mq_getsetattr" },
/* 280 */ { "waitid" },
/* 281 */ { "socket" },
/* 282 */ { "bind" },
/* 283 */ { "connect" },
/* 284 */ { "listen" },
/* 285 */ { "accept" },
/* 286 */ { "getsockname" },
/* 287 */ { "getpeername" },
/* 288 */ { "socketpair" },
/* 289 */ { "send" },
/* 290 */ { "sendto" },
/* 291 */ { "recv" },
/* 292 */ { "recvfrom" },
/* 293 */ { "shutdown" },
/* 294 */ { "setsockopt" },
/* 295 */ { "getsockopt" },
/* 296 */ { "sendmsg" },
/* 297 */ { "rcvmsg" },
/* 298 */ { "semop" },
/* 299 */ { "semget" },
/* 300 */ { "semctl" },
/* 301 */ { "msgsend" },
/* 302 */ { "msgrcv" },
/* 303 */ { "msgget" },
/* 304 */ { "msgctl" },
/* 305 */ { "shmat" },
/* 306 */ { "shmdt" },
/* 307 */ { "shmget" },
/* 308 */ { "shmctl" },
/* 309 */ { "add_key" },
/* 310 */ { "request_key" },
/* 311 */ { "keyctl" },
/* 312 */ { "semtimedop" },
/* 313 */ { "unused#313" },
/* 314 */ { "ioprio_set" },
/* 315 */ { "ioprio_get" },
/* 316 */ { "inotify_init" },
/* 317 */ { "inotify_add_watch" },
/* 318 */ { "inotify_rm_watch" },
/* 319 */ { "mbind" },
/* 320 */ { "get_mempolicy" },
/* 321 */ { "set_mempolicy" },
/* 322 */ { "openat", openatFunc<ArmLinux32> },
/* 323 */ { "mkdirat" },
/* 324 */ { "mknodat" },
/* 325 */ { "fchownat" },
/* 326 */ { "futimesat" },
/* 327 */ { "fstatat64" },
/* 328 */ { "unlinkat" },
/* 329 */ { "renameat" },
/* 330 */ { "linkat" },
/* 331 */ { "symlinkat" },
/* 332 */ { "readlinkat" },
/* 333 */ { "fchmodat" },
/* 334 */ { "faccessat" },
/* 335 */ { "pselect6" },
/* 336 */ { "ppoll" },
/* 337 */ { "unshare" },
/* 338 */ { "set_robust_list", ignoreFunc },
/* 339 */ { "get_robust_list" },
/* 340 */ { "splice" },
/* 341 */ { "arm_sync_file_range" },
/* 342 */ { "tee" },
/* 343 */ { "vmsplice" },
/* 344 */ { "move_pages" },
/* 345 */ { "getcpu" },
/* 346 */ { "epoll_pwait" },
/* 347 */ { "sys_kexec_load" },
/* 348 */ { "sys_utimensat" },
/* 349 */ { "sys_signalfd" },
/* 350 */ { "sys_timerfd_create" },
/* 351 */ { "sys_eventfd" },
/* 352 */ { "sys_fallocate" },
/* 353 */ { "sys_timerfd_settime" },
/* 354 */ { "sys_timerfd_gettime" },
/* 355 */ { "sys_signalfd4" },
/* 356 */ { "sys_eventfd2" },
/* 357 */ { "sys_epoll_create1" },
/* 358 */ { "sys_dup3" },
/* 359 */ { "sys_pipe2" },
/* 360 */ { "sys_inotify_init1" },
/* 361 */ { "sys_preadv" },
/* 362 */ { "sys_pwritev" },
/* 363 */ { "sys_rt_tgsigqueueinfo" },
/* 364 */ { "sys_perf_event_open" },
/* 365 */ { "sys_recvmmsg" },
};
static SyscallDescABI<DefaultSyscallABI> syscallDescs64[] = {
/* 0 */ { "io_setup" },
/* 1 */ { "io_destroy" },
/* 2 */ { "io_submit" },
/* 3 */ { "io_cancel" },
/* 4 */ { "io_getevents" },
/* 5 */ { "setxattr" },
/* 6 */ { "lsetxattr" },
/* 7 */ { "fsetxattr" },
/* 8 */ { "getxattr" },
/* 9 */ { "lgetxattr" },
/* 10 */ { "fgetxattr" },
/* 11 */ { "listxattr" },
/* 12 */ { "llistxattr" },
/* 13 */ { "flistxattr" },
/* 14 */ { "removexattr" },
/* 15 */ { "lremovexattr" },
/* 16 */ { "fremovexattr" },
/* 17 */ { "getcwd", getcwdFunc },
/* 18 */ { "lookup_dcookie" },
/* 19 */ { "eventfd2" },
/* 20 */ { "epoll_create1" },
/* 21 */ { "epoll_ctl" },
/* 22 */ { "epoll_pwait" },
/* 23 */ { "dup", dupFunc },
/* 24 */ { "dup3" },
/* 25 */ { "fcntl64", fcntl64Func },
/* 26 */ { "inotify_init1" },
/* 27 */ { "inotify_add_watch" },
/* 28 */ { "inotify_rm_watch" },
/* 29 */ { "ioctl", ioctlFunc<ArmLinux64> },
/* 30 */ { "ioprio_set" },
/* 31 */ { "ioprio_get" },
/* 32 */ { "flock" },
/* 33 */ { "mknodat" },
/* 34 */ { "mkdirat" },
/* 35 */ { "unlinkat", unlinkatFunc<ArmLinux64> },
/* 36 */ { "symlinkat" },
/* 37 */ { "linkat" },
/* 38 */ { "renameat", renameatFunc<ArmLinux64> },
/* 39 */ { "umount2" },
/* 40 */ { "mount" },
/* 41 */ { "pivot_root" },
/* 42 */ { "nfsservctl" },
/* 43 */ { "statfs64" },
/* 44 */ { "fstatfs64" },
/* 45 */ { "truncate64" },
/* 46 */ { "ftruncate64", ftruncate64Func },
/* 47 */ { "fallocate" },
/* 48 */ { "faccessat", faccessatFunc<ArmLinux64> },
/* 49 */ { "chdir" },
/* 50 */ { "fchdir" },
/* 51 */ { "chroot" },
/* 52 */ { "fchmod" },
/* 53 */ { "fchmodat" },
/* 54 */ { "fchownat" },
/* 55 */ { "fchown" },
/* 56 */ { "openat", openatFunc<ArmLinux64> },
/* 57 */ { "close", closeFunc },
/* 58 */ { "vhangup" },
/* 59 */ { "pipe2" },
/* 60 */ { "quotactl" },
#if defined(SYS_getdents64)
/* 61 */ { "getdents64", getdents64Func },
#else
/* 61 */ { "getdents64" },
#endif
/* 62 */ { "llseek", lseekFunc },
/* 63 */ { "read", readFunc<ArmLinux64> },
/* 64 */ { "write", writeFunc<ArmLinux64> },
/* 65 */ { "readv" },
/* 66 */ { "writev", writevFunc<ArmLinux64> },
/* 67 */ { "pread64" },
/* 68 */ { "pwrite64" },
/* 69 */ { "preadv" },
/* 70 */ { "pwritev" },
/* 71 */ { "sendfile64" },
/* 72 */ { "pselect6" },
/* 73 */ { "ppoll" },
/* 74 */ { "signalfd4" },
/* 75 */ { "vmsplice" },
/* 76 */ { "splice" },
/* 77 */ { "tee" },
/* 78 */ { "readlinkat", readlinkatFunc<ArmLinux64> },
/* 79 */ { "fstatat64", fstatat64Func<ArmLinux64> },
/* 80 */ { "fstat64", fstat64Func<ArmLinux64> },
/* 81 */ { "sync" },
/* 82 */ { "fsync" },
/* 83 */ { "fdatasync" },
/* 84 */ { "sync_file_range" },
/* 85 */ { "timerfd_create" },
/* 86 */ { "timerfd_settime" },
/* 87 */ { "timerfd_gettime" },
/* 88 */ { "utimensat" },
/* 89 */ { "acct" },
/* 90 */ { "capget" },
/* 91 */ { "capset" },
/* 92 */ { "personality" },
/* 93 */ { "exit", exitFunc },
/* 94 */ { "exit_group", exitGroupFunc },
/* 95 */ { "waitid" },
/* 96 */ { "set_tid_address", setTidAddressFunc },
/* 97 */ { "unshare" },
/* 98 */ { "futex", futexFunc<ArmLinux64> },
/* 99 */ { "set_robust_list", ignoreFunc },
/* 100 */ { "get_robust_list" },
/* 101 */ { "nanosleep", ignoreWarnOnceFunc },
/* 102 */ { "getitimer" },
/* 103 */ { "setitimer" },
/* 104 */ { "kexec_load" },
/* 105 */ { "init_module" },
/* 106 */ { "delete_module" },
/* 107 */ { "timer_create" },
/* 108 */ { "timer_gettime" },
/* 109 */ { "timer_getoverrun" },
/* 110 */ { "timer_settime" },
/* 111 */ { "timer_delete" },
/* 112 */ { "clock_settime" },
/* 113 */ { "clock_gettime", clock_gettimeFunc<ArmLinux64> },
/* 114 */ { "clock_getres" },
/* 115 */ { "clock_nanosleep" },
/* 116 */ { "syslog" },
/* 117 */ { "ptrace" },
/* 118 */ { "sched_setparam" },
/* 119 */ { "sched_setscheduler" },
/* 120 */ { "sched_getscheduler" },
/* 121 */ { "sched_getparam" },
/* 122 */ { "sched_setaffinity" },
/* 123 */ { "sched_getaffinity", ignoreFunc },
/* 124 */ { "sched_yield" },
/* 125 */ { "sched_get_priority_max" },
/* 126 */ { "sched_get_priority_min" },
/* 127 */ { "sched_rr_get_interval" },
/* 128 */ { "restart_syscall" },
/* 129 */ { "kill", ignoreFunc },
/* 130 */ { "tkill" },
/* 131 */ { "tgkill", tgkillFunc<ArmLinux64> },
/* 132 */ { "sigaltstack" },
/* 133 */ { "rt_sigsuspend" },
/* 134 */ { "rt_sigaction", ignoreFunc },
/* 135 */ { "rt_sigprocmask", ignoreWarnOnceFunc },
/* 136 */ { "rt_sigpending" },
/* 137 */ { "rt_sigtimedwait" },
/* 138 */ { "rt_sigqueueinfo", ignoreFunc },
/* 139 */ { "rt_sigreturn" },
/* 140 */ { "setpriority" },
/* 141 */ { "getpriority" },
/* 142 */ { "reboot" },
/* 143 */ { "setregid" },
/* 144 */ { "setgid" },
/* 145 */ { "setreuid" },
/* 146 */ { "setuid" },
/* 147 */ { "setresuid" },
/* 148 */ { "getresuid" },
/* 149 */ { "setresgid" },
/* 150 */ { "getresgid" },
/* 151 */ { "setfsuid" },
/* 152 */ { "setfsgid" },
/* 153 */ { "times", timesFunc<ArmLinux64> },
/* 154 */ { "setpgid" },
/* 155 */ { "getpgid" },
/* 156 */ { "getsid" },
/* 157 */ { "setsid" },
/* 158 */ { "getgroups" },
/* 159 */ { "setgroups" },
/* 160 */ { "uname", unameFunc64 },
/* 161 */ { "sethostname", ignoreFunc },
/* 162 */ { "setdomainname" },
/* 163 */ { "getrlimit", getrlimitFunc<ArmLinux64> },
/* 164 */ { "setrlimit", ignoreFunc },
/* 165 */ { "getrusage", getrusageFunc<ArmLinux64> },
/* 166 */ { "umask" },
/* 167 */ { "prctl" },
/* 168 */ { "getcpu" },
/* 169 */ { "gettimeofday", gettimeofdayFunc<ArmLinux64> },
/* 170 */ { "settimeofday" },
/* 171 */ { "adjtimex" },
/* 172 */ { "getpid", getpidFunc },
/* 173 */ { "getppid", getppidFunc },
/* 174 */ { "getuid", getuidFunc },
/* 175 */ { "geteuid", geteuidFunc },
/* 176 */ { "getgid", getgidFunc },
/* 177 */ { "getegid", getegidFunc },
/* 178 */ { "gettid", gettidFunc },
/* 179 */ { "sysinfo", sysinfoFunc<ArmLinux64> },
/* 180 */ { "mq_open" },
/* 181 */ { "mq_unlink" },
/* 182 */ { "mq_timedsend" },
/* 183 */ { "mq_timedreceive" },
/* 184 */ { "mq_notify" },
/* 185 */ { "mq_getsetattr" },
/* 186 */ { "msgget" },
/* 187 */ { "msgctl" },
/* 188 */ { "msgrcv" },
/* 189 */ { "msgsnd" },
/* 190 */ { "semget" },
/* 191 */ { "semctl" },
/* 192 */ { "semtimedop" },
/* 193 */ { "semop" },
/* 194 */ { "shmget" },
/* 195 */ { "shmctl" },
/* 196 */ { "shmat" },
/* 197 */ { "shmdt" },
/* 198 */ { "socket" },
/* 199 */ { "socketpair" },
/* 200 */ { "bind" },
/* 201 */ { "listen" },
/* 202 */ { "accept" },
/* 203 */ { "connect" },
/* 204 */ { "getsockname" },
/* 205 */ { "getpeername" },
/* 206 */ { "sendto" },
/* 207 */ { "recvfrom" },
/* 208 */ { "setsockopt" },
/* 209 */ { "getsockopt" },
/* 210 */ { "shutdown" },
/* 211 */ { "sendmsg" },
/* 212 */ { "recvmsg" },
/* 213 */ { "readahead" },
/* 214 */ { "brk", brkFunc },
/* 215 */ { "munmap", munmapFunc },
/* 216 */ { "mremap", mremapFunc<ArmLinux64> },
/* 217 */ { "add_key" },
/* 218 */ { "request_key" },
/* 219 */ { "keyctl" },
/* 220 */ { "clone", cloneFunc<ArmLinux64> },
/* 221 */ { "execve", execveFunc<ArmLinux64> },
/* 222 */ { "mmap2", mmapFunc<ArmLinux64> },
/* 223 */ { "fadvise64_64" },
/* 224 */ { "swapon" },
/* 225 */ { "swapoff" },
/* 226 */ { "mprotect", ignoreFunc },
/* 227 */ { "msync" },
/* 228 */ { "mlock" },
/* 229 */ { "munlock" },
/* 230 */ { "mlockall" },
/* 231 */ { "munlockall" },
/* 232 */ { "mincore" },
/* 233 */ { "madvise", ignoreFunc },
/* 234 */ { "remap_file_pages" },
/* 235 */ { "mbind" },
/* 236 */ { "get_mempolicy" },
/* 237 */ { "set_mempolicy" },
/* 238 */ { "migrate_pages" },
/* 239 */ { "move_pages" },
/* 240 */ { "rt_tgsigqueueinfo" },
/* 241 */ { "perf_event_open" },
/* 242 */ { "accept4" },
/* 243 */ { "recvmmsg" },
/* 244 */ { "unused#244" },
/* 245 */ { "unused#245" },
/* 246 */ { "unused#246" },
/* 247 */ { "unused#247" },
/* 248 */ { "unused#248" },
/* 249 */ { "unused#249" },
/* 250 */ { "unused#250" },
/* 251 */ { "unused#251" },
/* 252 */ { "unused#252" },
/* 253 */ { "unused#253" },
/* 254 */ { "unused#254" },
/* 255 */ { "unused#255" },
/* 256 */ { "unused#256" },
/* 257 */ { "unused#257" },
/* 258 */ { "unused#258" },
/* 259 */ { "unused#259" },
/* 260 */ { "wait4" },
/* 261 */ { "prlimit64", prlimitFunc<ArmLinux64> },
/* 262 */ { "fanotify_init" },
/* 263 */ { "fanotify_mark" },
/* 264 */ { "name_to_handle_at" },
/* 265 */ { "open_by_handle_at" },
/* 266 */ { "clock_adjtime" },
/* 267 */ { "syncfs" },
/* 268 */ { "setns" },
/* 269 */ { "sendmmsg" },
/* 270 */ { "process_vm_readv" },
/* 271 */ { "process_vm_writev" },
/* 272 */ { "unused#272" },
/* 273 */ { "unused#273" },
/* 274 */ { "unused#274" },
/* 275 */ { "unused#275" },
/* 276 */ { "unused#276" },
/* 277 */ { "unused#277" },
/* 278 */ { "unused#278" },
/* 279 */ { "unused#279" },
/* 280 */ { "unused#280" },
/* 281 */ { "unused#281" },
/* 282 */ { "unused#282" },
/* 283 */ { "unused#283" },
/* 284 */ { "unused#284" },
/* 285 */ { "unused#285" },
/* 286 */ { "unused#286" },
/* 287 */ { "unused#287" },
/* 288 */ { "unused#288" },
/* 289 */ { "unused#289" },
/* 290 */ { "unused#290" },
/* 291 */ { "unused#291" },
/* 292 */ { "unused#292" },
/* 293 */ { "unused#293" },
/* 294 */ { "unused#294" },
/* 295 */ { "unused#295" },
/* 296 */ { "unused#296" },
/* 297 */ { "unused#297" },
/* 298 */ { "unused#298" },
/* 299 */ { "unused#299" },
/* 300 */ { "unused#300" },
/* 301 */ { "unused#301" },
/* 302 */ { "unused#302" },
/* 303 */ { "unused#303" },
/* 304 */ { "unused#304" },
/* 305 */ { "unused#305" },
/* 306 */ { "unused#306" },
/* 307 */ { "unused#307" },
/* 308 */ { "unused#308" },
/* 309 */ { "unused#309" },
/* 310 */ { "unused#310" },
/* 311 */ { "unused#311" },
/* 312 */ { "unused#312" },
/* 313 */ { "unused#313" },
/* 314 */ { "unused#314" },
/* 315 */ { "unused#315" },
/* 316 */ { "unused#316" },
/* 317 */ { "unused#317" },
/* 318 */ { "unused#318" },
/* 319 */ { "unused#319" },
/* 320 */ { "unused#320" },
/* 321 */ { "unused#321" },
/* 322 */ { "unused#322" },
/* 323 */ { "unused#323" },
/* 324 */ { "unused#324" },
/* 325 */ { "unused#325" },
/* 326 */ { "unused#326" },
/* 327 */ { "unused#327" },
/* 328 */ { "unused#328" },
/* 329 */ { "unused#329" },
/* 330 */ { "unused#330" },
/* 331 */ { "unused#331" },
/* 332 */ { "unused#332" },
/* 333 */ { "unused#333" },
/* 334 */ { "unused#334" },
/* 335 */ { "unused#335" },
/* 336 */ { "unused#336" },
/* 337 */ { "unused#337" },
/* 338 */ { "unused#338" },
/* 339 */ { "unused#339" },
/* 340 */ { "unused#340" },
/* 341 */ { "unused#341" },
/* 342 */ { "unused#342" },
/* 343 */ { "unused#343" },
/* 344 */ { "unused#344" },
/* 345 */ { "unused#345" },
/* 346 */ { "unused#346" },
/* 347 */ { "unused#347" },
/* 348 */ { "unused#348" },
/* 349 */ { "unused#349" },
/* 350 */ { "unused#350" },
/* 351 */ { "unused#351" },
/* 352 */ { "unused#352" },
/* 353 */ { "unused#353" },
/* 354 */ { "unused#354" },
/* 355 */ { "unused#355" },
/* 356 */ { "unused#356" },
/* 357 */ { "unused#357" },
/* 358 */ { "unused#358" },
/* 359 */ { "unused#359" },
/* 360 */ { "unused#360" },
/* 361 */ { "unused#361" },
/* 362 */ { "unused#362" },
/* 363 */ { "unused#363" },
/* 364 */ { "unused#364" },
/* 365 */ { "unused#365" },
/* 366 */ { "unused#366" },
/* 367 */ { "unused#367" },
/* 368 */ { "unused#368" },
/* 369 */ { "unused#369" },
/* 370 */ { "unused#370" },
/* 371 */ { "unused#371" },
/* 372 */ { "unused#372" },
/* 373 */ { "unused#373" },
/* 374 */ { "unused#374" },
/* 375 */ { "unused#375" },
/* 376 */ { "unused#376" },
/* 377 */ { "unused#377" },
/* 378 */ { "unused#378" },
/* 379 */ { "unused#379" },
/* 380 */ { "unused#380" },
/* 381 */ { "unused#381" },
/* 382 */ { "unused#382" },
/* 383 */ { "unused#383" },
/* 384 */ { "unused#384" },
/* 385 */ { "unused#385" },
/* 386 */ { "unused#386" },
/* 387 */ { "unused#387" },
/* 388 */ { "unused#388" },
/* 389 */ { "unused#389" },
/* 390 */ { "unused#390" },
/* 391 */ { "unused#391" },
/* 392 */ { "unused#392" },
/* 393 */ { "unused#393" },
/* 394 */ { "unused#394" },
/* 395 */ { "unused#395" },
/* 396 */ { "unused#396" },
/* 397 */ { "unused#397" },
/* 398 */ { "unused#398" },
/* 399 */ { "unused#399" },
/* 400 */ { "unused#400" },
/* 401 */ { "unused#401" },
/* 402 */ { "unused#402" },
/* 403 */ { "unused#403" },
/* 404 */ { "unused#404" },
/* 405 */ { "unused#405" },
/* 406 */ { "unused#406" },
/* 407 */ { "unused#407" },
/* 408 */ { "unused#408" },
/* 409 */ { "unused#409" },
/* 410 */ { "unused#410" },
/* 411 */ { "unused#411" },
/* 412 */ { "unused#412" },
/* 413 */ { "unused#413" },
/* 414 */ { "unused#414" },
/* 415 */ { "unused#415" },
/* 416 */ { "unused#416" },
/* 417 */ { "unused#417" },
/* 418 */ { "unused#418" },
/* 419 */ { "unused#419" },
/* 420 */ { "unused#420" },
/* 421 */ { "unused#421" },
/* 422 */ { "unused#422" },
/* 423 */ { "unused#423" },
/* 424 */ { "unused#424" },
/* 425 */ { "unused#425" },
/* 426 */ { "unused#426" },
/* 427 */ { "unused#427" },
/* 428 */ { "unused#428" },
/* 429 */ { "unused#429" },
/* 430 */ { "unused#430" },
/* 431 */ { "unused#431" },
/* 432 */ { "unused#432" },
/* 433 */ { "unused#433" },
/* 434 */ { "unused#434" },
/* 435 */ { "unused#435" },
/* 436 */ { "unused#436" },
/* 437 */ { "unused#437" },
/* 438 */ { "unused#438" },
/* 439 */ { "unused#439" },
/* 440 */ { "unused#440" },
/* 441 */ { "unused#441" },
/* 442 */ { "unused#442" },
/* 443 */ { "unused#443" },
/* 444 */ { "unused#444" },
/* 445 */ { "unused#445" },
/* 446 */ { "unused#446" },
/* 447 */ { "unused#447" },
/* 448 */ { "unused#448" },
/* 449 */ { "unused#449" },
/* 450 */ { "unused#450" },
/* 451 */ { "unused#451" },
/* 452 */ { "unused#452" },
/* 453 */ { "unused#453" },
/* 454 */ { "unused#454" },
/* 455 */ { "unused#455" },
/* 456 */ { "unused#456" },
/* 457 */ { "unused#457" },
/* 458 */ { "unused#458" },
/* 459 */ { "unused#459" },
/* 460 */ { "unused#460" },
/* 461 */ { "unused#461" },
/* 462 */ { "unused#462" },
/* 463 */ { "unused#463" },
/* 464 */ { "unused#464" },
/* 465 */ { "unused#465" },
/* 466 */ { "unused#466" },
/* 467 */ { "unused#467" },
/* 468 */ { "unused#468" },
/* 469 */ { "unused#469" },
/* 470 */ { "unused#470" },
/* 471 */ { "unused#471" },
/* 472 */ { "unused#472" },
/* 473 */ { "unused#473" },
/* 474 */ { "unused#474" },
/* 475 */ { "unused#475" },
/* 476 */ { "unused#476" },
/* 477 */ { "unused#477" },
/* 478 */ { "unused#478" },
/* 479 */ { "unused#479" },
/* 480 */ { "unused#480" },
/* 481 */ { "unused#481" },
/* 482 */ { "unused#482" },
/* 483 */ { "unused#483" },
/* 484 */ { "unused#484" },
/* 485 */ { "unused#485" },
/* 486 */ { "unused#486" },
/* 487 */ { "unused#487" },
/* 488 */ { "unused#488" },
/* 489 */ { "unused#489" },
/* 490 */ { "unused#490" },
/* 491 */ { "unused#491" },
/* 492 */ { "unused#492" },
/* 493 */ { "unused#493" },
/* 494 */ { "unused#494" },
/* 495 */ { "unused#495" },
/* 496 */ { "unused#496" },
/* 497 */ { "unused#497" },
/* 498 */ { "unused#498" },
/* 499 */ { "unused#499" },
/* 500 */ { "unused#500" },
/* 501 */ { "unused#501" },
/* 502 */ { "unused#502" },
/* 503 */ { "unused#503" },
/* 504 */ { "unused#504" },
/* 505 */ { "unused#505" },
/* 506 */ { "unused#506" },
/* 507 */ { "unused#507" },
/* 508 */ { "unused#508" },
/* 509 */ { "unused#509" },
/* 510 */ { "unused#510" },
/* 511 */ { "unused#511" },
/* 512 */ { "unused#512" },
/* 513 */ { "unused#513" },
/* 514 */ { "unused#514" },
/* 515 */ { "unused#515" },
/* 516 */ { "unused#516" },
/* 517 */ { "unused#517" },
/* 518 */ { "unused#518" },
/* 519 */ { "unused#519" },
/* 520 */ { "unused#520" },
/* 521 */ { "unused#521" },
/* 522 */ { "unused#522" },
/* 523 */ { "unused#523" },
/* 524 */ { "unused#524" },
/* 525 */ { "unused#525" },
/* 526 */ { "unused#526" },
/* 527 */ { "unused#527" },
/* 528 */ { "unused#528" },
/* 529 */ { "unused#529" },
/* 530 */ { "unused#530" },
/* 531 */ { "unused#531" },
/* 532 */ { "unused#532" },
/* 533 */ { "unused#533" },
/* 534 */ { "unused#534" },
/* 535 */ { "unused#535" },
/* 536 */ { "unused#536" },
/* 537 */ { "unused#537" },
/* 538 */ { "unused#538" },
/* 539 */ { "unused#539" },
/* 540 */ { "unused#540" },
/* 541 */ { "unused#541" },
/* 542 */ { "unused#542" },
/* 543 */ { "unused#543" },
/* 544 */ { "unused#544" },
/* 545 */ { "unused#545" },
/* 546 */ { "unused#546" },
/* 547 */ { "unused#547" },
/* 548 */ { "unused#548" },
/* 549 */ { "unused#549" },
/* 550 */ { "unused#550" },
/* 551 */ { "unused#551" },
/* 552 */ { "unused#552" },
/* 553 */ { "unused#553" },
/* 554 */ { "unused#554" },
/* 555 */ { "unused#555" },
/* 556 */ { "unused#556" },
/* 557 */ { "unused#557" },
/* 558 */ { "unused#558" },
/* 559 */ { "unused#559" },
/* 560 */ { "unused#560" },
/* 561 */ { "unused#561" },
/* 562 */ { "unused#562" },
/* 563 */ { "unused#563" },
/* 564 */ { "unused#564" },
/* 565 */ { "unused#565" },
/* 566 */ { "unused#566" },
/* 567 */ { "unused#567" },
/* 568 */ { "unused#568" },
/* 569 */ { "unused#569" },
/* 570 */ { "unused#570" },
/* 571 */ { "unused#571" },
/* 572 */ { "unused#572" },
/* 573 */ { "unused#573" },
/* 574 */ { "unused#574" },
/* 575 */ { "unused#575" },
/* 576 */ { "unused#576" },
/* 577 */ { "unused#577" },
/* 578 */ { "unused#578" },
/* 579 */ { "unused#579" },
/* 580 */ { "unused#580" },
/* 581 */ { "unused#581" },
/* 582 */ { "unused#582" },
/* 583 */ { "unused#583" },
/* 584 */ { "unused#584" },
/* 585 */ { "unused#585" },
/* 586 */ { "unused#586" },
/* 587 */ { "unused#587" },
/* 588 */ { "unused#588" },
/* 589 */ { "unused#589" },
/* 590 */ { "unused#590" },
/* 591 */ { "unused#591" },
/* 592 */ { "unused#592" },
/* 593 */ { "unused#593" },
/* 594 */ { "unused#594" },
/* 595 */ { "unused#595" },
/* 596 */ { "unused#596" },
/* 597 */ { "unused#597" },
/* 598 */ { "unused#598" },
/* 599 */ { "unused#599" },
/* 600 */ { "unused#600" },
/* 601 */ { "unused#601" },
/* 602 */ { "unused#602" },
/* 603 */ { "unused#603" },
/* 604 */ { "unused#604" },
/* 605 */ { "unused#605" },
/* 606 */ { "unused#606" },
/* 607 */ { "unused#607" },
/* 608 */ { "unused#608" },
/* 609 */ { "unused#609" },
/* 610 */ { "unused#610" },
/* 611 */ { "unused#611" },
/* 612 */ { "unused#612" },
/* 613 */ { "unused#613" },
/* 614 */ { "unused#614" },
/* 615 */ { "unused#615" },
/* 616 */ { "unused#616" },
/* 617 */ { "unused#617" },
/* 618 */ { "unused#618" },
/* 619 */ { "unused#619" },
/* 620 */ { "unused#620" },
/* 621 */ { "unused#621" },
/* 622 */ { "unused#622" },
/* 623 */ { "unused#623" },
/* 624 */ { "unused#624" },
/* 625 */ { "unused#625" },
/* 626 */ { "unused#626" },
/* 627 */ { "unused#627" },
/* 628 */ { "unused#628" },
/* 629 */ { "unused#629" },
/* 630 */ { "unused#630" },
/* 631 */ { "unused#631" },
/* 632 */ { "unused#632" },
/* 633 */ { "unused#633" },
/* 634 */ { "unused#634" },
/* 635 */ { "unused#635" },
/* 636 */ { "unused#636" },
/* 637 */ { "unused#637" },
/* 638 */ { "unused#638" },
/* 639 */ { "unused#639" },
/* 640 */ { "unused#640" },
/* 641 */ { "unused#641" },
/* 642 */ { "unused#642" },
/* 643 */ { "unused#643" },
/* 644 */ { "unused#644" },
/* 645 */ { "unused#645" },
/* 646 */ { "unused#646" },
/* 647 */ { "unused#647" },
/* 648 */ { "unused#648" },
/* 649 */ { "unused#649" },
/* 650 */ { "unused#650" },
/* 651 */ { "unused#651" },
/* 652 */ { "unused#652" },
/* 653 */ { "unused#653" },
/* 654 */ { "unused#654" },
/* 655 */ { "unused#655" },
/* 656 */ { "unused#656" },
/* 657 */ { "unused#657" },
/* 658 */ { "unused#658" },
/* 659 */ { "unused#659" },
/* 660 */ { "unused#660" },
/* 661 */ { "unused#661" },
/* 662 */ { "unused#662" },
/* 663 */ { "unused#663" },
/* 664 */ { "unused#664" },
/* 665 */ { "unused#665" },
/* 666 */ { "unused#666" },
/* 667 */ { "unused#667" },
/* 668 */ { "unused#668" },
/* 669 */ { "unused#669" },
/* 670 */ { "unused#670" },
/* 671 */ { "unused#671" },
/* 672 */ { "unused#672" },
/* 673 */ { "unused#673" },
/* 674 */ { "unused#674" },
/* 675 */ { "unused#675" },
/* 676 */ { "unused#676" },
/* 677 */ { "unused#677" },
/* 678 */ { "unused#678" },
/* 679 */ { "unused#679" },
/* 680 */ { "unused#680" },
/* 681 */ { "unused#681" },
/* 682 */ { "unused#682" },
/* 683 */ { "unused#683" },
/* 684 */ { "unused#684" },
/* 685 */ { "unused#685" },
/* 686 */ { "unused#686" },
/* 687 */ { "unused#687" },
/* 688 */ { "unused#688" },
/* 689 */ { "unused#689" },
/* 690 */ { "unused#690" },
/* 691 */ { "unused#691" },
/* 692 */ { "unused#692" },
/* 693 */ { "unused#693" },
/* 694 */ { "unused#694" },
/* 695 */ { "unused#695" },
/* 696 */ { "unused#696" },
/* 697 */ { "unused#697" },
/* 698 */ { "unused#698" },
/* 699 */ { "unused#699" },
/* 700 */ { "unused#700" },
/* 701 */ { "unused#701" },
/* 702 */ { "unused#702" },
/* 703 */ { "unused#703" },
/* 704 */ { "unused#704" },
/* 705 */ { "unused#705" },
/* 706 */ { "unused#706" },
/* 707 */ { "unused#707" },
/* 708 */ { "unused#708" },
/* 709 */ { "unused#709" },
/* 710 */ { "unused#710" },
/* 711 */ { "unused#711" },
/* 712 */ { "unused#712" },
/* 713 */ { "unused#713" },
/* 714 */ { "unused#714" },
/* 715 */ { "unused#715" },
/* 716 */ { "unused#716" },
/* 717 */ { "unused#717" },
/* 718 */ { "unused#718" },
/* 719 */ { "unused#719" },
/* 720 */ { "unused#720" },
/* 721 */ { "unused#721" },
/* 722 */ { "unused#722" },
/* 723 */ { "unused#723" },
/* 724 */ { "unused#724" },
/* 725 */ { "unused#725" },
/* 726 */ { "unused#726" },
/* 727 */ { "unused#727" },
/* 728 */ { "unused#728" },
/* 729 */ { "unused#729" },
/* 730 */ { "unused#730" },
/* 731 */ { "unused#731" },
/* 732 */ { "unused#732" },
/* 733 */ { "unused#733" },
/* 734 */ { "unused#734" },
/* 735 */ { "unused#735" },
/* 736 */ { "unused#736" },
/* 737 */ { "unused#737" },
/* 738 */ { "unused#738" },
/* 739 */ { "unused#739" },
/* 740 */ { "unused#740" },
/* 741 */ { "unused#741" },
/* 742 */ { "unused#742" },
/* 743 */ { "unused#743" },
/* 744 */ { "unused#744" },
/* 745 */ { "unused#745" },
/* 746 */ { "unused#746" },
/* 747 */ { "unused#747" },
/* 748 */ { "unused#748" },
/* 749 */ { "unused#749" },
/* 750 */ { "unused#750" },
/* 751 */ { "unused#751" },
/* 752 */ { "unused#752" },
/* 753 */ { "unused#753" },
/* 754 */ { "unused#754" },
/* 755 */ { "unused#755" },
/* 756 */ { "unused#756" },
/* 757 */ { "unused#757" },
/* 758 */ { "unused#758" },
/* 759 */ { "unused#759" },
/* 760 */ { "unused#760" },
/* 761 */ { "unused#761" },
/* 762 */ { "unused#762" },
/* 763 */ { "unused#763" },
/* 764 */ { "unused#764" },
/* 765 */ { "unused#765" },
/* 766 */ { "unused#766" },
/* 767 */ { "unused#767" },
/* 768 */ { "unused#768" },
/* 769 */ { "unused#769" },
/* 770 */ { "unused#770" },
/* 771 */ { "unused#771" },
/* 772 */ { "unused#772" },
/* 773 */ { "unused#773" },
/* 774 */ { "unused#774" },
/* 775 */ { "unused#775" },
/* 776 */ { "unused#776" },
/* 777 */ { "unused#777" },
/* 778 */ { "unused#778" },
/* 779 */ { "unused#779" },
/* 780 */ { "unused#780" },
/* 781 */ { "unused#781" },
/* 782 */ { "unused#782" },
/* 783 */ { "unused#783" },
/* 784 */ { "unused#784" },
/* 785 */ { "unused#785" },
/* 786 */ { "unused#786" },
/* 787 */ { "unused#787" },
/* 788 */ { "unused#788" },
/* 789 */ { "unused#789" },
/* 790 */ { "unused#790" },
/* 791 */ { "unused#791" },
/* 792 */ { "unused#792" },
/* 793 */ { "unused#793" },
/* 794 */ { "unused#794" },
/* 795 */ { "unused#795" },
/* 796 */ { "unused#796" },
/* 797 */ { "unused#797" },
/* 798 */ { "unused#798" },
/* 799 */ { "unused#799" },
/* 800 */ { "unused#800" },
/* 801 */ { "unused#801" },
/* 802 */ { "unused#802" },
/* 803 */ { "unused#803" },
/* 804 */ { "unused#804" },
/* 805 */ { "unused#805" },
/* 806 */ { "unused#806" },
/* 807 */ { "unused#807" },
/* 808 */ { "unused#808" },
/* 809 */ { "unused#809" },
/* 810 */ { "unused#810" },
/* 811 */ { "unused#811" },
/* 812 */ { "unused#812" },
/* 813 */ { "unused#813" },
/* 814 */ { "unused#814" },
/* 815 */ { "unused#815" },
/* 816 */ { "unused#816" },
/* 817 */ { "unused#817" },
/* 818 */ { "unused#818" },
/* 819 */ { "unused#819" },
/* 820 */ { "unused#820" },
/* 821 */ { "unused#821" },
/* 822 */ { "unused#822" },
/* 823 */ { "unused#823" },
/* 824 */ { "unused#824" },
/* 825 */ { "unused#825" },
/* 826 */ { "unused#826" },
/* 827 */ { "unused#827" },
/* 828 */ { "unused#828" },
/* 829 */ { "unused#829" },
/* 830 */ { "unused#830" },
/* 831 */ { "unused#831" },
/* 832 */ { "unused#832" },
/* 833 */ { "unused#833" },
/* 834 */ { "unused#834" },
/* 835 */ { "unused#835" },
/* 836 */ { "unused#836" },
/* 837 */ { "unused#837" },
/* 838 */ { "unused#838" },
/* 839 */ { "unused#839" },
/* 840 */ { "unused#840" },
/* 841 */ { "unused#841" },
/* 842 */ { "unused#842" },
/* 843 */ { "unused#843" },
/* 844 */ { "unused#844" },
/* 845 */ { "unused#845" },
/* 846 */ { "unused#846" },
/* 847 */ { "unused#847" },
/* 848 */ { "unused#848" },
/* 849 */ { "unused#849" },
/* 850 */ { "unused#850" },
/* 851 */ { "unused#851" },
/* 852 */ { "unused#852" },
/* 853 */ { "unused#853" },
/* 854 */ { "unused#854" },
/* 855 */ { "unused#855" },
/* 856 */ { "unused#856" },
/* 857 */ { "unused#857" },
/* 858 */ { "unused#858" },
/* 859 */ { "unused#859" },
/* 860 */ { "unused#860" },
/* 861 */ { "unused#861" },
/* 862 */ { "unused#862" },
/* 863 */ { "unused#863" },
/* 864 */ { "unused#864" },
/* 865 */ { "unused#865" },
/* 866 */ { "unused#866" },
/* 867 */ { "unused#867" },
/* 868 */ { "unused#868" },
/* 869 */ { "unused#869" },
/* 870 */ { "unused#870" },
/* 871 */ { "unused#871" },
/* 872 */ { "unused#872" },
/* 873 */ { "unused#873" },
/* 874 */ { "unused#874" },
/* 875 */ { "unused#875" },
/* 876 */ { "unused#876" },
/* 877 */ { "unused#877" },
/* 878 */ { "unused#878" },
/* 879 */ { "unused#879" },
/* 880 */ { "unused#880" },
/* 881 */ { "unused#881" },
/* 882 */ { "unused#882" },
/* 883 */ { "unused#883" },
/* 884 */ { "unused#884" },
/* 885 */ { "unused#885" },
/* 886 */ { "unused#886" },
/* 887 */ { "unused#887" },
/* 888 */ { "unused#888" },
/* 889 */ { "unused#889" },
/* 890 */ { "unused#890" },
/* 891 */ { "unused#891" },
/* 892 */ { "unused#892" },
/* 893 */ { "unused#893" },
/* 894 */ { "unused#894" },
/* 895 */ { "unused#895" },
/* 896 */ { "unused#896" },
/* 897 */ { "unused#897" },
/* 898 */ { "unused#898" },
/* 899 */ { "unused#899" },
/* 900 */ { "unused#900" },
/* 901 */ { "unused#901" },
/* 902 */ { "unused#902" },
/* 903 */ { "unused#903" },
/* 904 */ { "unused#904" },
/* 905 */ { "unused#905" },
/* 906 */ { "unused#906" },
/* 907 */ { "unused#907" },
/* 908 */ { "unused#908" },
/* 909 */ { "unused#909" },
/* 910 */ { "unused#910" },
/* 911 */ { "unused#911" },
/* 912 */ { "unused#912" },
/* 913 */ { "unused#913" },
/* 914 */ { "unused#914" },
/* 915 */ { "unused#915" },
/* 916 */ { "unused#916" },
/* 917 */ { "unused#917" },
/* 918 */ { "unused#918" },
/* 919 */ { "unused#919" },
/* 920 */ { "unused#920" },
/* 921 */ { "unused#921" },
/* 922 */ { "unused#922" },
/* 923 */ { "unused#923" },
/* 924 */ { "unused#924" },
/* 925 */ { "unused#925" },
/* 926 */ { "unused#926" },
/* 927 */ { "unused#927" },
/* 928 */ { "unused#928" },
/* 929 */ { "unused#929" },
/* 930 */ { "unused#930" },
/* 931 */ { "unused#931" },
/* 932 */ { "unused#932" },
/* 933 */ { "unused#933" },
/* 934 */ { "unused#934" },
/* 935 */ { "unused#935" },
/* 936 */ { "unused#936" },
/* 937 */ { "unused#937" },
/* 938 */ { "unused#938" },
/* 939 */ { "unused#939" },
/* 940 */ { "unused#940" },
/* 941 */ { "unused#941" },
/* 942 */ { "unused#942" },
/* 943 */ { "unused#943" },
/* 944 */ { "unused#944" },
/* 945 */ { "unused#945" },
/* 946 */ { "unused#946" },
/* 947 */ { "unused#947" },
/* 948 */ { "unused#948" },
/* 949 */ { "unused#949" },
/* 950 */ { "unused#950" },
/* 951 */ { "unused#951" },
/* 952 */ { "unused#952" },
/* 953 */ { "unused#953" },
/* 954 */ { "unused#954" },
/* 955 */ { "unused#955" },
/* 956 */ { "unused#956" },
/* 957 */ { "unused#957" },
/* 958 */ { "unused#958" },
/* 959 */ { "unused#959" },
/* 960 */ { "unused#960" },
/* 961 */ { "unused#961" },
/* 962 */ { "unused#962" },
/* 963 */ { "unused#963" },
/* 964 */ { "unused#964" },
/* 965 */ { "unused#965" },
/* 966 */ { "unused#966" },
/* 967 */ { "unused#967" },
/* 968 */ { "unused#968" },
/* 969 */ { "unused#969" },
/* 970 */ { "unused#970" },
/* 971 */ { "unused#971" },
/* 972 */ { "unused#972" },
/* 973 */ { "unused#973" },
/* 974 */ { "unused#974" },
/* 975 */ { "unused#975" },
/* 976 */ { "unused#976" },
/* 977 */ { "unused#977" },
/* 978 */ { "unused#978" },
/* 979 */ { "unused#979" },
/* 980 */ { "unused#980" },
/* 981 */ { "unused#981" },
/* 982 */ { "unused#982" },
/* 983 */ { "unused#983" },
/* 984 */ { "unused#984" },
/* 985 */ { "unused#985" },
/* 986 */ { "unused#986" },
/* 987 */ { "unused#987" },
/* 988 */ { "unused#988" },
/* 989 */ { "unused#989" },
/* 990 */ { "unused#990" },
/* 991 */ { "unused#991" },
/* 992 */ { "unused#992" },
/* 993 */ { "unused#993" },
/* 994 */ { "unused#994" },
/* 995 */ { "unused#995" },
/* 996 */ { "unused#996" },
/* 997 */ { "unused#997" },
/* 998 */ { "unused#998" },
/* 999 */ { "unused#999" },
/* 1000 */ { "unused#1000" },
/* 1001 */ { "unused#1001" },
/* 1002 */ { "unused#1002" },
/* 1003 */ { "unused#1003" },
/* 1004 */ { "unused#1004" },
/* 1005 */ { "unused#1005" },
/* 1006 */ { "unused#1006" },
/* 1007 */ { "unused#1007" },
/* 1008 */ { "unused#1008" },
/* 1009 */ { "unused#1009" },
/* 1010 */ { "unused#1010" },
/* 1011 */ { "unused#1011" },
/* 1012 */ { "unused#1012" },
/* 1013 */ { "unused#1013" },
/* 1014 */ { "unused#1014" },
/* 1015 */ { "unused#1015" },
/* 1016 */ { "unused#1016" },
/* 1017 */ { "unused#1017" },
/* 1018 */ { "unused#1018" },
/* 1019 */ { "unused#1019" },
/* 1020 */ { "unused#1020" },
/* 1021 */ { "unused#1021" },
/* 1022 */ { "unused#1022" },
/* 1023 */ { "unused#1023" },
/* 1024 */ { "open", openFunc<ArmLinux64> },
/* 1025 */ { "link" },
/* 1026 */ { "unlink", unlinkFunc },
/* 1027 */ { "mknod" },
/* 1028 */ { "chmod", chmodFunc<ArmLinux64> },
/* 1029 */ { "chown" },
/* 1030 */ { "mkdir", mkdirFunc },
/* 1031 */ { "rmdir" },
/* 1032 */ { "lchown" },
/* 1033 */ { "access", accessFunc },
/* 1034 */ { "rename", renameFunc },
/* 1035 */ { "readlink", readlinkFunc },
/* 1036 */ { "symlink" },
/* 1037 */ { "utimes" },
/* 1038 */ { "stat64", stat64Func<ArmLinux64> },
/* 1039 */ { "lstat64", lstat64Func<ArmLinux64> },
/* 1040 */ { "pipe", pipePseudoFunc },
/* 1041 */ { "dup2" },
/* 1042 */ { "epoll_create" },
/* 1043 */ { "inotify_init" },
/* 1044 */ { "eventfd" },
/* 1045 */ { "signalfd" },
/* 1046 */ { "sendfile" },
/* 1047 */ { "ftruncate", ftruncateFunc },
/* 1048 */ { "truncate", truncateFunc },
/* 1049 */ { "stat", statFunc<ArmLinux64> },
/* 1050 */ { "lstat" },
/* 1051 */ { "fstat", fstatFunc<ArmLinux64> },
/* 1052 */ { "fcntl", fcntlFunc },
/* 1053 */ { "fadvise64" },
/* 1054 */ { "newfstatat" },
/* 1055 */ { "fstatfs" },
/* 1056 */ { "statfs" },
/* 1057 */ { "lseek", lseekFunc },
/* 1058 */ { "mmap", mmapFunc<ArmLinux64> },
/* 1059 */ { "alarm" },
/* 1060 */ { "getpgrp" },
/* 1061 */ { "pause" },
/* 1062 */ { "time", timeFunc<ArmLinux64> },
/* 1063 */ { "utime" },
/* 1064 */ { "creat" },
#if defined(SYS_getdents)
/* 1065 */ { "getdents", getdentsFunc },
#else
/* 1065 */ { "getdents" },
#endif
/* 1066 */ { "futimesat" },
/* 1067 */ { "select" },
/* 1068 */ { "poll" },
/* 1069 */ { "epoll_wait" },
/* 1070 */ { "ustat" },
/* 1071 */ { "vfork" },
/* 1072 */ { "oldwait4" },
/* 1073 */ { "recv" },
/* 1074 */ { "send" },
/* 1075 */ { "bdflush" },
/* 1076 */ { "umount" },
/* 1077 */ { "uselib" },
/* 1078 */ { "_sysctl" },
/* 1079 */ { "fork" }
};
static SyscallDescABI<DefaultSyscallABI> privSyscallDescs32[] = {
/* 1 */ { "breakpoint" },
/* 2 */ { "cacheflush" },
/* 3 */ { "usr26" },
/* 4 */ { "usr32" },
/* 5 */ { "set_tls", setTLSFunc32 }
};
// Indices 1, 3 and 4 are unallocated.
static SyscallDescABI<DefaultSyscallABI> privSyscallDescs64[] = {
/* 1 */ { "unallocated" },
/* 2 */ { "cacheflush" },
/* 3 */ { "unallocated" },
/* 4 */ { "unallocated" },
/* 5 */ { "set_tls", setTLSFunc64 }
};
ArmLinuxProcess32::ArmLinuxProcess32(ProcessParams * params,
ObjectFile *objFile, ObjectFile::Arch _arch)
: ArmProcess32(params, objFile, _arch)
{
SyscallTable table;
table.descs = syscallDescs32;
table.size = sizeof(syscallDescs32) / sizeof(SyscallDesc);
table.base = 0;
syscallTables.push_back(table);
table.base = 0x900000;
syscallTables.push_back(table);
table.descs = privSyscallDescs32;
table.size = sizeof(privSyscallDescs32) / sizeof(SyscallDesc);
table.base = 0xf0001;
syscallTables.push_back(table);
}
ArmLinuxProcess64::ArmLinuxProcess64(ProcessParams * params,
ObjectFile *objFile, ObjectFile::Arch _arch)
: ArmProcess64(params, objFile, _arch)
{
SyscallTable table;
table.descs = syscallDescs64;
table.size = sizeof(syscallDescs64) / sizeof(SyscallDesc);
table.base = 0;
syscallTables.push_back(table);
table.base = 0x900000;
syscallTables.push_back(table);
table.descs = privSyscallDescs64;
table.size = sizeof(privSyscallDescs64) / sizeof(SyscallDesc);
table.base = 0x1001;
syscallTables.push_back(table);
}
const Addr ArmLinuxProcess32::commPage = 0xffff0000;
SyscallDesc*
ArmLinuxProcessBits::getLinuxDesc(int callnum)
{
// Angel SWI syscalls are unsupported in this release
if (callnum == 0x123456)
panic("Attempt to execute an ANGEL_SWI system call (newlib-related)");
for (unsigned i = 0; i < syscallTables.size(); i++) {
SyscallDesc *desc = syscallTables[i].getDesc(callnum);
if (desc)
return desc;
}
return NULL;
}
SyscallDesc *
ArmLinuxProcessBits::SyscallTable::getDesc(int callnum) const
{
int offset = callnum - base;
if (offset < 0 || offset >= size)
return NULL;
return &descs[offset];
}
SyscallDesc*
ArmLinuxProcess32::getDesc(int callnum)
{
return getLinuxDesc(callnum);
}
SyscallDesc*
ArmLinuxProcess64::getDesc(int callnum)
{
return getLinuxDesc(callnum);
}
void
ArmLinuxProcess32::initState()
{
ArmProcess32::initState();
allocateMem(commPage, PageBytes);
ThreadContext *tc = system->getThreadContext(contextIds[0]);
uint8_t swiNeg1[] = {
0xff, 0xff, 0xff, 0xef // swi -1
};
// Fill this page with swi -1 so we'll no if we land in it somewhere.
for (Addr addr = 0; addr < PageBytes; addr += sizeof(swiNeg1)) {
tc->getVirtProxy().writeBlob(commPage + addr,
swiNeg1, sizeof(swiNeg1));
}
uint8_t memory_barrier[] =
{
0x5f, 0xf0, 0x7f, 0xf5, // dmb
0x0e, 0xf0, 0xa0, 0xe1 // return
};
tc->getVirtProxy().writeBlob(commPage + 0x0fa0, memory_barrier,
sizeof(memory_barrier));
uint8_t cmpxchg[] =
{
0x9f, 0x3f, 0x92, 0xe1, // ldrex r3, [r2]
0x00, 0x30, 0x53, 0xe0, // subs r3, r3, r0
0x91, 0x3f, 0x82, 0x01, // strexeq r3, r1, [r2]
0x01, 0x00, 0x33, 0x03, // teqeq r3, #1
0xfa, 0xff, 0xff, 0x0a, // beq 1b
0x00, 0x00, 0x73, 0xe2, // rsbs r0, r3, #0
0x5f, 0xf0, 0x7f, 0xf5, // dmb
0x0e, 0xf0, 0xa0, 0xe1 // return
};
tc->getVirtProxy().writeBlob(commPage + 0x0fc0, cmpxchg, sizeof(cmpxchg));
uint8_t get_tls[] =
{
// read user read-only thread id register
0x70, 0x0f, 0x1d, 0xee, // mrc p15, 0, r0, c13, c0, 3
0x0e, 0xf0, 0xa0, 0xe1 // return
};
tc->getVirtProxy().writeBlob(commPage + 0x0fe0, get_tls, sizeof(get_tls));
}
void
ArmLinuxProcess64::initState()
{
ArmProcess64::initState();
// The 64 bit equivalent of the comm page would be set up here.
}
void
ArmLinuxProcess32::syscall(ThreadContext *tc, Fault *fault)
{
doSyscall(tc->readIntReg(INTREG_R7), tc, fault);
}
void
ArmLinuxProcess64::syscall(ThreadContext *tc, Fault *fault)
{
doSyscall(tc->readIntReg(INTREG_X8), tc, fault);
}