summaryrefslogtreecommitdiff
path: root/src/arch/riscv/linux/linux.hh
diff options
context:
space:
mode:
authorAlec Roelke <ar4jc@virginia.edu>2017-10-28 12:35:20 -0400
committerAlec Roelke <ar4jc@virginia.edu>2017-11-22 01:05:30 +0000
commite27ed32d9dcd7591c3a794fc1c9ca5b29ce0d91d (patch)
treecd3bf93c20bb3438363a261c4b68537df4803c62 /src/arch/riscv/linux/linux.hh
parenta01d53078a583ea71b845243785c44376c084c4b (diff)
downloadgem5-e27ed32d9dcd7591c3a794fc1c9ca5b29ce0d91d.tar.xz
arch-riscv: Add missing system calls
This patch adds all system calls present in riscv-gnu-toolchain at commit hash 65cb174. Many of them do not have implementations in gem5, so they are just placeholders. [Remove the variadic macro and replace it with a function that has default arguments because variadic macros may not be portable across compilers] [Remove spaces around default arguments of createSyscall for better style] [Switch from using a loose function to using SyscallDesc's new constructor] Change-Id: Iff97c689109121b39df423c72d0e79c6366e31b9 Reviewed-on: https://gem5-review.googlesource.com/5322 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Alec Roelke <ar4jc@virginia.edu>
Diffstat (limited to 'src/arch/riscv/linux/linux.hh')
-rw-r--r--src/arch/riscv/linux/linux.hh35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/arch/riscv/linux/linux.hh b/src/arch/riscv/linux/linux.hh
index 0c76fa6ed..cfc1d4fd7 100644
--- a/src/arch/riscv/linux/linux.hh
+++ b/src/arch/riscv/linux/linux.hh
@@ -152,6 +152,41 @@ class RiscvLinux : public Linux
uint64_t st_ctime_nsec;
int32_t ___glibc_reserved[2];
} tgt_stat64;
+
+ typedef struct {
+ int32_t val[2];
+ } tgt_fsid_t;
+
+ typedef struct {
+ uint64_t f_type;
+ uint64_t f_bsize;
+ uint64_t f_blocks;
+ uint64_t f_bfree;
+ uint64_t f_bavail;
+ uint64_t f_files;
+ uint64_t f_ffree;
+ tgt_fsid_t f_fsid;
+ uint64_t f_namelen;
+ uint64_t f_frsize;
+ uint64_t f_flags;
+ uint64_t f_spare[4];
+ } tgt_statfs;
+
+ typedef struct {
+ int64_t uptime;
+ uint64_t loads[3];
+ uint64_t totalram;
+ uint64_t freeram;
+ uint64_t sharedram;
+ uint64_t bufferram;
+ uint64_t totalswap;
+ uint64_t freeswap;
+ uint16_t procs;
+ uint16_t pad;
+ uint64_t totalhigh;
+ uint64_t freehigh;
+ uint32_t mem_unit;
+ } tgt_sysinfo;
};
#endif