system.cc (4762:c94e103c83ad) | system.cc (4772:f08370a81812) |
---|---|
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; --- 62 unchanged lines hidden (view full) --- 71 72 73void 74FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) 75{ 76 Addr ppc_vaddr = 0; 77 Addr timer_vaddr = 0; 78 | 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; --- 62 unchanged lines hidden (view full) --- 71 72 73void 74FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) 75{ 76 Addr ppc_vaddr = 0; 77 Addr timer_vaddr = 0; 78 |
79 ppc_vaddr = (Addr)tc->readIntReg(ArgumentReg1); 80 timer_vaddr = (Addr)tc->readIntReg(ArgumentReg2); | 79 assert(NumArgumentRegs >= 3); 80 ppc_vaddr = (Addr)tc->readIntReg(ArgumentReg[1]); 81 timer_vaddr = (Addr)tc->readIntReg(ArgumentReg[2]); |
81 82 virtPort.write(ppc_vaddr, (uint32_t)Clock::Frequency); 83 virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); 84} 85 86 87void 88FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ThreadContext *tc) 89{ 90 SkipFuncEvent::process(tc); 91 ((FreebsdAlphaSystem *)tc->getSystemPtr())->doCalibrateClocks(tc); 92} 93 94FreebsdAlphaSystem * 95FreebsdAlphaSystemParams::create() 96{ 97 return new FreebsdAlphaSystem(this); 98} | 82 83 virtPort.write(ppc_vaddr, (uint32_t)Clock::Frequency); 84 virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); 85} 86 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} |