int System::numSystemsRunning = 0;
System::System(Params *p)
- : SimObject(p), physmem(p->physmem), _numContexts(0),
+ : SimObject(p), physmem(p->physmem), _numContexts(0), pagePtr(0),
#if FULL_SYSTEM
init_param(p->init_param),
loadAddrMask(p->load_addr_mask),
-#else
- pagePtr(0),
- nextPID(0),
#endif
+ nextPID(0),
memoryMode(p->mem_mode),
workItemsBegin(0),
workItemsEnd(0),
remoteGDB[context_id]->replaceThreadContext(tc);
}
-#if !FULL_SYSTEM
Addr
System::new_page()
{
return physmem->size() - (pagePtr << LogVMPageSize);
}
-#endif
-
bool
System::isMemory(const Addr addr) const
{
{
#if FULL_SYSTEM
kernelSymtab->serialize("kernel_symtab", os);
-#else // !FULL_SYSTEM
+#endif
SERIALIZE_SCALAR(pagePtr);
SERIALIZE_SCALAR(nextPID);
-#endif
}
{
#if FULL_SYSTEM
kernelSymtab->unserialize("kernel_symtab", cp, section);
-#else // !FULL_SYSTEM
+#endif
UNSERIALIZE_SCALAR(pagePtr);
UNSERIALIZE_SCALAR(nextPID);
-#endif
}
void
*/
bool isMemory(const Addr addr) const;
+ Addr pagePtr;
+
#if FULL_SYSTEM
uint64_t init_param;
*/
Addr loadAddrMask;
-#else
-
- Addr pagePtr;
+#endif // FULL_SYSTEM
protected:
uint64_t nextPID;
/** Amount of physical memory that exists */
Addr memSize();
-
-#endif // FULL_SYSTEM
-
protected:
Enums::MemoryMode memoryMode;
uint64_t workItemsBegin;
*/
Addr getKernelEntry() const { return kernelEntry; }
-#else
+#endif
Addr new_page();
-#endif // FULL_SYSTEM
-
int registerThreadContext(ThreadContext *tc, int assigned=-1);
void replaceThreadContext(ThreadContext *tc, int context_id);