summaryrefslogtreecommitdiff
path: root/src/arch/arm/linux/linux.cc
diff options
context:
space:
mode:
authorBrandon Potter <brandon.potter@amd.com>2016-03-17 10:22:39 -0700
committerBrandon Potter <brandon.potter@amd.com>2016-03-17 10:22:39 -0700
commit3fa311e5acd58ce720014dd964728c2fa414ca6a (patch)
tree329dd11aa9c9c382fabdd88b2ca744a74b62008b /src/arch/arm/linux/linux.cc
parentb8688346a51860c7d582cf3fe310895e93a0ab6c (diff)
downloadgem5-3fa311e5acd58ce720014dd964728c2fa414ca6a.tar.xz
syscall_emul: add many Linux kernel flags
Diffstat (limited to 'src/arch/arm/linux/linux.cc')
-rw-r--r--src/arch/arm/linux/linux.cc80
1 files changed, 63 insertions, 17 deletions
diff --git a/src/arch/arm/linux/linux.cc b/src/arch/arm/linux/linux.cc
index 2428c4986..ac114048a 100644
--- a/src/arch/arm/linux/linux.cc
+++ b/src/arch/arm/linux/linux.cc
@@ -51,19 +51,34 @@ SyscallFlagTransTable ArmLinux32::openFlagTable[] = {
{ ArmLinux32::TGT_O_RDONLY, _O_RDONLY },
{ ArmLinux32::TGT_O_WRONLY, _O_WRONLY },
{ ArmLinux32::TGT_O_RDWR, _O_RDWR },
- { ArmLinux32::TGT_O_APPEND, _O_APPEND },
{ ArmLinux32::TGT_O_CREAT, _O_CREAT },
- { ArmLinux32::TGT_O_TRUNC, _O_TRUNC },
{ ArmLinux32::TGT_O_EXCL, _O_EXCL },
+#ifdef _O_NOCTTY
+ { ArmLinux32::TGT_O_NOCTTY, _O_NOCTTY },
+#endif
+ { ArmLinux32::TGT_O_TRUNC, _O_TRUNC },
+ { ArmLinux32::TGT_O_APPEND, _O_APPEND },
#ifdef _O_NONBLOCK
{ ArmLinux32::TGT_O_NONBLOCK, _O_NONBLOCK },
#endif
-#ifdef _O_NOCTTY
- { ArmLinux32::TGT_O_NOCTTY, _O_NOCTTY },
+#ifdef _O_DSYNC
+ { ArmLinux32::TGT_O_DSYNC, _O_DSYNC },
+#endif
+ { ArmLinux32::TGT_FASYNC, _O_ASYNC },
+ { ArmLinux32::TGT_O_DIRECT, _O_DIRECT },
+ { ArmLinux32::TGT_O_LARGEFILE, _O_LARGEFILE },
+ { ArmLinux32::TGT_O_DIRECTORY, _O_DIRECTORY },
+ { ArmLinux32::TGT_O_NOFOLLOW, _O_NOFOLLOW },
+ { ArmLinux32::TGT_O_NOATIME, _O_NOATIME },
+#ifdef _O_CLOEXEC
+ { ArmLinux32::TGT_O_CLOEXEC, _O_CLOEXEC },
#endif
#ifdef _O_SYNC
{ ArmLinux32::TGT_O_SYNC, _O_SYNC },
#endif
+#ifdef _O_PATH
+ { ArmLinux32::TGT_O_PATH, _O_PATH },
+#endif
#else /* !_MSC_VER */
{ ArmLinux32::TGT_O_RDONLY, O_RDONLY },
{ ArmLinux32::TGT_O_WRONLY, O_WRONLY },
@@ -74,12 +89,10 @@ SyscallFlagTransTable ArmLinux32::openFlagTable[] = {
{ ArmLinux32::TGT_O_TRUNC, O_TRUNC },
{ ArmLinux32::TGT_O_APPEND, O_APPEND },
{ ArmLinux32::TGT_O_NONBLOCK, O_NONBLOCK },
-#ifdef O_SYNC
- { ArmLinux32::TGT_O_SYNC, O_SYNC },
-#endif
-#ifdef FASYNC
- { ArmLinux32::TGT_FASYNC, FASYNC },
+#ifdef O_DSYNC
+ { ArmLinux32::TGT_O_DSYNC, O_DSYNC },
#endif
+ { ArmLinux32::TGT_FASYNC, O_ASYNC },
#ifdef O_DIRECT
{ ArmLinux32::TGT_O_DIRECT, O_DIRECT },
#endif
@@ -92,6 +105,16 @@ SyscallFlagTransTable ArmLinux32::openFlagTable[] = {
#ifdef O_NOFOLLOW
{ ArmLinux32::TGT_O_NOFOLLOW, O_NOFOLLOW },
#endif
+ { ArmLinux32::TGT_O_NOATIME, O_NOATIME },
+#ifdef O_CLOEXEC
+ { ArmLinux32::TGT_O_CLOEXEC, O_CLOEXEC },
+#endif
+#ifdef O_SYNC
+ { ArmLinux32::TGT_O_SYNC, O_SYNC },
+#endif
+#ifdef O_PATH
+ { ArmLinux32::TGT_O_PATH, O_PATH },
+#endif
#endif /* _MSC_VER */
};
@@ -104,19 +127,34 @@ SyscallFlagTransTable ArmLinux64::openFlagTable[] = {
{ ArmLinux64::TGT_O_RDONLY, _O_RDONLY },
{ ArmLinux64::TGT_O_WRONLY, _O_WRONLY },
{ ArmLinux64::TGT_O_RDWR, _O_RDWR },
- { ArmLinux64::TGT_O_APPEND, _O_APPEND },
{ ArmLinux64::TGT_O_CREAT, _O_CREAT },
- { ArmLinux64::TGT_O_TRUNC, _O_TRUNC },
{ ArmLinux64::TGT_O_EXCL, _O_EXCL },
+#ifdef _O_NOCTTY
+ { ArmLinux64::TGT_O_NOCTTY, _O_NOCTTY },
+#endif
+ { ArmLinux64::TGT_O_TRUNC, _O_TRUNC },
+ { ArmLinux64::TGT_O_APPEND, _O_APPEND },
#ifdef _O_NONBLOCK
{ ArmLinux64::TGT_O_NONBLOCK, _O_NONBLOCK },
#endif
-#ifdef _O_NOCTTY
- { ArmLinux64::TGT_O_NOCTTY, _O_NOCTTY },
+#ifdef _O_DSYNC
+ { ArmLinux64::TGT_O_DSYNC, _O_DSYNC },
+#endif
+ { ArmLinux64::TGT_FASYNC, _O_ASYNC },
+ { ArmLinux64::TGT_O_DIRECT, _O_DIRECT },
+ { ArmLinux64::TGT_O_LARGEFILE, _O_LARGEFILE },
+ { ArmLinux64::TGT_O_DIRECTORY, _O_DIRECTORY },
+ { ArmLinux64::TGT_O_NOFOLLOW, _O_NOFOLLOW },
+ { ArmLinux64::TGT_O_NOATIME, _O_NOATIME },
+#ifdef _O_CLOEXEC
+ { ArmLinux64::TGT_O_CLOEXEC, _O_CLOEXEC },
#endif
#ifdef _O_SYNC
{ ArmLinux64::TGT_O_SYNC, _O_SYNC },
#endif
+#ifdef _O_PATH
+ { ArmLinux64::TGT_O_PATH, _O_PATH },
+#endif
#else /* !_MSC_VER */
{ ArmLinux64::TGT_O_RDONLY, O_RDONLY },
{ ArmLinux64::TGT_O_WRONLY, O_WRONLY },
@@ -127,11 +165,9 @@ SyscallFlagTransTable ArmLinux64::openFlagTable[] = {
{ ArmLinux64::TGT_O_TRUNC, O_TRUNC },
{ ArmLinux64::TGT_O_APPEND, O_APPEND },
{ ArmLinux64::TGT_O_NONBLOCK, O_NONBLOCK },
-#ifdef O_SYNC
- { ArmLinux64::TGT_O_SYNC, O_SYNC },
-#endif
+ { ArmLinux64::TGT_O_DSYNC, O_DSYNC },
#ifdef FASYNC
- { ArmLinux64::TGT_FASYNC, FASYNC },
+ { ArmLinux64::TGT_FASYNC, O_ASYNC },
#endif
#ifdef O_DIRECT
{ ArmLinux64::TGT_O_DIRECT, O_DIRECT },
@@ -145,6 +181,16 @@ SyscallFlagTransTable ArmLinux64::openFlagTable[] = {
#ifdef O_NOFOLLOW
{ ArmLinux64::TGT_O_NOFOLLOW, O_NOFOLLOW },
#endif
+ { ArmLinux64::TGT_O_NOATIME, O_NOATIME },
+#ifdef O_CLOEXEC
+ { ArmLinux64::TGT_O_CLOEXEC, O_CLOEXEC },
+#endif
+#ifdef O_SYNC
+ { ArmLinux64::TGT_O_SYNC, O_SYNC },
+#endif
+#ifdef O_PATH
+ { ArmLinux64::TGT_O_PATH, O_PATH },
+#endif
#endif /* _MSC_VER */
};