changeset e0ea733d2105 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=e0ea733d2105
description:
ARM: Make ArmLinuxProcess understand "ARM private" system calls.
diffstat:
2 files changed, 25 insertions(+), 4 deletions(-)
src/arch/arm/linux/process.cc | 22 +++++++++++++++++++---
src/arch/arm/linux/process.hh | 7 ++++++-
diffs (63 lines):
diff -r 8130f3faa584 -r e0ea733d2105 src/arch/arm/linux/process.cc
--- a/src/arch/arm/linux/process.cc Tue Jun 09 23:37:41 2009 -0700
+++ b/src/arch/arm/linux/process.cc Tue Jun 09 23:38:50 2009 -0700
@@ -411,20 +411,36 @@
/* 346 */ SyscallDesc("epoll_pwait", unimplementedFunc),
};
+SyscallDesc ArmLinuxProcess::privSyscallDescs[] = {
+ /* 1 */ SyscallDesc("breakpoint", unimplementedFunc),
+ /* 2 */ SyscallDesc("cacheflush", unimplementedFunc),
+ /* 3 */ SyscallDesc("usr26", unimplementedFunc),
+ /* 4 */ SyscallDesc("usr32", unimplementedFunc),
+ /* 5 */ SyscallDesc("set_tls", unimplementedFunc)
+};
+
ArmLinuxProcess::ArmLinuxProcess(LiveProcessParams * params,
ObjectFile *objFile)
: ArmLiveProcess(params, objFile),
- Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
+ Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc)),
+ Num_Priv_Syscall_Descs(sizeof(privSyscallDescs) / sizeof(SyscallDesc))
{ }
SyscallDesc*
ArmLinuxProcess::getDesc(int callnum)
{
// Angel SWI syscalls are unsupported in this release
- if (callnum == 0x123456)
+ if (callnum == 0x123456) {
panic("Attempt to execute an ANGEL_SWI system call (newlib-related)");
- else if ((callnum & 0x00f00000) == 0x00900000)
+ } else if ((callnum & 0x00f00000) == 0x00900000) {
callnum &= 0x000fffff;
+ if ((callnum & 0x0f0000) == 0xf0000) {
+ callnum -= 0x0f0001;
+ if (callnum < 0 || callnum > Num_Priv_Syscall_Descs)
+ return NULL;
+ return &privSyscallDescs[callnum];
+ }
+ }
// Linux syscalls have to strip off the 0x00900000
if (callnum < 0 || callnum > Num_Syscall_Descs)
diff -r 8130f3faa584 -r e0ea733d2105 src/arch/arm/linux/process.hh
--- a/src/arch/arm/linux/process.hh Tue Jun 09 23:37:41 2009 -0700
+++ b/src/arch/arm/linux/process.hh Tue Jun 09 23:38:50 2009 -0700
@@ -45,10 +45,15 @@
/// The target system's hostname.
static const char *hostname;
- /// Array of syscall descriptors, indexed by call number.
+ /// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
+ /// Array of "arm private" syscall descriptors.
+ static SyscallDesc privSyscallDescs[];
+
const int Num_Syscall_Descs;
+
+ const int Num_Priv_Syscall_Descs;
};
#endif // __ARM_LINUX_PROCESS_HH__
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev