diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-03-17 10:29:32 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2016-03-17 10:29:32 -0700 |
commit | f6cd7a4bb7ee66b58f88fbdc6bdc4faa6a559952 (patch) | |
tree | 7d579b1d984c0b3d7497780ff8ff1b96ab1f7aae /src/arch/x86/process.cc | |
parent | 7eaa5952f994c07a801fbef81f8097a5e9a5828f (diff) | |
download | gem5-f6cd7a4bb7ee66b58f88fbdc6bdc4faa6a559952.tar.xz |
syscall_emul: move mmapGrowsDown() to LiveProcess
The mmapGrowsDown() method was a static method on the OperatingSystem
class (and derived classes), which worked OK for the templated syscall
emulation methods, but made it hard to access elsewhere. This patch
moves the method to be a virtual function on the LiveProcess method,
where it can be overridden for specific platforms (for now, Alpha).
This patch also changes the value of mmapGrowsDown() from being false
by default and true only on X86Linux32 to being true by default and
false only on Alpha, which seems closer to reality (though in reality
most people use ASLR and this doesn't really matter anymore).
In the process, also got rid of the unused mmap_start field on
LiveProcess and OperatingSystem mmapGrowsUp variable.
Diffstat (limited to 'src/arch/x86/process.cc')
-rw-r--r-- | src/arch/x86/process.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/process.cc b/src/arch/x86/process.cc index 13cbf6edd..f0b8370c0 100644 --- a/src/arch/x86/process.cc +++ b/src/arch/x86/process.cc @@ -114,7 +114,7 @@ X86_64LiveProcess::X86_64LiveProcess(LiveProcessParams *params, // Set up region for mmaps. This was determined empirically and may not // always be correct. - mmap_start = mmap_end = (Addr)0x2aaaaaaab000ULL; + mmap_end = (Addr)0x2aaaaaaab000ULL; } void @@ -151,7 +151,7 @@ I386LiveProcess::I386LiveProcess(LiveProcessParams *params, // Set up region for mmaps. This was determined empirically and may not // always be correct. - mmap_start = mmap_end = (Addr)0xf7ffe000ULL; + mmap_end = (Addr)0xf7ffe000ULL; } SyscallDesc* |