system.cc (5499:8bfc7650c344) system.cc (5569:baeee670d4ce)
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;

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

152 delete skipIdeDelay50msEvent;
153 delete skipDelayLoopEvent;
154 delete skipCacheProbeEvent;
155 delete debugPrintkEvent;
156 delete idleStartEvent;
157 delete printThreadEvent;
158}
159
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;

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

152 delete skipIdeDelay50msEvent;
153 delete skipDelayLoopEvent;
154 delete skipCacheProbeEvent;
155 delete debugPrintkEvent;
156 delete idleStartEvent;
157 delete printThreadEvent;
158}
159
160
161void
162LinuxAlphaSystem::setDelayLoop(ThreadContext *tc)
163{
164 Addr addr = 0;
165 if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
166 Tick cpuFreq = tc->getCpuPtr()->frequency();
167 Tick intrFreq = platform->intrFrequency();
168 VirtualPort *vp;
169
170 vp = tc->getVirtPort();
171 vp->writeHtoG(addr, (uint32_t)((cpuFreq / intrFreq) * 0.9988));
172 }
173}
174
160void
161LinuxAlphaSystem::setDelayLoop(ThreadContext *tc)
162{
163 Addr addr = 0;
164 if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
165 Tick cpuFreq = tc->getCpuPtr()->frequency();
166 Tick intrFreq = platform->intrFrequency();
167 VirtualPort *vp;
168
169 vp = tc->getVirtPort();
170 vp->writeHtoG(addr, (uint32_t)((cpuFreq / intrFreq) * 0.9988));
171 }
172}
173
175
176void
177LinuxAlphaSystem::SkipDelayLoopEvent::process(ThreadContext *tc)
178{
179 SkipFuncEvent::process(tc);
180 // calculate and set loops_per_jiffy
181 ((LinuxAlphaSystem *)tc->getSystemPtr())->setDelayLoop(tc);
182}
183

--- 14 unchanged lines hidden ---
174void
175LinuxAlphaSystem::SkipDelayLoopEvent::process(ThreadContext *tc)
176{
177 SkipFuncEvent::process(tc);
178 // calculate and set loops_per_jiffy
179 ((LinuxAlphaSystem *)tc->getSystemPtr())->setDelayLoop(tc);
180}
181

--- 14 unchanged lines hidden ---