case IPR_PALtemp23:
// write entire quad w/ no side-effect
- old = ipr[idx];
- ipr[idx] = val;
-#if FULL_SYSTEM
if (tc->getKernelStats())
- tc->getKernelStats()->context(old, val, tc);
+ tc->getKernelStats()->context(ipr[idx], val, tc);
-#endif
+ ipr[idx] = val;
break;
case IPR_DTB_PTE:
'''
TruncateEA = '''
- if (!FullSystem)
- EA = Pstate<3:> ? EA<31:0> : EA;
- if (!FULL_SYSTEM)
++ if (!FullSystem)
+ EA = Pstate<3:> ? EA<31:0> : EA;
'''
}};
// Resize for Multithreading CPUs
thread.resize(numThreads);
-#if !FULL_SYSTEM
+ ThreadID active_threads = params->workload.size();
+ if (FullSystem) {
+ active_threads = 1;
+ } else {
+ active_threads = params->workload.size();
- if (active_threads > MaxThreads) {
- panic("Workload Size too large. Increase the 'MaxThreads'"
- "in your InOrder implementation or "
- "edit your workload size.");
- }
+ if (active_threads > MaxThreads) {
+ panic("Workload Size too large. Increase the 'MaxThreads'"
+ "in your InOrder implementation or "
+ "edit your workload size.");
+ }
-
- if (active_threads > 1) {
- threadModel = (InOrderCPU::ThreadModel) params->threadModel;
-
- if (threadModel == SMT) {
- DPRINTF(InOrderCPU, "Setting Thread Model to SMT.\n");
- } else if (threadModel == SwitchOnCacheMiss) {
- DPRINTF(InOrderCPU, "Setting Thread Model to "
- "Switch On Cache Miss\n");
+
+ if (active_threads > 1) {
+ threadModel = (InOrderCPU::ThreadModel) params->threadModel;
+
+ if (threadModel == SMT) {
+ DPRINTF(InOrderCPU, "Setting Thread Model to SMT.\n");
+ } else if (threadModel == SwitchOnCacheMiss) {
+ DPRINTF(InOrderCPU, "Setting Thread Model to "
+ "Switch On Cache Miss\n");
+ }
+
+ } else {
+ threadModel = Single;
}
-
- } else {
- threadModel = Single;
}
-
-
-
-#endif
// Bind the fetch & data ports from the resource pool.
fetchPortIdx = resPool->getPortIdx(params->fetchMemPort);
pTable.clear();
- while(i < count) {
+ while (i < count) {
+ TheISA::TlbEntry *entry;
+ Addr vaddr;
+
- paramIn(cp, csprintf("%s.Entry%d", process->name(), i), "vaddr", vaddr);
+ paramIn(cp, csprintf("%s.Entry%d", name(), i), "vaddr", vaddr);
entry = new TheISA::TlbEntry();
- entry->unserialize(cp, csprintf("%s.Entry%d", process->name(), i));
+ entry->unserialize(cp, csprintf("%s.Entry%d", name(), i));
pTable[vaddr] = *entry;
++i;
}
connectPorts(SimObject *o1, const std::string &name1, int i1,
SimObject *o2, const std::string &name2, int i2)
{
- MemObject *mo1, *mo2;
- mo1 = dynamic_cast<MemObject*>(o1);
- mo2 = dynamic_cast<MemObject*>(o2);
-#if FULL_SYSTEM
- EtherObject *eo1, *eo2;
- EtherDevice *ed1, *ed2;
- eo1 = dynamic_cast<EtherObject*>(o1);
- ed1 = dynamic_cast<EtherDevice*>(o1);
--
- eo2 = dynamic_cast<EtherObject*>(o2);
- ed2 = dynamic_cast<EtherDevice*>(o2);
+ if (FullSystem) {
+ EtherObject *eo1, *eo2;
+ EtherDevice *ed1, *ed2;
+ eo1 = dynamic_cast<EtherObject*>(o1);
+ ed1 = dynamic_cast<EtherDevice*>(o1);
-
+ eo2 = dynamic_cast<EtherObject*>(o2);
+ ed2 = dynamic_cast<EtherDevice*>(o2);
- if ((eo1 || ed1) && (eo2 || ed2)) {
- EtherInt *p1 = lookupEthPort(o1, name1, i1);
- EtherInt *p2 = lookupEthPort(o2, name2, i2);
+ if ((eo1 || ed1) && (eo2 || ed2)) {
+ EtherInt *p1 = lookupEthPort(o1, name1, i1);
+ EtherInt *p2 = lookupEthPort(o2, name2, i2);
- if (p1 != NULL && p2 != NULL) {
+ if (p1 != NULL && p2 != NULL) {
- p1->setPeer(p2);
- p2->setPeer(p1);
+ p1->setPeer(p2);
+ p2->setPeer(p1);
- return 1;
+ return 1;
+ }
}
}
-#endif
Port *p1 = lookupPort(o1, name1, i1);
Port *p2 = lookupPort(o2, name2, i2);
remoteGDB[context_id]->replaceThreadContext(tc);
}
-#if !FULL_SYSTEM
Addr
- System::new_page()
+ System::allocPhysPages(int npages)
{
Addr return_addr = pagePtr << LogVMPageSize;
- ++pagePtr;
+ pagePtr += npages;
if (return_addr >= physmem->size())
fatal("Out of memory, please increase size of physical memory.");
return return_addr;
*/
Addr getKernelEntry() const { return kernelEntry; }
- Addr new_page();
-#else
-
+ /// Allocate npages contiguous unused physical pages
+ /// @return Starting address of first page
+ Addr allocPhysPages(int npages);
-#endif // FULL_SYSTEM
-
int registerThreadContext(ThreadContext *tc, int assigned=-1);
void replaceThreadContext(ThreadContext *tc, int context_id);