system.cc (8706:b1838faf3bcc) system.cc (8741:491297d019f3)
1/*
2 * Copyright (c) 2004-2006 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;

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

148 delete idleStartEvent;
149 delete printThreadEvent;
150}
151
152
153void
154LinuxMipsSystem::setDelayLoop(ThreadContext *tc)
155{
1/*
2 * Copyright (c) 2004-2006 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;

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

148 delete idleStartEvent;
149 delete printThreadEvent;
150}
151
152
153void
154LinuxMipsSystem::setDelayLoop(ThreadContext *tc)
155{
156 Addr addr = 0;
157 if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
158 Tick cpuFreq = tc->getCpuPtr()->frequency();
159 Tick intrFreq = platform->intrFrequency();
160 FSTranslatingPortProxy* vp;
161
162 vp = tc->getVirtProxy();
163 vp->writeHtoG(addr, (uint32_t)((cpuFreq / intrFreq) * 0.9988));
164 }
156 panic("setDelayLoop not implemented.\n");
165}
166
167
168void
169LinuxMipsSystem::SkipDelayLoopEvent::process(ThreadContext *tc)
170{
171 SkipFuncEvent::process(tc);
172 // calculate and set loops_per_jiffy

--- 17 unchanged lines hidden ---
157}
158
159
160void
161LinuxMipsSystem::SkipDelayLoopEvent::process(ThreadContext *tc)
162{
163 SkipFuncEvent::process(tc);
164 // calculate and set loops_per_jiffy

--- 17 unchanged lines hidden ---