summaryrefslogtreecommitdiff
path: root/src/arch/mips/linux/process.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-12-31 15:30:50 -0500
committerGabe Black <gblack@eecs.umich.edu>2009-12-31 15:30:50 -0500
commit134937b594572f6158870fd4a843ad9ff2d48287 (patch)
tree0bbcefeaabbf82bcac9634f1d70e54a23712cf7a /src/arch/mips/linux/process.cc
parentd3ed32b989b9be65805290c931739096786b39ce (diff)
downloadgem5-134937b594572f6158870fd4a843ad9ff2d48287.tar.xz
MIPS: Implement the set_thread_area system call.
Diffstat (limited to 'src/arch/mips/linux/process.cc')
-rw-r--r--src/arch/mips/linux/process.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/arch/mips/linux/process.cc b/src/arch/mips/linux/process.cc
index 428ea60af..4c3581ecb 100644
--- a/src/arch/mips/linux/process.cc
+++ b/src/arch/mips/linux/process.cc
@@ -126,6 +126,16 @@ sys_setsysinfoFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
return 1;
}
+static SyscallReturn
+setThreadAreaFunc(SyscallDesc *desc, int callnum, LiveProcess *process,
+ ThreadContext *tc)
+{
+ int index = 0;
+ Addr addr = process->getSyscallArg(tc, index);
+ tc->setMiscRegNoEffect(MISCREG_TP_VALUE, addr);
+ return 0;
+}
+
SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 0 */ SyscallDesc("syscall", unimplementedFunc),
/* 1 */ SyscallDesc("exit", exitFunc),
@@ -410,7 +420,7 @@ SyscallDesc MipsLinuxProcess::syscallDescs[] = {
/* 280 */ SyscallDesc("add_key", unimplementedFunc),
/* 281 */ SyscallDesc("request_key", unimplementedFunc),
/* 282 */ SyscallDesc("keyctl", unimplementedFunc),
- /* 283 */ SyscallDesc("set_thread_area", unimplementedFunc),
+ /* 283 */ SyscallDesc("set_thread_area", setThreadAreaFunc),
/* 284 */ SyscallDesc("inotify_init", unimplementedFunc),
/* 285 */ SyscallDesc("inotify_add_watch", unimplementedFunc),
/* 286 */ SyscallDesc("inotify_rm_watch", unimplementedFunc),