Jason Yu has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/64472?usp=email )
Change subject: sim-se,arch-riscv: Fixes file-related flags for riscv64
target
......................................................................
sim-se,arch-riscv: Fixes file-related flags for riscv64 target
Previous file-related flags for the riscv64-unknown-linux-gnu target
do not match the actual
values, leading to incorrect behaviours in certain emulated syscalls.
This commit fixes the problem.
Change-Id: I38ff624c00e46e37672510af5a10f527b5f0842a
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/64472
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
---
M src/arch/riscv/linux/linux.hh
1 file changed, 28 insertions(+), 10 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/arch/riscv/linux/linux.hh b/src/arch/riscv/linux/linux.hh
index 4672475..b072183 100644
--- a/src/arch/riscv/linux/linux.hh
+++ b/src/arch/riscv/linux/linux.hh
@@ -94,20 +94,20 @@
static constexpr int TGT_O_TRUNC = 0x000200; //!< O_TRUNC
static constexpr int TGT_O_APPEND = 0x000400; //!< O_APPEND
static constexpr int TGT_O_NONBLOCK = 0x000800; //!< O_NONBLOCK
- static constexpr int TGT_O_SYNC = 0x001000; //!< O_SYNC
+ static constexpr int TGT_O_SYNC = 0x101000; //!< O_SYNC
static constexpr int TGT_FSYNC = 0x001000; //!< FSYNC
- static constexpr int TGT_FASYNC = 0x008000; //!< FASYNC
+ static constexpr int TGT_FASYNC = 0x002000; //!< FASYNC
// The following are not present in riscv64-unknown-elf <fcntl.h>
- static constexpr int TGT_O_DSYNC = 0x010000; //!< O_DSYNC
- static constexpr int TGT_O_CLOEXEC = 0x040000; //!< O_CLOEXEC
+ static constexpr int TGT_O_DSYNC = 0x001000; //!< O_DSYNC
+ static constexpr int TGT_O_CLOEXEC = 0x080000; //!< O_CLOEXEC
static constexpr int TGT_O_NOINHERIT = 0x040000; //!< O_NOINHERIT
- static constexpr int TGT_O_DIRECT = 0x080000; //!< O_DIRECT
- static constexpr int TGT_O_NOFOLLOW = 0x100000; //!< O_NOFOLLOW
- static constexpr int TGT_O_DIRECTORY = 0x200000; //!< O_DIRECTORY
+ static constexpr int TGT_O_DIRECT = 0x004000; //!< O_DIRECT
+ static constexpr int TGT_O_NOFOLLOW = 0x020000; //!< O_NOFOLLOW
+ static constexpr int TGT_O_DIRECTORY = 0x010000; //!< O_DIRECTORY
// The following are not defined by riscv64-unknown-elf
- static constexpr int TGT_O_LARGEFILE = 0x020000; //!< O_LARGEFILE
- static constexpr int TGT_O_NOATIME = 0x800000; //!< O_NOATIME
- static constexpr int TGT_O_PATH = 0x400000; //!< O_PATH
+ static constexpr int TGT_O_LARGEFILE = 0x000000; //!< O_LARGEFILE
+ static constexpr int TGT_O_NOATIME = 0x040000; //!< O_NOATIME
+ static constexpr int TGT_O_PATH = 0x200000; //!< O_PATH
//@}
// Only defined in riscv-unknown-elf for proxy kernel and not linux
kernel
--
To view, visit
https://gem5-review.googlesource.com/c/public/gem5/+/64472?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I38ff624c00e46e37672510af5a10f527b5f0842a
Gerrit-Change-Number: 64472
Gerrit-PatchSet: 2
Gerrit-Owner: Jason Yu <yuzhijingcheng1...@hotmail.com>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Jason Yu <yuzhijingcheng1...@hotmail.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org