summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
authorGiacomo Gabrielli <Giacomo.Gabrielli@arm.com>2015-05-26 03:21:35 -0400
committerGiacomo Gabrielli <Giacomo.Gabrielli@arm.com>2015-05-26 03:21:35 -0400
commitcc2346e8ca7ad247c701ec58ffddd98fa9f03574 (patch)
tree8e648af761bc413d8d7f7feb68f7e85076d9bc0f /src/arch
parent0cc350d2c59d0e1b19cc377814ae7ef0860ee7ab (diff)
downloadgem5-cc2346e8ca7ad247c701ec58ffddd98fa9f03574.tar.xz
arm: Implement some missing syscalls (SE mode)
Adding a few syscalls that were previously considered unimplemented.
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm/linux/linux.hh12
-rw-r--r--src/arch/arm/linux/process.cc10
2 files changed, 16 insertions, 6 deletions
diff --git a/src/arch/arm/linux/linux.hh b/src/arch/arm/linux/linux.hh
index fbf5d2185..0dd1df373 100644
--- a/src/arch/arm/linux/linux.hh
+++ b/src/arch/arm/linux/linux.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2011-2012 ARM Limited
+ * Copyright (c) 2010, 2011-2012, 2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -108,6 +108,11 @@ class ArmLinux32 : public Linux
int32_t tv_usec; //!< microseconds
};
+ struct timespec {
+ int32_t tv_sec; //!< seconds
+ int32_t tv_nsec; //!< nanoseconds
+ };
+
// For writev/readv
struct tgt_iovec {
uint32_t iov_base; // void *
@@ -297,6 +302,11 @@ class ArmLinux64 : public Linux
int64_t tv_usec; //!< microseconds
};
+ struct timespec {
+ int64_t tv_sec; //!< seconds
+ int64_t tv_nsec; //!< nanoseconds
+ };
+
// For writev/readv
struct tgt_iovec {
uint64_t iov_base; // void *
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index 223db7afd..89a085002 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2013 ARM Limited
+ * Copyright (c) 2010-2013, 2015 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -382,7 +382,7 @@ static SyscallDesc syscallDescs32[] = {
/* 260 */ SyscallDesc("timer_getoverrun", unimplementedFunc),
/* 261 */ SyscallDesc("timer_delete", unimplementedFunc),
/* 262 */ SyscallDesc("clock_settime", unimplementedFunc),
- /* 263 */ SyscallDesc("clock_gettime", unimplementedFunc),
+ /* 263 */ SyscallDesc("clock_gettime", clock_gettimeFunc<ArmLinux32>),
/* 264 */ SyscallDesc("clock_getres", unimplementedFunc),
/* 265 */ SyscallDesc("clock_nanosleep", unimplementedFunc),
/* 266 */ SyscallDesc("statfs64", unimplementedFunc),
@@ -526,7 +526,7 @@ static SyscallDesc syscallDescs64[] = {
/* 35 */ SyscallDesc("unlinkat", unlinkatFunc<ArmLinux64>),
/* 36 */ SyscallDesc("symlinkat", unimplementedFunc),
/* 37 */ SyscallDesc("linkat", unimplementedFunc),
- /* 38 */ SyscallDesc("renameat", unimplementedFunc),
+ /* 38 */ SyscallDesc("renameat", renameatFunc<ArmLinux64>),
/* 39 */ SyscallDesc("umount2", unimplementedFunc),
/* 40 */ SyscallDesc("mount", unimplementedFunc),
/* 41 */ SyscallDesc("pivot_root", unimplementedFunc),
@@ -601,7 +601,7 @@ static SyscallDesc syscallDescs64[] = {
/* 110 */ SyscallDesc("timer_settime", unimplementedFunc),
/* 111 */ SyscallDesc("timer_delete", unimplementedFunc),
/* 112 */ SyscallDesc("clock_settime", unimplementedFunc),
- /* 113 */ SyscallDesc("clock_gettime", unimplementedFunc),
+ /* 113 */ SyscallDesc("clock_gettime", clock_gettimeFunc<ArmLinux64>),
/* 114 */ SyscallDesc("clock_getres", unimplementedFunc),
/* 115 */ SyscallDesc("clock_nanosleep", unimplementedFunc),
/* 116 */ SyscallDesc("syslog", unimplementedFunc),
@@ -1521,7 +1521,7 @@ static SyscallDesc syscallDescs64[] = {
/* 1030 */ SyscallDesc("mkdir", mkdirFunc),
/* 1031 */ SyscallDesc("rmdir", unimplementedFunc),
/* 1032 */ SyscallDesc("lchown", unimplementedFunc),
- /* 1033 */ SyscallDesc("access", unimplementedFunc),
+ /* 1033 */ SyscallDesc("access", accessFunc),
/* 1034 */ SyscallDesc("rename", renameFunc),
/* 1035 */ SyscallDesc("readlink", readlinkFunc),
/* 1036 */ SyscallDesc("symlink", unimplementedFunc),