summaryrefslogtreecommitdiff
path: root/src/arch/alpha/linux/linux.hh
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-03-17 10:24:17 -0700
committerBrandon Potter <brandon.potter@amd.com>2016-03-17 10:24:17 -0700
commita04fac976f02377237bb827d46854b669ebc2397 (patch)
tree2f2a5e55e16b2c05e4d94e302081bb977e864a36 /src/arch/alpha/linux/linux.hh
parent3fa311e5acd58ce720014dd964728c2fa414ca6a (diff)
downloadgem5-a04fac976f02377237bb827d46854b669ebc2397.tar.xz
syscall_emul: extend mmap system call to support file backed mmaps
For O3, which has a stat that counts reg reads, there is an additional reg read per mmap() call since there's an arg we no longer ignore. Otherwise, stats should not be affected.
Diffstat (limited to 'src/arch/alpha/linux/linux.hh')
-rw-r--r--src/arch/alpha/linux/linux.hh21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/arch/alpha/linux/linux.hh b/src/arch/alpha/linux/linux.hh
index 7864c6414..409ad4dd1 100644
--- a/src/arch/alpha/linux/linux.hh
+++ b/src/arch/alpha/linux/linux.hh
@@ -104,8 +104,25 @@ class AlphaLinux : public Linux
//@}
/// For mmap().
- static const unsigned TGT_MAP_ANONYMOUS = 0x10;
- static const unsigned TGT_MAP_FIXED = 0x100;
+ static SyscallFlagTransTable mmapFlagTable[];
+
+ static const unsigned TGT_MAP_SHARED = 0x000001;
+ static const unsigned TGT_MAP_PRIVATE = 0x000002;
+ static const unsigned TGT_MAP_ANON = 0x000010;
+ static const unsigned TGT_MAP_DENYWRITE = 0x002000;
+ static const unsigned TGT_MAP_EXECUTABLE = 0x004000;
+ static const unsigned TGT_MAP_FILE = 0x000000;
+ static const unsigned TGT_MAP_GROWSDOWN = 0x001000;
+ static const unsigned TGT_MAP_HUGETLB = 0x100000;
+ static const unsigned TGT_MAP_LOCKED = 0x008000;
+ static const unsigned TGT_MAP_NONBLOCK = 0x040000;
+ static const unsigned TGT_MAP_NORESERVE = 0x010000;
+ static const unsigned TGT_MAP_POPULATE = 0x020000;
+ static const unsigned TGT_MAP_STACK = 0x080000;
+ static const unsigned TGT_MAP_ANONYMOUS = 0x000010;
+ static const unsigned TGT_MAP_FIXED = 0x000100;
+
+ static const unsigned NUM_MMAP_FLAGS;
//@{
/// For getsysinfo().