syscalls.cc revision 14024
110037SARM gem5 Developers/*
210037SARM gem5 Developers * Copyright (c) 2003-2005 The Regents of The University of Michigan
312505Snikos.nikoleris@arm.com * All rights reserved.
410037SARM gem5 Developers *
510037SARM gem5 Developers * Redistribution and use in source and binary forms, with or without
610037SARM gem5 Developers * modification, are permitted provided that the following conditions are
710037SARM gem5 Developers * met: redistributions of source code must retain the above copyright
810037SARM gem5 Developers * notice, this list of conditions and the following disclaimer;
910037SARM gem5 Developers * redistributions in binary form must reproduce the above copyright
1010037SARM gem5 Developers * notice, this list of conditions and the following disclaimer in the
1110037SARM gem5 Developers * documentation and/or other materials provided with the distribution;
1210037SARM gem5 Developers * neither the name of the copyright holders nor the names of its
1310037SARM gem5 Developers * contributors may be used to endorse or promote products derived from
1410037SARM gem5 Developers * this software without specific prior written permission.
1510037SARM gem5 Developers *
1610037SARM gem5 Developers * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1710037SARM gem5 Developers * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1810037SARM gem5 Developers * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1910037SARM gem5 Developers * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2010037SARM gem5 Developers * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2110037SARM gem5 Developers * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2210037SARM gem5 Developers * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2310037SARM gem5 Developers * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2410037SARM gem5 Developers * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2510037SARM gem5 Developers * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2610037SARM gem5 Developers * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2710037SARM gem5 Developers *
2810037SARM gem5 Developers * Authors: Gabe Black
2910037SARM gem5 Developers */
3010037SARM gem5 Developers
3110037SARM gem5 Developers#include "arch/sparc/linux/process.hh"
3210037SARM gem5 Developers#include "sim/syscall_desc.hh"
3310037SARM gem5 Developers#include "sim/syscall_emul.hh"
3410037SARM gem5 Developers
3510037SARM gem5 Developersclass Process;
3610037SARM gem5 Developersclass ThreadContext;
3710037SARM gem5 Developers
3810037SARM gem5 Developersnamespace SparcISA {
3910037SARM gem5 Developers
4010037SARM gem5 Developers/// Target uname() handler.
4110037SARM gem5 Developersstatic SyscallReturn
4210037SARM gem5 DevelopersunameFunc(SyscallDesc *desc, int callnum, ThreadContext *tc)
4310037SARM gem5 Developers{
4410037SARM gem5 Developers    int index = 0;
4510037SARM gem5 Developers    auto process = tc->getProcessPtr();
4610037SARM gem5 Developers    TypedBufferArg<Linux::utsname> name(process->getSyscallArg(tc, index));
4710037SARM gem5 Developers
4810037SARM gem5 Developers    strcpy(name->sysname, "Linux");
4910037SARM gem5 Developers    strcpy(name->nodename, "sim.gem5.org");
5010037SARM gem5 Developers    strcpy(name->release, process->release.c_str());
5110037SARM gem5 Developers    strcpy(name->version, "#1 Mon Aug 18 11:32:15 EDT 2003");
5210037SARM gem5 Developers    strcpy(name->machine, "sparc");
5311862Snikos.nikoleris@arm.com
5410037SARM gem5 Developers    name.copyOut(tc->getVirtProxy());
5510037SARM gem5 Developers
5610037SARM gem5 Developers    return 0;
5710037SARM gem5 Developers}
5810037SARM gem5 Developers
5910037SARM gem5 Developers
6010037SARM gem5 DevelopersSyscallReturn
6110037SARM gem5 DevelopersgetresuidFunc(SyscallDesc *desc, int num, ThreadContext *tc)
6210037SARM gem5 Developers{
6310037SARM gem5 Developers    const uint64_t id = htog(100);
6410037SARM gem5 Developers    int index = 0;
6510037SARM gem5 Developers    auto p = tc->getProcessPtr();
6610037SARM gem5 Developers    Addr ruid = p->getSyscallArg(tc, index);
6710037SARM gem5 Developers    Addr euid = p->getSyscallArg(tc, index);
6810037SARM gem5 Developers    Addr suid = p->getSyscallArg(tc, index);
6910037SARM gem5 Developers    // Handle the EFAULT case
7010037SARM gem5 Developers    // Set the ruid
7110037SARM gem5 Developers    if (ruid) {
7210037SARM gem5 Developers        BufferArg ruidBuff(ruid, sizeof(uint64_t));
7310037SARM gem5 Developers        memcpy(ruidBuff.bufferPtr(), &id, sizeof(uint64_t));
7410037SARM gem5 Developers        ruidBuff.copyOut(tc->getVirtProxy());
7510037SARM gem5 Developers    }
7610037SARM gem5 Developers    // Set the euid
7710037SARM gem5 Developers    if (euid) {
7810037SARM gem5 Developers        BufferArg euidBuff(euid, sizeof(uint64_t));
7910037SARM gem5 Developers        memcpy(euidBuff.bufferPtr(), &id, sizeof(uint64_t));
8010037SARM gem5 Developers        euidBuff.copyOut(tc->getVirtProxy());
8110037SARM gem5 Developers    }
8210037SARM gem5 Developers    // Set the suid
8310037SARM gem5 Developers    if (suid) {
8410037SARM gem5 Developers        BufferArg suidBuff(suid, sizeof(uint64_t));
8510037SARM gem5 Developers        memcpy(suidBuff.bufferPtr(), &id, sizeof(uint64_t));
8610037SARM gem5 Developers        suidBuff.copyOut(tc->getVirtProxy());
8710037SARM gem5 Developers    }
8810037SARM gem5 Developers    return 0;
8910037SARM gem5 Developers}
9010037SARM gem5 Developers
9110037SARM gem5 DevelopersSyscallDesc SparcLinuxProcess::syscall32Descs[] = {
9210037SARM gem5 Developers    /*   0 */ SyscallDesc("restart_syscall", unimplementedFunc),
9310037SARM gem5 Developers    /*   1 */ SyscallDesc("exit", exitFunc), // 32 bit
9410037SARM gem5 Developers    /*   2 */ SyscallDesc("fork", unimplementedFunc),
9510037SARM gem5 Developers    /*   3 */ SyscallDesc("read", readFunc<Sparc32Linux>),
9610037SARM gem5 Developers    /*   4 */ SyscallDesc("write", writeFunc<Sparc32Linux>),
9710037SARM gem5 Developers    /*   5 */ SyscallDesc("open", openFunc<Sparc32Linux>), // 32 bit
9810037SARM gem5 Developers    /*   6 */ SyscallDesc("close", closeFunc),
9910037SARM gem5 Developers    /*   7 */ SyscallDesc("wait4", unimplementedFunc), // 32 bit
10010037SARM gem5 Developers    /*   8 */ SyscallDesc("creat", unimplementedFunc), // 32 bit
10110037SARM gem5 Developers    /*   9 */ SyscallDesc("link", unimplementedFunc),
10210037SARM gem5 Developers    /*  10 */ SyscallDesc("unlink", unlinkFunc),
10310037SARM gem5 Developers    /*  11 */ SyscallDesc("execv", unimplementedFunc),
10410037SARM gem5 Developers    /*  12 */ SyscallDesc("chdir", unimplementedFunc),
10510037SARM gem5 Developers    /*  13 */ SyscallDesc("chown", chownFunc), // 32 bit
10610037SARM gem5 Developers    /*  14 */ SyscallDesc("mknod", unimplementedFunc),
10710037SARM gem5 Developers    /*  15 */ SyscallDesc("chmod", unimplementedFunc),
10810037SARM gem5 Developers    /*  16 */ SyscallDesc("lchown", unimplementedFunc), // 32 bit
10910037SARM gem5 Developers    /*  17 */ SyscallDesc("brk", brkFunc),
11010037SARM gem5 Developers    /*  18 */ SyscallDesc("perfctr", unimplementedFunc), // 32 bit
11110037SARM gem5 Developers    /*  19 */ SyscallDesc("lseek", lseekFunc), // 32 bit
11210037SARM gem5 Developers    /*  20 */ SyscallDesc("getpid", getpidFunc),
11310037SARM gem5 Developers    /*  21 */ SyscallDesc("capget", unimplementedFunc),
11410037SARM gem5 Developers    /*  22 */ SyscallDesc("capset", unimplementedFunc),
11510037SARM gem5 Developers    /*  23 */ SyscallDesc("setuid", setuidFunc), // 32 bit
11610037SARM gem5 Developers    /*  24 */ SyscallDesc("getuid", getuidFunc), // 32 bit
11710037SARM gem5 Developers    /*  25 */ SyscallDesc("time", unimplementedFunc),
11810037SARM gem5 Developers    /*  26 */ SyscallDesc("ptrace", unimplementedFunc),
11910037SARM gem5 Developers    /*  27 */ SyscallDesc("alarm", unimplementedFunc),
12010037SARM gem5 Developers    /*  28 */ SyscallDesc("sigaltstack", unimplementedFunc), // 32 bit
12110037SARM gem5 Developers    /*  29 */ SyscallDesc("pause", unimplementedFunc), // 32 bit
12210037SARM gem5 Developers    /*  30 */ SyscallDesc("utime", unimplementedFunc),
12310037SARM gem5 Developers    /*  31 */ SyscallDesc("lchown32", unimplementedFunc),
12410037SARM gem5 Developers    /*  32 */ SyscallDesc("fchown32", unimplementedFunc),
12510037SARM gem5 Developers    /*  33 */ SyscallDesc("access", unimplementedFunc), // 32 bit
12610037SARM gem5 Developers    /*  34 */ SyscallDesc("nice", unimplementedFunc), // 32 bit
12710037SARM gem5 Developers    /*  35 */ SyscallDesc("chown32", unimplementedFunc),
12810037SARM gem5 Developers    /*  36 */ SyscallDesc("sync", unimplementedFunc),
12910037SARM gem5 Developers    /*  37 */ SyscallDesc("kill", unimplementedFunc), // 32 bit
13010037SARM gem5 Developers    /*  38 */ SyscallDesc("stat", unimplementedFunc),
13110037SARM gem5 Developers    /*  39 */ SyscallDesc("sendfile", unimplementedFunc), // 32 bit
13210037SARM gem5 Developers    /*  40 */ SyscallDesc("lstat", unimplementedFunc),
13310037SARM gem5 Developers    /*  41 */ SyscallDesc("dup", unimplementedFunc),
13410037SARM gem5 Developers    /*  42 */ SyscallDesc("pipe", pipePseudoFunc),
13510037SARM gem5 Developers    /*  43 */ SyscallDesc("times", ignoreFunc),
13610037SARM gem5 Developers    /*  44 */ SyscallDesc("getuid32", unimplementedFunc),
13710037SARM gem5 Developers    /*  45 */ SyscallDesc("umount2", unimplementedFunc), // 32 bit
13810037SARM gem5 Developers    /*  46 */ SyscallDesc("setgid", unimplementedFunc), // 32 bit
13910037SARM gem5 Developers    /*  47 */ SyscallDesc("getgid", getgidFunc), // 32 bit
14010037SARM gem5 Developers    /*  48 */ SyscallDesc("signal", unimplementedFunc), // 32 bit
14110037SARM gem5 Developers    /*  49 */ SyscallDesc("geteuid", geteuidFunc), // 32 bit
14210037SARM gem5 Developers    /*  50 */ SyscallDesc("getegid", getegidFunc), // 32 bit
14310037SARM gem5 Developers    /*  51 */ SyscallDesc("acct", unimplementedFunc),
14410037SARM gem5 Developers    /*  52 */ SyscallDesc("memory_ordering", unimplementedFunc),
14510037SARM gem5 Developers    /*  53 */ SyscallDesc("getgid32", unimplementedFunc),
14610037SARM gem5 Developers    /*  54 */ SyscallDesc("ioctl", unimplementedFunc),
14710037SARM gem5 Developers    /*  55 */ SyscallDesc("reboot", unimplementedFunc), // 32 bit
14810037SARM gem5 Developers    /*  56 */ SyscallDesc("mmap2", unimplementedFunc), // 32 bit
14910037SARM gem5 Developers    /*  57 */ SyscallDesc("symlink", unimplementedFunc),
15010037SARM gem5 Developers    /*  58 */ SyscallDesc("readlink", readlinkFunc), // 32 bit
15110037SARM gem5 Developers    /*  59 */ SyscallDesc("execve", unimplementedFunc), // 32 bit
15210037SARM gem5 Developers    /*  60 */ SyscallDesc("umask", unimplementedFunc), // 32 bit
15310037SARM gem5 Developers    /*  61 */ SyscallDesc("chroot", unimplementedFunc),
15410037SARM gem5 Developers    /*  62 */ SyscallDesc("fstat", unimplementedFunc),
15510037SARM gem5 Developers    /*  63 */ SyscallDesc("fstat64", fstat64Func<Sparc32Linux>),
15610037SARM gem5 Developers    /*  64 */ SyscallDesc("getpagesize", unimplementedFunc),
15710037SARM gem5 Developers    /*  65 */ SyscallDesc("msync", unimplementedFunc), // 32 bit
15810037SARM gem5 Developers    /*  66 */ SyscallDesc("vfork", unimplementedFunc),
15910037SARM gem5 Developers    /*  67 */ SyscallDesc("pread64", unimplementedFunc), // 32 bit
16010037SARM gem5 Developers    /*  68 */ SyscallDesc("pwrite64", unimplementedFunc), // 32 bit
16110037SARM gem5 Developers    /*  69 */ SyscallDesc("geteuid32", unimplementedFunc),
16210037SARM gem5 Developers    /*  70 */ SyscallDesc("getegid32", unimplementedFunc),
16310037SARM gem5 Developers    /*  71 */ SyscallDesc("mmap", mmapFunc<Sparc32Linux>),
16410037SARM gem5 Developers    /*  72 */ SyscallDesc("setreuid32", unimplementedFunc),
16510037SARM gem5 Developers    /*  73 */ SyscallDesc("munmap", munmapFunc),
16610037SARM gem5 Developers    /*  74 */ SyscallDesc("mprotect", ignoreFunc),
16710037SARM gem5 Developers    /*  75 */ SyscallDesc("madvise", unimplementedFunc),
16810037SARM gem5 Developers    /*  76 */ SyscallDesc("vhangup", unimplementedFunc),
16910037SARM gem5 Developers    /*  77 */ SyscallDesc("truncate64", unimplementedFunc), // 32 bit
17010037SARM gem5 Developers    /*  78 */ SyscallDesc("mincore", unimplementedFunc),
17110037SARM gem5 Developers    /*  79 */ SyscallDesc("getgroups", unimplementedFunc), // 32 bit
17210037SARM gem5 Developers    /*  80 */ SyscallDesc("setgroups", unimplementedFunc), // 32 bit
17310037SARM gem5 Developers    /*  81 */ SyscallDesc("getpgrp", unimplementedFunc),
17410037SARM gem5 Developers    /*  82 */ SyscallDesc("setgroups32", unimplementedFunc), // 32 bit
17510037SARM gem5 Developers    /*  83 */ SyscallDesc("setitimer", unimplementedFunc), // 32 bit
17610037SARM gem5 Developers    /*  84 */ SyscallDesc("ftruncate64", unimplementedFunc), // 32 bit
17710037SARM gem5 Developers    /*  85 */ SyscallDesc("swapon", unimplementedFunc), // 32 bit
17810037SARM gem5 Developers    /*  86 */ SyscallDesc("getitimer", unimplementedFunc), // 32 bit
17910037SARM gem5 Developers    /*  87 */ SyscallDesc("setuid32", unimplementedFunc),
18010037SARM gem5 Developers    /*  88 */ SyscallDesc("sethostname", unimplementedFunc), // 32 bit
18110037SARM gem5 Developers    /*  89 */ SyscallDesc("setgid32", unimplementedFunc),
18210037SARM gem5 Developers    /*  90 */ SyscallDesc("dup2", unimplementedFunc),
18310037SARM gem5 Developers    /*  91 */ SyscallDesc("setfsuid32", unimplementedFunc),
18410037SARM gem5 Developers    /*  92 */ SyscallDesc("fcntl", unimplementedFunc),
18510037SARM gem5 Developers    /*  93 */ SyscallDesc("select", unimplementedFunc), // 32 bit
18610037SARM gem5 Developers    /*  94 */ SyscallDesc("setfsgid32", unimplementedFunc),
18710037SARM gem5 Developers    /*  95 */ SyscallDesc("fsync", unimplementedFunc),
18810037SARM gem5 Developers    /*  96 */ SyscallDesc("setpriority", unimplementedFunc), // 32 bit
18910037SARM gem5 Developers    /*  97 */ SyscallDesc("socket", unimplementedFunc),
19010037SARM gem5 Developers    /*  98 */ SyscallDesc("connect", unimplementedFunc),
19110037SARM gem5 Developers    /*  99 */ SyscallDesc("accept", unimplementedFunc),
19210037SARM gem5 Developers    /* 100 */ SyscallDesc("getpriority", unimplementedFunc), // 32 bit
19310037SARM gem5 Developers    /* 101 */ SyscallDesc("rt_sigreturn", unimplementedFunc), // 32 bit
19410037SARM gem5 Developers    /* 102 */ SyscallDesc("rt_sigaction", ignoreFunc), // 32 bit
19510037SARM gem5 Developers    /* 103 */ SyscallDesc("rt_sigprocmask", ignoreFunc), // 32 bit
19610037SARM gem5 Developers    /* 104 */ SyscallDesc("rt_sigpending", unimplementedFunc), // 32 bit
19710037SARM gem5 Developers    /* 105 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
19810037SARM gem5 Developers    /* 106 */ SyscallDesc("rt_sigqueueinfo", unimplementedFunc), // 32 bit
19910037SARM gem5 Developers    /* 107 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
20010037SARM gem5 Developers    /* 108 */ SyscallDesc("setresuid32", unimplementedFunc),
20110037SARM gem5 Developers    /* 109 */ SyscallDesc("getresuid32", getresuidFunc),
20210037SARM gem5 Developers    /* 110 */ SyscallDesc("setresgid32", ignoreFunc),
20310037SARM gem5 Developers    /* 111 */ SyscallDesc("getresgid32", unimplementedFunc),
20410037SARM gem5 Developers    /* 112 */ SyscallDesc("setregid32", unimplementedFunc),
20510037SARM gem5 Developers    /* 113 */ SyscallDesc("revcmsg", unimplementedFunc),
20610037SARM gem5 Developers    /* 114 */ SyscallDesc("sendmsg", unimplementedFunc),
20710037SARM gem5 Developers    /* 115 */ SyscallDesc("getgroups32", unimplementedFunc), // 32 bit
20810037SARM gem5 Developers    /* 116 */ SyscallDesc("gettimeofday", gettimeofdayFunc<Sparc32Linux>), // 32 bit
20910037SARM gem5 Developers    /* 117 */ SyscallDesc("getrusage", unimplementedFunc), // 32 bit
21010037SARM gem5 Developers    /* 118 */ SyscallDesc("getsockopt", unimplementedFunc),
21110037SARM gem5 Developers    /* 119 */ SyscallDesc("getcwd", getcwdFunc),
21210037SARM gem5 Developers    /* 120 */ SyscallDesc("readv", unimplementedFunc),
21310037SARM gem5 Developers    /* 121 */ SyscallDesc("writev", unimplementedFunc),
21410037SARM gem5 Developers    /* 122 */ SyscallDesc("settimeofday", unimplementedFunc), // 32 bit
21510037SARM gem5 Developers    /* 123 */ SyscallDesc("fchown", unimplementedFunc), // 32 bit
21610037SARM gem5 Developers    /* 124 */ SyscallDesc("fchmod", unimplementedFunc),
21710037SARM gem5 Developers    /* 125 */ SyscallDesc("recvfrom", unimplementedFunc),
21810037SARM gem5 Developers    /* 126 */ SyscallDesc("setreuid", unimplementedFunc), // 32 bit
21910037SARM gem5 Developers    /* 127 */ SyscallDesc("setregid", unimplementedFunc), // 32 bit
22010037SARM gem5 Developers    /* 128 */ SyscallDesc("rename", renameFunc),
22110037SARM gem5 Developers    /* 129 */ SyscallDesc("truncate", unimplementedFunc),
22210037SARM gem5 Developers    /* 130 */ SyscallDesc("ftruncate", unimplementedFunc),
22310037SARM gem5 Developers    /* 131 */ SyscallDesc("flock", unimplementedFunc),
22410037SARM gem5 Developers    /* 132 */ SyscallDesc("lstat64", unimplementedFunc),
22510037SARM gem5 Developers    /* 133 */ SyscallDesc("sendto", unimplementedFunc),
22610037SARM gem5 Developers    /* 134 */ SyscallDesc("shutdown", unimplementedFunc),
22710037SARM gem5 Developers    /* 135 */ SyscallDesc("socketpair", unimplementedFunc),
22810037SARM gem5 Developers    /* 136 */ SyscallDesc("mkdir", mkdirFunc), // 32 bit
22912258Sgiacomo.travaglini@arm.com    /* 137 */ SyscallDesc("rmdir", unimplementedFunc),
23012258Sgiacomo.travaglini@arm.com    /* 138 */ SyscallDesc("utimes", unimplementedFunc), // 32 bit
23112258Sgiacomo.travaglini@arm.com    /* 139 */ SyscallDesc("stat64", unimplementedFunc),
23212258Sgiacomo.travaglini@arm.com    /* 140 */ SyscallDesc("sendfile64", unimplementedFunc), // 32 bit
23312258Sgiacomo.travaglini@arm.com    /* 141 */ SyscallDesc("getpeername", unimplementedFunc),
23412258Sgiacomo.travaglini@arm.com    /* 142 */ SyscallDesc("futex", unimplementedFunc), // 32 bit
23512258Sgiacomo.travaglini@arm.com    /* 143 */ SyscallDesc("gettid", unimplementedFunc),
23612258Sgiacomo.travaglini@arm.com    /* 144 */ SyscallDesc("getrlimit", unimplementedFunc),
23712258Sgiacomo.travaglini@arm.com    /* 145 */ SyscallDesc("setrlimit", unimplementedFunc),
23812258Sgiacomo.travaglini@arm.com    /* 146 */ SyscallDesc("pivot_root", unimplementedFunc),
23912258Sgiacomo.travaglini@arm.com    /* 147 */ SyscallDesc("prctl", unimplementedFunc), // 32 bit
24012258Sgiacomo.travaglini@arm.com    /* 148 */ SyscallDesc("pciconfig_read", unimplementedFunc),
24112258Sgiacomo.travaglini@arm.com    /* 149 */ SyscallDesc("pciconfig_write", unimplementedFunc),
24212258Sgiacomo.travaglini@arm.com    /* 150 */ SyscallDesc("getsockname", unimplementedFunc),
24312258Sgiacomo.travaglini@arm.com    /* 151 */ SyscallDesc("inotify_init", unimplementedFunc),
24412258Sgiacomo.travaglini@arm.com    /* 152 */ SyscallDesc("inotify_add_watch", unimplementedFunc),
24512258Sgiacomo.travaglini@arm.com    /* 153 */ SyscallDesc("poll", unimplementedFunc),
24612258Sgiacomo.travaglini@arm.com    /* 154 */ SyscallDesc("getdents64", unimplementedFunc),
24712258Sgiacomo.travaglini@arm.com    /* 155 */ SyscallDesc("fcntl64", unimplementedFunc),
24812258Sgiacomo.travaglini@arm.com    /* 156 */ SyscallDesc("inotify_rm_watch", unimplementedFunc),
24912258Sgiacomo.travaglini@arm.com    /* 157 */ SyscallDesc("statfs", unimplementedFunc),
25012258Sgiacomo.travaglini@arm.com    /* 158 */ SyscallDesc("fstatfs", unimplementedFunc),
25112258Sgiacomo.travaglini@arm.com    /* 159 */ SyscallDesc("umount", unimplementedFunc),
25212258Sgiacomo.travaglini@arm.com    /* 160 */ SyscallDesc("sched_setaffinity", unimplementedFunc),
25312258Sgiacomo.travaglini@arm.com    /* 161 */ SyscallDesc("sched_getaffinity", unimplementedFunc),
25412258Sgiacomo.travaglini@arm.com    /* 162 */ SyscallDesc("getdomainname", unimplementedFunc), // 32 bit
25512258Sgiacomo.travaglini@arm.com    /* 163 */ SyscallDesc("setdomainname", unimplementedFunc), // 32 bit
25612258Sgiacomo.travaglini@arm.com    /* 164 */ SyscallDesc("ni_syscall", unimplementedFunc),
25712258Sgiacomo.travaglini@arm.com    /* 165 */ SyscallDesc("quotactl", unimplementedFunc),
25812258Sgiacomo.travaglini@arm.com    /* 166 */ SyscallDesc("set_tid_address", unimplementedFunc),
25912258Sgiacomo.travaglini@arm.com    /* 167 */ SyscallDesc("mount", unimplementedFunc),
26012258Sgiacomo.travaglini@arm.com    /* 168 */ SyscallDesc("ustat", unimplementedFunc),
26112258Sgiacomo.travaglini@arm.com    /* 169 */ SyscallDesc("setxattr", unimplementedFunc), // 32 bit
26212258Sgiacomo.travaglini@arm.com    /* 170 */ SyscallDesc("lsetxattr", unimplementedFunc), // 32 bit
26312258Sgiacomo.travaglini@arm.com    /* 171 */ SyscallDesc("fsetxattr", unimplementedFunc), // 32 bit
26412258Sgiacomo.travaglini@arm.com    /* 172 */ SyscallDesc("getxattr", unimplementedFunc),
26510037SARM gem5 Developers    /* 173 */ SyscallDesc("lgetxattr", unimplementedFunc),
26610037SARM gem5 Developers    /* 174 */ SyscallDesc("getdents", unimplementedFunc),
26710037SARM gem5 Developers    /* 175 */ SyscallDesc("setsid", unimplementedFunc),
26810037SARM gem5 Developers    /* 176 */ SyscallDesc("fchdir", unimplementedFunc),
26910037SARM gem5 Developers    /* 177 */ SyscallDesc("fgetxattr", unimplementedFunc), // 32 bit
27010037SARM gem5 Developers    /* 178 */ SyscallDesc("listxattr", unimplementedFunc),
27110037SARM gem5 Developers    /* 179 */ SyscallDesc("llistxattr", unimplementedFunc),
27210037SARM gem5 Developers    /* 180 */ SyscallDesc("flistxattr", unimplementedFunc), // 32 bit
27310037SARM gem5 Developers    /* 181 */ SyscallDesc("removexattr", unimplementedFunc),
27410037SARM gem5 Developers    /* 182 */ SyscallDesc("lremovexattr", unimplementedFunc),
27510037SARM gem5 Developers    /* 183 */ SyscallDesc("sigpending", unimplementedFunc),
27610037SARM gem5 Developers    /* 184 */ SyscallDesc("query_module", unimplementedFunc),
27710037SARM gem5 Developers    /* 185 */ SyscallDesc("setpgid", unimplementedFunc), // 32 bit
27810037SARM gem5 Developers    /* 186 */ SyscallDesc("fremovexattr", unimplementedFunc), // 32 bit
27910037SARM gem5 Developers    /* 187 */ SyscallDesc("tkill", unimplementedFunc), // 32 bit
28010037SARM gem5 Developers    /* 188 */ SyscallDesc("exit_group", exitGroupFunc), // 32 bit
28110037SARM gem5 Developers    /* 189 */ SyscallDesc("uname", unameFunc),
28210037SARM gem5 Developers    /* 190 */ SyscallDesc("init_module", unimplementedFunc), // 32 bit
28310037SARM gem5 Developers    /* 191 */ SyscallDesc("personality", unimplementedFunc),
28410037SARM gem5 Developers    /* 192 */ SyscallDesc("remap_file_pages", unimplementedFunc),
28510037SARM gem5 Developers    /* 193 */ SyscallDesc("epoll_create", unimplementedFunc), // 32 bit
28610037SARM gem5 Developers    /* 194 */ SyscallDesc("epoll_ctl", unimplementedFunc), // 32 bit
28712227Sgiacomo.travaglini@arm.com    /* 195 */ SyscallDesc("epoll_wait", unimplementedFunc), // 32 bit
28810037SARM gem5 Developers    /* 196 */ SyscallDesc("ioprio_set", unimplementedFunc), // 32 bit
28910037SARM gem5 Developers    /* 197 */ SyscallDesc("getppid", getppidFunc),
29010037SARM gem5 Developers    /* 198 */ SyscallDesc("sigaction", unimplementedFunc), // 32 bit
29110037SARM gem5 Developers    /* 199 */ SyscallDesc("sgetmask", unimplementedFunc),
29210037SARM gem5 Developers    /* 200 */ SyscallDesc("ssetmask", unimplementedFunc),
29310037SARM gem5 Developers    /* 201 */ SyscallDesc("sigsuspend", unimplementedFunc),
29410037SARM gem5 Developers    /* 202 */ SyscallDesc("oldlstat", unimplementedFunc),
29510037SARM gem5 Developers    /* 203 */ SyscallDesc("uselib", unimplementedFunc),
29610037SARM gem5 Developers    /* 204 */ SyscallDesc("readdir", unimplementedFunc),
29710037SARM gem5 Developers    /* 205 */ SyscallDesc("readahead", unimplementedFunc), // 32 bit
29810037SARM gem5 Developers    /* 206 */ SyscallDesc("socketcall", unimplementedFunc), // 32 bit
29910037SARM gem5 Developers    /* 207 */ SyscallDesc("syslog", unimplementedFunc), // 32 bit
30010037SARM gem5 Developers    /* 208 */ SyscallDesc("lookup_dcookie", unimplementedFunc), // 32 bit
30110037SARM gem5 Developers    /* 209 */ SyscallDesc("fadvise64", unimplementedFunc), // 32 bit
30210037SARM gem5 Developers    /* 210 */ SyscallDesc("fadvise64_64", unimplementedFunc), // 32 bit
30310037SARM gem5 Developers    /* 211 */ SyscallDesc("tgkill", unimplementedFunc), // 32 bit
30410037SARM gem5 Developers    /* 212 */ SyscallDesc("waitpid", unimplementedFunc), // 32 bit
30510037SARM gem5 Developers    /* 213 */ SyscallDesc("swapoff", unimplementedFunc),
30610037SARM gem5 Developers    /* 214 */ SyscallDesc("sysinfo", sysinfoFunc<Sparc32Linux>), // 32 bit
30710037SARM gem5 Developers    /* 215 */ SyscallDesc("ipc", unimplementedFunc), // 32 bit
30810037SARM gem5 Developers    /* 216 */ SyscallDesc("sigreturn", unimplementedFunc), // 32 bit
30910037SARM gem5 Developers    /* 217 */ SyscallDesc("clone", cloneFunc<Sparc32Linux>),
31010037SARM gem5 Developers    /* 218 */ SyscallDesc("ioprio_get", unimplementedFunc), // 32 bit
31110037SARM gem5 Developers    /* 219 */ SyscallDesc("adjtimex", unimplementedFunc), // 32 bit
31210037SARM gem5 Developers    /* 220 */ SyscallDesc("sigprocmask", unimplementedFunc), // 32 bit
31310037SARM gem5 Developers    /* 221 */ SyscallDesc("create_module", unimplementedFunc),
31410037SARM gem5 Developers    /* 222 */ SyscallDesc("delete_module", unimplementedFunc), // 32 bit
31510037SARM gem5 Developers    /* 223 */ SyscallDesc("get_kernel_syms", unimplementedFunc),
31610037SARM gem5 Developers    /* 224 */ SyscallDesc("getpgid", unimplementedFunc), // 32 bit
31710037SARM gem5 Developers    /* 225 */ SyscallDesc("bdflush", unimplementedFunc), // 32 bit
31810037SARM gem5 Developers    /* 226 */ SyscallDesc("sysfs", unimplementedFunc), // 32 bit
31910037SARM gem5 Developers    /* 227 */ SyscallDesc("afs_syscall", unimplementedFunc),
32012359Snikos.nikoleris@arm.com    /* 228 */ SyscallDesc("setfsuid", unimplementedFunc), // 32 bit
32112359Snikos.nikoleris@arm.com    /* 229 */ SyscallDesc("setfsgid", unimplementedFunc), // 32 bit
32210037SARM gem5 Developers    /* 230 */ SyscallDesc("_newselect", unimplementedFunc), // 32 bit
32310474Sandreas.hansson@arm.com    /* 231 */ SyscallDesc("time", ignoreFunc),
32410474Sandreas.hansson@arm.com    /* 232 */ SyscallDesc("oldstat", unimplementedFunc),
32510205SAli.Saidi@ARM.com    /* 233 */ SyscallDesc("stime", unimplementedFunc),
32610474Sandreas.hansson@arm.com    /* 234 */ SyscallDesc("statfs64", unimplementedFunc),
32710474Sandreas.hansson@arm.com    /* 235 */ SyscallDesc("fstatfs64", unimplementedFunc),
32810037SARM gem5 Developers    /* 236 */ SyscallDesc("_llseek", _llseekFunc),
32910037SARM gem5 Developers    /* 237 */ SyscallDesc("mlock", unimplementedFunc),
33010037SARM gem5 Developers    /* 238 */ SyscallDesc("munlock", unimplementedFunc),
33110037SARM gem5 Developers    /* 239 */ SyscallDesc("mlockall", unimplementedFunc), // 32 bit
33210474Sandreas.hansson@arm.com    /* 240 */ SyscallDesc("munlockall", unimplementedFunc),
33310474Sandreas.hansson@arm.com    /* 241 */ SyscallDesc("sched_setparam", unimplementedFunc), // 32 bit
33410037SARM gem5 Developers    /* 242 */ SyscallDesc("sched_getparam", unimplementedFunc), // 32 bit
33510037SARM gem5 Developers    /* 243 */ SyscallDesc("sched_setscheduler", unimplementedFunc), // 32 bit
33610037SARM gem5 Developers    /* 244 */ SyscallDesc("sched_getscheduler", unimplementedFunc), // 32 bit
33710037SARM gem5 Developers    /* 245 */ SyscallDesc("sched_yield", unimplementedFunc),
33810037SARM gem5 Developers    /* 246 */ SyscallDesc("sched_get_priority_max", unimplementedFunc), // 32 bit
33911582SDylan.Johnson@ARM.com    /* 247 */ SyscallDesc("sched_get_priority_min", unimplementedFunc), // 32 bit
34010474Sandreas.hansson@arm.com    /* 248 */ SyscallDesc("sched_rr_get_interval", unimplementedFunc), // 32 bit
34110474Sandreas.hansson@arm.com    /* 249 */ SyscallDesc("nanosleep", unimplementedFunc),
34210037SARM gem5 Developers    /* 250 */ SyscallDesc("mremap", mremapFunc<Sparc32Linux>), // 32 bit
34310037SARM gem5 Developers    /* 251 */ SyscallDesc("_sysctl", unimplementedFunc), // 32 bit
34410037SARM gem5 Developers    /* 252 */ SyscallDesc("getsid", unimplementedFunc), // 32 bit
34510037SARM gem5 Developers    /* 253 */ SyscallDesc("fdatasync", unimplementedFunc),
34610037SARM gem5 Developers    /* 254 */ SyscallDesc("nfsservctl", unimplementedFunc), // 32 bit
34710037SARM gem5 Developers    /* 255 */ SyscallDesc("aplib", unimplementedFunc),
34810474Sandreas.hansson@arm.com    /* 256 */ SyscallDesc("clock_settime", unimplementedFunc),
34910474Sandreas.hansson@arm.com    /* 257 */ SyscallDesc("clock_gettime", unimplementedFunc),
35010037SARM gem5 Developers    /* 258 */ SyscallDesc("clock_getres", unimplementedFunc),
35110037SARM gem5 Developers    /* 259 */ SyscallDesc("clock_nanosleep", unimplementedFunc), // 32 bit
35210037SARM gem5 Developers    /* 260 */ SyscallDesc("sched_getaffinity", unimplementedFunc),
35310037SARM gem5 Developers    /* 261 */ SyscallDesc("sched_setaffinity", unimplementedFunc),
35410037SARM gem5 Developers    /* 262 */ SyscallDesc("timer_settime", unimplementedFunc), // 32 bit
35512280Sgiacomo.travaglini@arm.com    /* 263 */ SyscallDesc("timer_gettime", unimplementedFunc),
35610037SARM gem5 Developers    /* 264 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
35712106SRekai.GonzalezAlberquilla@arm.com    /* 265 */ SyscallDesc("timer_delete", unimplementedFunc),
35810037SARM gem5 Developers    /* 266 */ SyscallDesc("timer_create", unimplementedFunc),
35910037SARM gem5 Developers    /* 267 */ SyscallDesc("vserver", unimplementedFunc),
36010037SARM gem5 Developers    /* 268 */ SyscallDesc("io_setup", unimplementedFunc),
36110037SARM gem5 Developers    /* 269 */ SyscallDesc("io_destroy", unimplementedFunc),
36212280Sgiacomo.travaglini@arm.com    /* 270 */ SyscallDesc("io_submit", unimplementedFunc), // 32 bit
36312280Sgiacomo.travaglini@arm.com    /* 271 */ SyscallDesc("io_cancel", unimplementedFunc),
36412280Sgiacomo.travaglini@arm.com    /* 272 */ SyscallDesc("io_getevents", unimplementedFunc),
36512280Sgiacomo.travaglini@arm.com    /* 273 */ SyscallDesc("mq_open", unimplementedFunc), // 32 bit
36612280Sgiacomo.travaglini@arm.com    /* 274 */ SyscallDesc("mq_unlink", unimplementedFunc),
36712280Sgiacomo.travaglini@arm.com    /* 275 */ SyscallDesc("mq_timedsend", unimplementedFunc),
36812280Sgiacomo.travaglini@arm.com    /* 276 */ SyscallDesc("mq_timedreceive", unimplementedFunc),
36912280Sgiacomo.travaglini@arm.com    /* 277 */ SyscallDesc("mq_notify", unimplementedFunc),
37010037SARM gem5 Developers    /* 278 */ SyscallDesc("mq_getsetattr", unimplementedFunc),
37110037SARM gem5 Developers    /* 279 */ SyscallDesc("waitid", unimplementedFunc),
37210037SARM gem5 Developers    /* 280 */ SyscallDesc("sys_setaltroot", unimplementedFunc),
37310037SARM gem5 Developers    /* 281 */ SyscallDesc("add_key", unimplementedFunc),
37410037SARM gem5 Developers    /* 282 */ SyscallDesc("request_key", unimplementedFunc),
37510037SARM gem5 Developers    /* 283 */ SyscallDesc("keyctl", unimplementedFunc),
37610037SARM gem5 Developers    /* 284 */ SyscallDesc("openat", unimplementedFunc),
37710037SARM gem5 Developers    /* 285 */ SyscallDesc("mkdirat", unimplementedFunc),
37810037SARM gem5 Developers    /* 286 */ SyscallDesc("mknodat", unimplementedFunc),
37912280Sgiacomo.travaglini@arm.com    /* 287 */ SyscallDesc("fchownat", unimplementedFunc),
38010037SARM gem5 Developers    /* 288 */ SyscallDesc("futimesat", unimplementedFunc),
38112106SRekai.GonzalezAlberquilla@arm.com    /* 289 */ SyscallDesc("fstatat64", unimplementedFunc),
38210037SARM gem5 Developers    /* 290 */ SyscallDesc("unlinkat", unimplementedFunc),
38310037SARM gem5 Developers    /* 291 */ SyscallDesc("renameat", unimplementedFunc),
38410037SARM gem5 Developers    /* 292 */ SyscallDesc("linkat", unimplementedFunc),
38510037SARM gem5 Developers    /* 293 */ SyscallDesc("symlinkat", unimplementedFunc),
38612280Sgiacomo.travaglini@arm.com    /* 294 */ SyscallDesc("readlinkat", unimplementedFunc),
38712280Sgiacomo.travaglini@arm.com    /* 295 */ SyscallDesc("fchmodat", unimplementedFunc),
38812280Sgiacomo.travaglini@arm.com    /* 296 */ SyscallDesc("faccessat", unimplementedFunc),
38912280Sgiacomo.travaglini@arm.com    /* 297 */ SyscallDesc("pselect6", unimplementedFunc),
39012280Sgiacomo.travaglini@arm.com    /* 298 */ SyscallDesc("ppoll", unimplementedFunc),
39112280Sgiacomo.travaglini@arm.com    /* 299 */ SyscallDesc("unshare", unimplementedFunc)
39212280Sgiacomo.travaglini@arm.com};
39312280Sgiacomo.travaglini@arm.com
39412280Sgiacomo.travaglini@arm.comconst int SparcLinuxProcess::Num_Syscall32_Descs =
39510037SARM gem5 Developers    sizeof(SparcLinuxProcess::syscall32Descs) / sizeof(SyscallDesc);
39610037SARM gem5 Developers
39710037SARM gem5 DevelopersSyscallDesc SparcLinuxProcess::syscallDescs[] = {
39810037SARM gem5 Developers    /*  0 */ SyscallDesc("restart_syscall", unimplementedFunc),
39910037SARM gem5 Developers    /*  1 */ SyscallDesc("exit", exitFunc),
40010037SARM gem5 Developers    /*  2 */ SyscallDesc("fork", unimplementedFunc),
40110037SARM gem5 Developers    /*  3 */ SyscallDesc("read", readFunc<SparcLinux>),
40210037SARM gem5 Developers    /*  4 */ SyscallDesc("write", writeFunc<SparcLinux>),
40312507Snikos.nikoleris@arm.com    /*  5 */ SyscallDesc("open", openFunc<SparcLinux>),
40412507Snikos.nikoleris@arm.com    /*  6 */ SyscallDesc("close", closeFunc),
40512507Snikos.nikoleris@arm.com    /*  7 */ SyscallDesc("wait4", unimplementedFunc),
40610037SARM gem5 Developers    /*  8 */ SyscallDesc("creat", unimplementedFunc),
40710037SARM gem5 Developers    /*  9 */ SyscallDesc("link", unimplementedFunc),
40812507Snikos.nikoleris@arm.com    /* 10 */ SyscallDesc("unlink", unlinkFunc),
40912507Snikos.nikoleris@arm.com    /* 11 */ SyscallDesc("execv", unimplementedFunc),
41010037SARM gem5 Developers    /* 12 */ SyscallDesc("chdir", unimplementedFunc),
41112507Snikos.nikoleris@arm.com    /* 13 */ SyscallDesc("chown", chownFunc),
41212507Snikos.nikoleris@arm.com    /* 14 */ SyscallDesc("mknod", unimplementedFunc),
41310037SARM gem5 Developers    /* 15 */ SyscallDesc("chmod", chmodFunc<Linux>),
41412507Snikos.nikoleris@arm.com    /* 16 */ SyscallDesc("lchown", unimplementedFunc),
41512507Snikos.nikoleris@arm.com    /* 17 */ SyscallDesc("brk", brkFunc),
41610037SARM gem5 Developers    /* 18 */ SyscallDesc("perfctr", unimplementedFunc),
41710037SARM gem5 Developers    /* 19 */ SyscallDesc("lseek", lseekFunc),
41810037SARM gem5 Developers    /* 20 */ SyscallDesc("getpid", getpidFunc),
41910037SARM gem5 Developers    /* 21 */ SyscallDesc("capget", unimplementedFunc),
42010037SARM gem5 Developers    /* 22 */ SyscallDesc("capset", unimplementedFunc),
42110037SARM gem5 Developers    /* 23 */ SyscallDesc("setuid", setuidFunc),
42210037SARM gem5 Developers    /* 24 */ SyscallDesc("getuid", getuidFunc),
42312504Snikos.nikoleris@arm.com    /* 25 */ SyscallDesc("time", unimplementedFunc),
42412507Snikos.nikoleris@arm.com    /* 26 */ SyscallDesc("ptrace", unimplementedFunc),
42512507Snikos.nikoleris@arm.com    /* 27 */ SyscallDesc("alarm", unimplementedFunc),
42612507Snikos.nikoleris@arm.com    /* 28 */ SyscallDesc("sigaltstack", unimplementedFunc),
42712507Snikos.nikoleris@arm.com    /* 29 */ SyscallDesc("pause", unimplementedFunc),
42812507Snikos.nikoleris@arm.com    /* 30 */ SyscallDesc("utime", unimplementedFunc),
42912507Snikos.nikoleris@arm.com    /* 31 */ SyscallDesc("lchown32", unimplementedFunc),
43010037SARM gem5 Developers    /* 32 */ SyscallDesc("fchown32", unimplementedFunc),
43110037SARM gem5 Developers    /* 33 */ SyscallDesc("access", unimplementedFunc),
43210037SARM gem5 Developers    /* 34 */ SyscallDesc("nice", unimplementedFunc),
43310037SARM gem5 Developers    /* 35 */ SyscallDesc("chown32", unimplementedFunc),
43410037SARM gem5 Developers    /* 36 */ SyscallDesc("sync", unimplementedFunc),
43510037SARM gem5 Developers    /* 37 */ SyscallDesc("kill", unimplementedFunc),
43610037SARM gem5 Developers    /* 38 */ SyscallDesc("stat", unimplementedFunc),
43712507Snikos.nikoleris@arm.com    /* 39 */ SyscallDesc("sendfile", unimplementedFunc),
43812359Snikos.nikoleris@arm.com    /* 40 */ SyscallDesc("lstat", unimplementedFunc),
43912359Snikos.nikoleris@arm.com    /* 41 */ SyscallDesc("dup", unimplementedFunc),
44012359Snikos.nikoleris@arm.com    /* 42 */ SyscallDesc("pipe", pipePseudoFunc),
44112359Snikos.nikoleris@arm.com    /* 43 */ SyscallDesc("times", ignoreFunc),
44212359Snikos.nikoleris@arm.com    /* 44 */ SyscallDesc("getuid32", unimplementedFunc),
44312359Snikos.nikoleris@arm.com    /* 45 */ SyscallDesc("umount2", unimplementedFunc),
44412359Snikos.nikoleris@arm.com    /* 46 */ SyscallDesc("setgid", unimplementedFunc),
44512359Snikos.nikoleris@arm.com    /* 47 */ SyscallDesc("getgid", getgidFunc),
44612359Snikos.nikoleris@arm.com    /* 48 */ SyscallDesc("signal", unimplementedFunc),
44712359Snikos.nikoleris@arm.com    /* 49 */ SyscallDesc("geteuid", geteuidFunc),
44812507Snikos.nikoleris@arm.com    /* 50 */ SyscallDesc("getegid", getegidFunc),
44912507Snikos.nikoleris@arm.com    /* 51 */ SyscallDesc("acct", unimplementedFunc),
45012507Snikos.nikoleris@arm.com    /* 52 */ SyscallDesc("memory_ordering", unimplementedFunc),
45112507Snikos.nikoleris@arm.com    /* 53 */ SyscallDesc("getgid32", unimplementedFunc),
45212507Snikos.nikoleris@arm.com    /* 54 */ SyscallDesc("ioctl", unimplementedFunc),
45312359Snikos.nikoleris@arm.com    /* 55 */ SyscallDesc("reboot", unimplementedFunc),
45412359Snikos.nikoleris@arm.com    /* 56 */ SyscallDesc("mmap2", unimplementedFunc),
45512359Snikos.nikoleris@arm.com    /* 57 */ SyscallDesc("symlink", unimplementedFunc),
45612359Snikos.nikoleris@arm.com    /* 58 */ SyscallDesc("readlink", readlinkFunc),
45712359Snikos.nikoleris@arm.com    /* 59 */ SyscallDesc("execve", unimplementedFunc),
45812359Snikos.nikoleris@arm.com    /* 60 */ SyscallDesc("umask", unimplementedFunc),
45912359Snikos.nikoleris@arm.com    /* 61 */ SyscallDesc("chroot", unimplementedFunc),
46012507Snikos.nikoleris@arm.com    /* 62 */ SyscallDesc("fstat", fstatFunc<SparcLinux>),
46112359Snikos.nikoleris@arm.com    /* 63 */ SyscallDesc("fstat64", unimplementedFunc),
46212359Snikos.nikoleris@arm.com    /* 64 */ SyscallDesc("getpagesize", unimplementedFunc),
46312359Snikos.nikoleris@arm.com    /* 65 */ SyscallDesc("msync", unimplementedFunc),
46412359Snikos.nikoleris@arm.com    /* 66 */ SyscallDesc("vfork", unimplementedFunc),
46512359Snikos.nikoleris@arm.com    /* 67 */ SyscallDesc("pread64", unimplementedFunc),
46612359Snikos.nikoleris@arm.com    /* 68 */ SyscallDesc("pwrite64", unimplementedFunc),
46712359Snikos.nikoleris@arm.com    /* 69 */ SyscallDesc("geteuid32", unimplementedFunc),
46812359Snikos.nikoleris@arm.com    /* 70 */ SyscallDesc("getegid32", unimplementedFunc),
46912359Snikos.nikoleris@arm.com    /* 71 */ SyscallDesc("mmap", mmapFunc<SparcLinux>),
47012359Snikos.nikoleris@arm.com    /* 72 */ SyscallDesc("setreuid32", unimplementedFunc),
47112507Snikos.nikoleris@arm.com    /* 73 */ SyscallDesc("munmap", munmapFunc),
47212507Snikos.nikoleris@arm.com    /* 74 */ SyscallDesc("mprotect", ignoreFunc),
47312507Snikos.nikoleris@arm.com    /* 75 */ SyscallDesc("madvise", unimplementedFunc),
47412507Snikos.nikoleris@arm.com    /* 76 */ SyscallDesc("vhangup", unimplementedFunc),
47512507Snikos.nikoleris@arm.com    /* 77 */ SyscallDesc("truncate64", unimplementedFunc),
47612359Snikos.nikoleris@arm.com    /* 78 */ SyscallDesc("mincore", unimplementedFunc),
47712359Snikos.nikoleris@arm.com    /* 79 */ SyscallDesc("getgroups", unimplementedFunc),
47812359Snikos.nikoleris@arm.com    /* 80 */ SyscallDesc("setgroups", unimplementedFunc),
47912359Snikos.nikoleris@arm.com    /* 81 */ SyscallDesc("getpgrp", unimplementedFunc),
48012359Snikos.nikoleris@arm.com    /* 82 */ SyscallDesc("setgroups32", unimplementedFunc),
48112359Snikos.nikoleris@arm.com    /* 83 */ SyscallDesc("setitimer", unimplementedFunc),
48212359Snikos.nikoleris@arm.com    /* 84 */ SyscallDesc("ftruncate64", unimplementedFunc),
48312507Snikos.nikoleris@arm.com    /* 85 */ SyscallDesc("swapon", unimplementedFunc),
48412359Snikos.nikoleris@arm.com    /* 86 */ SyscallDesc("getitimer", unimplementedFunc),
48512359Snikos.nikoleris@arm.com    /* 87 */ SyscallDesc("setuid32", unimplementedFunc),
48612359Snikos.nikoleris@arm.com    /* 88 */ SyscallDesc("sethostname", unimplementedFunc),
48712359Snikos.nikoleris@arm.com    /* 89 */ SyscallDesc("setgid32", unimplementedFunc),
48812359Snikos.nikoleris@arm.com    /* 90 */ SyscallDesc("dup2", unimplementedFunc),
48912359Snikos.nikoleris@arm.com    /* 91 */ SyscallDesc("setfsuid32", unimplementedFunc),
49012359Snikos.nikoleris@arm.com    /* 92 */ SyscallDesc("fcntl", unimplementedFunc),
49112359Snikos.nikoleris@arm.com    /* 93 */ SyscallDesc("select", unimplementedFunc),
49212359Snikos.nikoleris@arm.com    /* 94 */ SyscallDesc("setfsgid32", unimplementedFunc),
49312359Snikos.nikoleris@arm.com    /* 95 */ SyscallDesc("fsync", unimplementedFunc),
49412507Snikos.nikoleris@arm.com    /* 96 */ SyscallDesc("setpriority", unimplementedFunc),
49512507Snikos.nikoleris@arm.com    /* 97 */ SyscallDesc("socket", unimplementedFunc),
49612507Snikos.nikoleris@arm.com    /* 98 */ SyscallDesc("connect", unimplementedFunc),
49712507Snikos.nikoleris@arm.com    /* 99 */ SyscallDesc("accept", unimplementedFunc),
49812507Snikos.nikoleris@arm.com    /* 100 */ SyscallDesc("getpriority", unimplementedFunc),
49912359Snikos.nikoleris@arm.com    /* 101 */ SyscallDesc("rt_sigreturn", unimplementedFunc),
50012359Snikos.nikoleris@arm.com    /* 102 */ SyscallDesc("rt_sigaction", ignoreFunc),
50112359Snikos.nikoleris@arm.com    /* 103 */ SyscallDesc("rt_sigprocmask", ignoreFunc),
50212359Snikos.nikoleris@arm.com    /* 104 */ SyscallDesc("rt_sigpending", unimplementedFunc),
50312359Snikos.nikoleris@arm.com    /* 105 */ SyscallDesc("rt_sigtimedwait", unimplementedFunc),
50412359Snikos.nikoleris@arm.com    /* 106 */ SyscallDesc("rt_sigqueueinfo", unimplementedFunc),
50512359Snikos.nikoleris@arm.com    /* 107 */ SyscallDesc("rt_sigsuspend", unimplementedFunc),
50612507Snikos.nikoleris@arm.com    /* 108 */ SyscallDesc("setresuid", unimplementedFunc),
50712359Snikos.nikoleris@arm.com    /* 109 */ SyscallDesc("getresuid", getresuidFunc),
50812359Snikos.nikoleris@arm.com    /* 110 */ SyscallDesc("setresgid", ignoreFunc),
50912359Snikos.nikoleris@arm.com    /* 111 */ SyscallDesc("getresgid", unimplementedFunc),
51012359Snikos.nikoleris@arm.com    /* 112 */ SyscallDesc("setregid32", unimplementedFunc),
51112505Snikos.nikoleris@arm.com    /* 113 */ SyscallDesc("recvmsg", unimplementedFunc),
51212505Snikos.nikoleris@arm.com    /* 114 */ SyscallDesc("sendmsg", unimplementedFunc),
51312505Snikos.nikoleris@arm.com    /* 115 */ SyscallDesc("getgroups32", unimplementedFunc),
51412505Snikos.nikoleris@arm.com    /* 116 */ SyscallDesc("gettimeofday", gettimeofdayFunc<SparcLinux>),
51512505Snikos.nikoleris@arm.com    /* 117 */ SyscallDesc("getrusage", unimplementedFunc),
51612505Snikos.nikoleris@arm.com    /* 118 */ SyscallDesc("getsockopt", unimplementedFunc),
51712359Snikos.nikoleris@arm.com    /* 119 */ SyscallDesc("getcwd", unimplementedFunc),
51812359Snikos.nikoleris@arm.com    /* 120 */ SyscallDesc("readv", unimplementedFunc),
51912359Snikos.nikoleris@arm.com    /* 121 */ SyscallDesc("writev", unimplementedFunc),
52012359Snikos.nikoleris@arm.com    /* 122 */ SyscallDesc("settimeofday", unimplementedFunc),
52112359Snikos.nikoleris@arm.com    /* 123 */ SyscallDesc("fchown", unimplementedFunc),
52212359Snikos.nikoleris@arm.com    /* 124 */ SyscallDesc("fchmod", unimplementedFunc),
52312507Snikos.nikoleris@arm.com    /* 125 */ SyscallDesc("recvfrom", unimplementedFunc),
52412507Snikos.nikoleris@arm.com    /* 126 */ SyscallDesc("setreuid", unimplementedFunc),
52512507Snikos.nikoleris@arm.com    /* 127 */ SyscallDesc("setregid", unimplementedFunc),
52612507Snikos.nikoleris@arm.com    /* 128 */ SyscallDesc("rename", renameFunc),
52712507Snikos.nikoleris@arm.com    /* 129 */ SyscallDesc("truncate", unimplementedFunc),
52812359Snikos.nikoleris@arm.com    /* 130 */ SyscallDesc("ftruncate", unimplementedFunc),
52912359Snikos.nikoleris@arm.com    /* 131 */ SyscallDesc("flock", unimplementedFunc),
53012359Snikos.nikoleris@arm.com    /* 132 */ SyscallDesc("lstat64", unimplementedFunc),
53112359Snikos.nikoleris@arm.com    /* 133 */ SyscallDesc("sendto", unimplementedFunc),
53212359Snikos.nikoleris@arm.com    /* 134 */ SyscallDesc("shutdown", unimplementedFunc),
53312359Snikos.nikoleris@arm.com    /* 135 */ SyscallDesc("socketpair", unimplementedFunc),
53410037SARM gem5 Developers    /* 136 */ SyscallDesc("mkdir", mkdirFunc),
53510037SARM gem5 Developers    /* 137 */ SyscallDesc("rmdir", unimplementedFunc),
53610037SARM gem5 Developers    /* 138 */ SyscallDesc("utimes", unimplementedFunc),
53712106SRekai.GonzalezAlberquilla@arm.com    /* 139 */ SyscallDesc("stat64", unimplementedFunc),
53812106SRekai.GonzalezAlberquilla@arm.com    /* 140 */ SyscallDesc("sendfile64", unimplementedFunc),
53910037SARM gem5 Developers    /* 141 */ SyscallDesc("getpeername", unimplementedFunc),
54010474Sandreas.hansson@arm.com    /* 142 */ SyscallDesc("futex", unimplementedFunc),
54110474Sandreas.hansson@arm.com    /* 143 */ SyscallDesc("gettid", unimplementedFunc),
54210037SARM gem5 Developers    /* 144 */ SyscallDesc("getrlimit", unimplementedFunc),
54310037SARM gem5 Developers    /* 145 */ SyscallDesc("setrlimit", unimplementedFunc),
54410037SARM gem5 Developers    /* 146 */ SyscallDesc("pivot_root", unimplementedFunc),
54510037SARM gem5 Developers    /* 147 */ SyscallDesc("prctl", unimplementedFunc),
54610037SARM gem5 Developers    /* 148 */ SyscallDesc("pciconfig_read", unimplementedFunc),
54710037SARM gem5 Developers    /* 149 */ SyscallDesc("pciconfig_write", unimplementedFunc),
54812106SRekai.GonzalezAlberquilla@arm.com    /* 150 */ SyscallDesc("getsockname", unimplementedFunc),
54912106SRekai.GonzalezAlberquilla@arm.com    /* 151 */ SyscallDesc("inotify_init", unimplementedFunc),
55010037SARM gem5 Developers    /* 152 */ SyscallDesc("inotify_add_watch", unimplementedFunc),
55110474Sandreas.hansson@arm.com    /* 153 */ SyscallDesc("poll", unimplementedFunc),
55210474Sandreas.hansson@arm.com    /* 154 */ SyscallDesc("getdents64", unimplementedFunc),
55310205SAli.Saidi@ARM.com    /* 155 */ SyscallDesc("fcntl64", unimplementedFunc),
55410037SARM gem5 Developers    /* 156 */ SyscallDesc("inotify_rm_watch", unimplementedFunc),
55510037SARM gem5 Developers    /* 157 */ SyscallDesc("statfs", unimplementedFunc),
55610037SARM gem5 Developers    /* 158 */ SyscallDesc("fstatfs", unimplementedFunc),
55710037SARM gem5 Developers    /* 159 */ SyscallDesc("umount", unimplementedFunc),
55810037SARM gem5 Developers    /* 160 */ SyscallDesc("sched_set_affinity", unimplementedFunc),
55910037SARM gem5 Developers    /* 161 */ SyscallDesc("sched_get_affinity", unimplementedFunc),
56010037SARM gem5 Developers    /* 162 */ SyscallDesc("getdomainname", unimplementedFunc),
56110037SARM gem5 Developers    /* 163 */ SyscallDesc("setdomainname", unimplementedFunc),
56212106SRekai.GonzalezAlberquilla@arm.com    /* 164 */ SyscallDesc("utrap_install", unimplementedFunc),
56312106SRekai.GonzalezAlberquilla@arm.com    /* 165 */ SyscallDesc("quotactl", unimplementedFunc),
56410037SARM gem5 Developers    /* 166 */ SyscallDesc("set_tid_address", unimplementedFunc),
56510474Sandreas.hansson@arm.com    /* 167 */ SyscallDesc("mount", unimplementedFunc),
56610474Sandreas.hansson@arm.com    /* 168 */ SyscallDesc("ustat", unimplementedFunc),
56710205SAli.Saidi@ARM.com    /* 169 */ SyscallDesc("setxattr", unimplementedFunc),
56810037SARM gem5 Developers    /* 170 */ SyscallDesc("lsetxattr", unimplementedFunc),
56910037SARM gem5 Developers    /* 171 */ SyscallDesc("fsetxattr", unimplementedFunc),
57010037SARM gem5 Developers    /* 172 */ SyscallDesc("getxattr", unimplementedFunc),
57110037SARM gem5 Developers    /* 173 */ SyscallDesc("lgetxattr", unimplementedFunc),
57210037SARM gem5 Developers    /* 174 */ SyscallDesc("getdents", unimplementedFunc),
57310037SARM gem5 Developers    /* 175 */ SyscallDesc("setsid", unimplementedFunc),
57410037SARM gem5 Developers    /* 176 */ SyscallDesc("fchdir", unimplementedFunc),
57510037SARM gem5 Developers    /* 177 */ SyscallDesc("fgetxattr", unimplementedFunc),
57610037SARM gem5 Developers    /* 178 */ SyscallDesc("listxattr", unimplementedFunc),
57710037SARM gem5 Developers    /* 179 */ SyscallDesc("llistxattr", unimplementedFunc),
57810037SARM gem5 Developers    /* 180 */ SyscallDesc("flistxattr", unimplementedFunc),
57910037SARM gem5 Developers    /* 181 */ SyscallDesc("removexattr", unimplementedFunc),
58010037SARM gem5 Developers    /* 182 */ SyscallDesc("lremovexattr", unimplementedFunc),
58110037SARM gem5 Developers    /* 183 */ SyscallDesc("sigpending", unimplementedFunc),
58210037SARM gem5 Developers    /* 184 */ SyscallDesc("query_module", unimplementedFunc),
58310037SARM gem5 Developers    /* 185 */ SyscallDesc("setpgid", unimplementedFunc),
58410037SARM gem5 Developers    /* 186 */ SyscallDesc("fremovexattr", unimplementedFunc),
58510037SARM gem5 Developers    /* 187 */ SyscallDesc("tkill", unimplementedFunc),
58610037SARM gem5 Developers    /* 188 */ SyscallDesc("exit_group", exitGroupFunc),
58710037SARM gem5 Developers    /* 189 */ SyscallDesc("uname", unameFunc),
58810037SARM gem5 Developers    /* 190 */ SyscallDesc("init_module", unimplementedFunc),
58910037SARM gem5 Developers    /* 191 */ SyscallDesc("personality", unimplementedFunc),
59010037SARM gem5 Developers    /* 192 */ SyscallDesc("remap_file_pages", unimplementedFunc),
59110037SARM gem5 Developers    /* 193 */ SyscallDesc("epoll_create", unimplementedFunc),
59210037SARM gem5 Developers    /* 194 */ SyscallDesc("epoll_ctl", unimplementedFunc),
59310037SARM gem5 Developers    /* 195 */ SyscallDesc("epoll_wait", unimplementedFunc),
59410037SARM gem5 Developers    /* 196 */ SyscallDesc("ioprio_set", unimplementedFunc),
59510037SARM gem5 Developers    /* 197 */ SyscallDesc("getppid", getppidFunc),
59610037SARM gem5 Developers    /* 198 */ SyscallDesc("sigaction", ignoreFunc),
59710037SARM gem5 Developers    /* 199 */ SyscallDesc("sgetmask", unimplementedFunc),
59810037SARM gem5 Developers    /* 200 */ SyscallDesc("ssetmask", unimplementedFunc),
59910037SARM gem5 Developers    /* 201 */ SyscallDesc("sigsuspend", unimplementedFunc),
60010037SARM gem5 Developers    /* 202 */ SyscallDesc("oldlstat", unimplementedFunc),
60110037SARM gem5 Developers    /* 203 */ SyscallDesc("uselib", unimplementedFunc),
60210037SARM gem5 Developers    /* 204 */ SyscallDesc("readdir", unimplementedFunc),
60310037SARM gem5 Developers    /* 205 */ SyscallDesc("readahead", unimplementedFunc),
60410037SARM gem5 Developers    /* 206 */ SyscallDesc("socketcall", unimplementedFunc),
60510037SARM gem5 Developers    /* 207 */ SyscallDesc("syslog", unimplementedFunc),
60610037SARM gem5 Developers    /* 208 */ SyscallDesc("lookup_dcookie", unimplementedFunc),
60710037SARM gem5 Developers    /* 209 */ SyscallDesc("fadvise64", unimplementedFunc),
60810037SARM gem5 Developers    /* 210 */ SyscallDesc("fadvise64_64", unimplementedFunc),
60910037SARM gem5 Developers    /* 211 */ SyscallDesc("tgkill", unimplementedFunc),
61010037SARM gem5 Developers    /* 212 */ SyscallDesc("waitpid", unimplementedFunc),
61110037SARM gem5 Developers    /* 213 */ SyscallDesc("swapoff", unimplementedFunc),
61210037SARM gem5 Developers    /* 214 */ SyscallDesc("sysinfo", sysinfoFunc<SparcLinux>),
61310037SARM gem5 Developers    /* 215 */ SyscallDesc("ipc", unimplementedFunc),
61410037SARM gem5 Developers    /* 216 */ SyscallDesc("sigreturn", unimplementedFunc),
61510037SARM gem5 Developers    /* 217 */ SyscallDesc("clone", cloneFunc<SparcLinux>),
61610037SARM gem5 Developers    /* 218 */ SyscallDesc("ioprio_get", unimplementedFunc),
61710037SARM gem5 Developers    /* 219 */ SyscallDesc("adjtimex", unimplementedFunc),
61810037SARM gem5 Developers    /* 220 */ SyscallDesc("sigprocmask", unimplementedFunc),
61910037SARM gem5 Developers    /* 221 */ SyscallDesc("create_module", unimplementedFunc),
62010037SARM gem5 Developers    /* 222 */ SyscallDesc("delete_module", unimplementedFunc),
62110037SARM gem5 Developers    /* 223 */ SyscallDesc("get_kernel_syms", unimplementedFunc),
62210037SARM gem5 Developers    /* 224 */ SyscallDesc("getpgid", unimplementedFunc),
623    /* 225 */ SyscallDesc("bdflush", unimplementedFunc),
624    /* 226 */ SyscallDesc("sysfs", unimplementedFunc),
625    /* 227 */ SyscallDesc("afs_syscall", unimplementedFunc),
626    /* 228 */ SyscallDesc("setfsuid", unimplementedFunc),
627    /* 229 */ SyscallDesc("setfsgid", unimplementedFunc),
628    /* 230 */ SyscallDesc("_newselect", unimplementedFunc),
629    /* 231 */ SyscallDesc("time", ignoreFunc),
630    /* 232 */ SyscallDesc("oldstat", unimplementedFunc),
631    /* 233 */ SyscallDesc("stime", unimplementedFunc),
632    /* 234 */ SyscallDesc("statfs64", unimplementedFunc),
633    /* 235 */ SyscallDesc("fstatfs64", unimplementedFunc),
634    /* 236 */ SyscallDesc("_llseek", _llseekFunc),
635    /* 237 */ SyscallDesc("mlock", unimplementedFunc),
636    /* 238 */ SyscallDesc("munlock", unimplementedFunc),
637    /* 239 */ SyscallDesc("mlockall", unimplementedFunc),
638    /* 240 */ SyscallDesc("munlockall", unimplementedFunc),
639    /* 241 */ SyscallDesc("sched_setparam", unimplementedFunc),
640    /* 242 */ SyscallDesc("sched_getparam", unimplementedFunc),
641    /* 243 */ SyscallDesc("sched_setscheduler", unimplementedFunc),
642    /* 244 */ SyscallDesc("sched_getscheduler", unimplementedFunc),
643    /* 245 */ SyscallDesc("sched_yield", unimplementedFunc),
644    /* 246 */ SyscallDesc("sched_get_priority_max", unimplementedFunc),
645    /* 247 */ SyscallDesc("sched_get_priority_min", unimplementedFunc),
646    /* 248 */ SyscallDesc("sched_rr_get_interval", unimplementedFunc),
647    /* 249 */ SyscallDesc("nanosleep", unimplementedFunc),
648    /* 250 */ SyscallDesc("mremap", mremapFunc<SparcLinux>),
649    /* 251 */ SyscallDesc("_sysctl", unimplementedFunc),
650    /* 252 */ SyscallDesc("getsid", unimplementedFunc),
651    /* 253 */ SyscallDesc("fdatasync", unimplementedFunc),
652    /* 254 */ SyscallDesc("nfsservctl", unimplementedFunc),
653    /* 255 */ SyscallDesc("aplib", unimplementedFunc),
654    /* 256 */ SyscallDesc("clock_settime", unimplementedFunc),
655    /* 257 */ SyscallDesc("clock_gettime", unimplementedFunc),
656    /* 258 */ SyscallDesc("clock_getres", unimplementedFunc),
657    /* 259 */ SyscallDesc("clock_nanosleep", unimplementedFunc),
658    /* 260 */ SyscallDesc("sched_getaffinity", unimplementedFunc),
659    /* 261 */ SyscallDesc("sched_setaffinity", unimplementedFunc),
660    /* 262 */ SyscallDesc("timer_settime", unimplementedFunc),
661    /* 263 */ SyscallDesc("timer_gettime", unimplementedFunc),
662    /* 264 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
663    /* 265 */ SyscallDesc("timer_delete", unimplementedFunc),
664    /* 266 */ SyscallDesc("timer_create", unimplementedFunc),
665    /* 267 */ SyscallDesc("vserver", unimplementedFunc),
666    /* 268 */ SyscallDesc("io_setup", unimplementedFunc),
667    /* 269 */ SyscallDesc("io_destroy", unimplementedFunc),
668    /* 270 */ SyscallDesc("io_submit", unimplementedFunc),
669    /* 271 */ SyscallDesc("io_cancel", unimplementedFunc),
670    /* 272 */ SyscallDesc("io_getevents", unimplementedFunc),
671    /* 273 */ SyscallDesc("mq_open", unimplementedFunc),
672    /* 274 */ SyscallDesc("mq_unlink", unimplementedFunc),
673    /* 275 */ SyscallDesc("mq_timedsend", unimplementedFunc),
674    /* 276 */ SyscallDesc("mq_timedreceive", unimplementedFunc),
675    /* 277 */ SyscallDesc("mq_notify", unimplementedFunc),
676    /* 278 */ SyscallDesc("mq_getsetattr", unimplementedFunc),
677    /* 279 */ SyscallDesc("waitid", unimplementedFunc),
678    /* 280 */ SyscallDesc("sys_setaltroot", unimplementedFunc),
679    /* 281 */ SyscallDesc("add_key", unimplementedFunc),
680    /* 282 */ SyscallDesc("request_key", unimplementedFunc),
681    /* 283 */ SyscallDesc("keyctl", unimplementedFunc)
682};
683
684const int SparcLinuxProcess::Num_Syscall_Descs =
685    sizeof(SparcLinuxProcess::syscallDescs) / sizeof(SyscallDesc);
686
687} // namespace SparcISA
688