summaryrefslogtreecommitdiff
path: root/src/arch/arm
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2011-10-22 22:30:08 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2011-10-22 22:30:08 -0700
commit6f9d294e8685f49d91af48065736ac1d67e53718 (patch)
tree1481f450d43324b79da17c80f27bdb1946b7c232 /src/arch/arm
parent4d5f2c28a88f83d390e80407f55a8a02ead33878 (diff)
downloadgem5-6f9d294e8685f49d91af48065736ac1d67e53718.tar.xz
SE: move page allocation from PageTable to Process
PageTable supported an allocate() call that called back through the Process to allocate memory, but did not have a method to map addresses without allocating new pages. It makes more sense for Process to do the allocation, so this method was renamed allocateMem() and moved to Process, and uses a new map() call on PageTable. The remaining uses of the process pointer in PageTable were only to get the name and the PID, so by passing these in directly in the constructor, we can make PageTable completely independent of Process.
Diffstat (limited to 'src/arch/arm')
-rw-r--r--src/arch/arm/linux/process.cc2
-rw-r--r--src/arch/arm/process.cc3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/arch/arm/linux/process.cc b/src/arch/arm/linux/process.cc
index f17749252..c65962d00 100644
--- a/src/arch/arm/linux/process.cc
+++ b/src/arch/arm/linux/process.cc
@@ -503,7 +503,7 @@ void
ArmLinuxProcess::initState()
{
ArmLiveProcess::initState();
- pTable->allocate(commPage, PageBytes);
+ allocateMem(commPage, PageBytes);
ThreadContext *tc = system->getThreadContext(contextIds[0]);
uint8_t swiNeg1[] = {
diff --git a/src/arch/arm/process.cc b/src/arch/arm/process.cc
index c3b02744e..aa5d7dfce 100644
--- a/src/arch/arm/process.cc
+++ b/src/arch/arm/process.cc
@@ -251,8 +251,7 @@ ArmLiveProcess::argsInit(int intSize, int pageSize)
stack_size = stack_base - stack_min;
// map memory
- pTable->allocate(roundDown(stack_min, pageSize),
- roundUp(stack_size, pageSize));
+ allocateMem(roundDown(stack_min, pageSize), roundUp(stack_size, pageSize));
// map out initial stack contents
uint32_t sentry_base = stack_base - sentry_size;