system.cc (4772:f08370a81812) | 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; --- 48 unchanged lines hidden (view full) --- 57 * Any time DELAY is called just skip the function. 58 * Shouldn't we actually emulate the delay? 59 */ 60 skipDelayEvent = addKernelFuncEvent<SkipFuncEvent>("DELAY"); 61 skipCalibrateClocks = 62 addKernelFuncEvent<SkipCalibrateClocksEvent>("calibrate_clocks"); 63} 64 | 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; --- 48 unchanged lines hidden (view full) --- 57 * Any time DELAY is called just skip the function. 58 * Shouldn't we actually emulate the delay? 59 */ 60 skipDelayEvent = addKernelFuncEvent<SkipFuncEvent>("DELAY"); 61 skipCalibrateClocks = 62 addKernelFuncEvent<SkipCalibrateClocksEvent>("calibrate_clocks"); 63} 64 |
65 | |
66FreebsdAlphaSystem::~FreebsdAlphaSystem() 67{ 68 delete skipDelayEvent; 69 delete skipCalibrateClocks; 70} 71 | 65FreebsdAlphaSystem::~FreebsdAlphaSystem() 66{ 67 delete skipDelayEvent; 68 delete skipCalibrateClocks; 69} 70 |
72 | |
73void 74FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) 75{ 76 Addr ppc_vaddr = 0; 77 Addr timer_vaddr = 0; 78 79 assert(NumArgumentRegs >= 3); 80 ppc_vaddr = (Addr)tc->readIntReg(ArgumentReg[1]); 81 timer_vaddr = (Addr)tc->readIntReg(ArgumentReg[2]); 82 83 virtPort.write(ppc_vaddr, (uint32_t)Clock::Frequency); 84 virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); 85} 86 | 71void 72FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) 73{ 74 Addr ppc_vaddr = 0; 75 Addr timer_vaddr = 0; 76 77 assert(NumArgumentRegs >= 3); 78 ppc_vaddr = (Addr)tc->readIntReg(ArgumentReg[1]); 79 timer_vaddr = (Addr)tc->readIntReg(ArgumentReg[2]); 80 81 virtPort.write(ppc_vaddr, (uint32_t)Clock::Frequency); 82 virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); 83} 84 |
87 | |
88void 89FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ThreadContext *tc) 90{ 91 SkipFuncEvent::process(tc); 92 ((FreebsdAlphaSystem *)tc->getSystemPtr())->doCalibrateClocks(tc); 93} 94 95FreebsdAlphaSystem * 96FreebsdAlphaSystemParams::create() 97{ 98 return new FreebsdAlphaSystem(this); 99} | 85void 86FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ThreadContext *tc) 87{ 88 SkipFuncEvent::process(tc); 89 ((FreebsdAlphaSystem *)tc->getSystemPtr())->doCalibrateClocks(tc); 90} 91 92FreebsdAlphaSystem * 93FreebsdAlphaSystemParams::create() 94{ 95 return new FreebsdAlphaSystem(this); 96} |