summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAli Saidi <Ali.Saidi@ARM.com>2010-11-19 18:01:01 -0600
committerAli Saidi <Ali.Saidi@ARM.com>2010-11-19 18:01:01 -0600
commit34a8e37c1319dc19c10d239834030793733dc475 (patch)
tree7cb543ca445438e2ddcb7d83625758b0a191ed7f /src/sim
parent5c6f4a0f17f1f74bf913ce49f14517084949b8ed (diff)
downloadgem5-34a8e37c1319dc19c10d239834030793733dc475.tar.xz
SE: Fix simulating more than 4GB of RAM in SE mode
This change removes some dead code in PhysicalMemory, uses a 64 bit type for the page pointer in System (instead of 32 bit) and cleans up some style.
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/system.cc16
-rw-r--r--src/sim/system.hh6
2 files changed, 12 insertions, 10 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 58e765b89..d590adc91 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -67,8 +67,8 @@ System::System(Params *p)
init_param(p->init_param),
loadAddrMask(p->load_addr_mask),
#else
- page_ptr(0),
- next_PID(0),
+ pagePtr(0),
+ nextPID(0),
#endif
memoryMode(p->mem_mode), _params(p)
{
@@ -255,8 +255,8 @@ System::replaceThreadContext(ThreadContext *tc, int context_id)
Addr
System::new_page()
{
- Addr return_addr = page_ptr << LogVMPageSize;
- ++page_ptr;
+ Addr return_addr = pagePtr << LogVMPageSize;
+ ++pagePtr;
if (return_addr >= physmem->size())
fatal("Out of memory, please increase size of physical memory.");
return return_addr;
@@ -271,7 +271,7 @@ System::memSize()
Addr
System::freeMemSize()
{
- return physmem->size() - (page_ptr << LogVMPageSize);
+ return physmem->size() - (pagePtr << LogVMPageSize);
}
#endif
@@ -282,7 +282,8 @@ System::serialize(ostream &os)
#if FULL_SYSTEM
kernelSymtab->serialize("kernel_symtab", os);
#else // !FULL_SYSTEM
- SERIALIZE_SCALAR(page_ptr);
+ SERIALIZE_SCALAR(pagePtr);
+ SERIALIZE_SCALAR(nextPID);
#endif
}
@@ -293,7 +294,8 @@ System::unserialize(Checkpoint *cp, const string &section)
#if FULL_SYSTEM
kernelSymtab->unserialize("kernel_symtab", cp, section);
#else // !FULL_SYSTEM
- UNSERIALIZE_SCALAR(page_ptr);
+ UNSERIALIZE_SCALAR(pagePtr);
+ UNSERIALIZE_SCALAR(nextPID);
#endif
}
diff --git a/src/sim/system.hh b/src/sim/system.hh
index 452446623..cdf7d3d7e 100644
--- a/src/sim/system.hh
+++ b/src/sim/system.hh
@@ -137,15 +137,15 @@ class System : public SimObject
#else
- int page_ptr;
+ Addr pagePtr;
protected:
- uint64_t next_PID;
+ uint64_t nextPID;
public:
uint64_t allocatePID()
{
- return next_PID++;
+ return nextPID++;
}
/** Amount of physical memory that is still free */