summaryrefslogtreecommitdiff
path: root/src/sim/process.cc
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2016-03-17 10:29:32 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2016-03-17 10:29:32 -0700
commitf6cd7a4bb7ee66b58f88fbdc6bdc4faa6a559952 (patch)
tree7d579b1d984c0b3d7497780ff8ff1b96ab1f7aae /src/sim/process.cc
parent7eaa5952f994c07a801fbef81f8097a5e9a5828f (diff)
downloadgem5-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/sim/process.cc')
-rw-r--r--src/sim/process.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sim/process.cc b/src/sim/process.cc
index 6c12b8100..81a7ec89e 100644
--- a/src/sim/process.cc
+++ b/src/sim/process.cc
@@ -182,7 +182,7 @@ Process::Process(ProcessParams * params)
fde_stderr->set(sim_fd, params->errout, O_WRONLY | O_CREAT | O_TRUNC,
0664, false);
- mmap_start = mmap_end = 0;
+ mmap_end = 0;
nxm_start = nxm_end = 0;
// other parameters will be initialized when the program is loaded
}
@@ -412,7 +412,6 @@ Process::serialize(CheckpointOut &cp) const
SERIALIZE_SCALAR(stack_size);
SERIALIZE_SCALAR(stack_min);
SERIALIZE_SCALAR(next_thread_stack_base);
- SERIALIZE_SCALAR(mmap_start);
SERIALIZE_SCALAR(mmap_end);
SERIALIZE_SCALAR(nxm_start);
SERIALIZE_SCALAR(nxm_end);
@@ -432,7 +431,6 @@ Process::unserialize(CheckpointIn &cp)
UNSERIALIZE_SCALAR(stack_size);
UNSERIALIZE_SCALAR(stack_min);
UNSERIALIZE_SCALAR(next_thread_stack_base);
- UNSERIALIZE_SCALAR(mmap_start);
UNSERIALIZE_SCALAR(mmap_end);
UNSERIALIZE_SCALAR(nxm_start);
UNSERIALIZE_SCALAR(nxm_end);