Deleted Added
sdiff udiff text old ( 2665:a124942bacb8 ) new ( 2680:246e7104f744 )
full compact
1/*
2 * Copyright (c) 2004-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 32 unchanged lines hidden (view full) ---

41 */
42
43#include "arch/arguments.hh"
44#include "arch/vtophys.hh"
45#include "arch/alpha/linux/system.hh"
46#include "arch/alpha/linux/threadinfo.hh"
47#include "arch/alpha/system.hh"
48#include "base/loader/symtab.hh"
49#include "cpu/thread_context.hh"
50#include "cpu/base.hh"
51#include "dev/platform.hh"
52#include "kern/linux/printk.hh"
53#include "kern/linux/events.hh"
54#include "mem/physical.hh"
55#include "mem/port.hh"
56#include "sim/builder.hh"
57#include "sim/byteswap.hh"

--- 112 unchanged lines hidden (view full) ---

170 delete printThreadEvent;
171 delete intStartEvent;
172 delete intEndEvent;
173 delete intEndEvent2;
174}
175
176
177void
178LinuxAlphaSystem::setDelayLoop(ThreadContext *tc)
179{
180 Addr addr = 0;
181 if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
182 Tick cpuFreq = tc->getCpuPtr()->frequency();
183 Tick intrFreq = platform->intrFrequency();
184 tc->getVirtPort(tc)->write(addr,
185 (uint32_t)((cpuFreq / intrFreq) * 0.9988));
186 }
187}
188
189
190void
191LinuxAlphaSystem::SkipDelayLoopEvent::process(ThreadContext *tc)
192{
193 SkipFuncEvent::process(tc);
194 // calculate and set loops_per_jiffy
195 ((LinuxAlphaSystem *)tc->getSystemPtr())->setDelayLoop(tc);
196}
197
198void
199LinuxAlphaSystem::PrintThreadInfo::process(ThreadContext *tc)
200{
201 Linux::ThreadInfo ti(tc);
202
203 DPRINTF(Thread, "Currently Executing Thread %s, pid %d, started at: %d\n",
204 ti.curTaskName(), ti.curTaskPID(), ti.curTaskStart());
205}
206
207
208BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
209

--- 61 unchanged lines hidden ---