changeset baa5ec031980 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=baa5ec031980
description:
MIPS: Implement the set_thread_area system call.
diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
src/arch/mips/linux/process.cc | 12 +++++++++++-
diffs (29 lines):
diff -r 14fbdb0f9585 -r baa5ec031980 src/arch/mips/linux/process.cc
--- a/src/arch/mips/linux/process.cc Thu Dec 31 15:30:50 2009 -0500
+++ b/src/arch/mips/linux/process.cc Thu Dec 31 15:30:50 2009 -0500
@@ -126,6 +126,16 @@
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 @@
/* 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),
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev