Deleted Added
sdiff udiff text old ( 4762:c94e103c83ad ) new ( 4772:f08370a81812 )
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;

--- 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 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
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}