summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-06-09 23:38:50 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-06-09 23:38:50 -0700
commit5daeefc5059ff98b63f06c963da2ffb17ef95df7 (patch)
treee8b55cd86877da68e0f990b0aace3ddc9ac1d2f6 /src
parentfbf4dc9da25e5dc18a8336b462f9c8bf7ef39364 (diff)
downloadgem5-5daeefc5059ff98b63f06c963da2ffb17ef95df7.tar.xz
ARM: Make ArmLinuxProcess understand "ARM private" system calls.
Diffstat (limited to 'src')
-rw-r--r--src/arch/arm/linux/process.cc22
-rw-r--r--src/arch/arm/linux/process.hh7
2 files changed, 25 insertions, 4 deletions
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 3b057ab68..25307e106 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -411,20 +411,36 @@ SyscallDesc ArmLinuxProcess::syscallDescs[] = {
/* 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 --git a/src/arch/arm/linux/process.hh b/src/arch/arm/linux/process.hh
index 524661b5b..205a40418 100644
--- a/src/arch/arm/linux/process.hh
+++ b/src/arch/arm/linux/process.hh
@@ -45,10 +45,15 @@ class ArmLinuxProcess : public ArmLiveProcess
/// 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__