system.cc (7723:ee4ac00d0774) system.cc (8706:b1838faf3bcc)
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;

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

36 */
37
38#include "arch/alpha/freebsd/system.hh"
39#include "arch/alpha/system.hh"
40#include "arch/isa_traits.hh"
41#include "arch/vtophys.hh"
42#include "base/loader/symtab.hh"
43#include "cpu/thread_context.hh"
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;

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

36 */
37
38#include "arch/alpha/freebsd/system.hh"
39#include "arch/alpha/system.hh"
40#include "arch/isa_traits.hh"
41#include "arch/vtophys.hh"
42#include "base/loader/symtab.hh"
43#include "cpu/thread_context.hh"
44#include "mem/physical.hh"
45#include "mem/port.hh"
46#include "mem/vport.hh"
44#include "mem/fs_translating_port_proxy.hh"
47#include "sim/byteswap.hh"
48
49#define TIMER_FREQUENCY 1193180
50
51using namespace std;
52using namespace AlphaISA;
53
54FreebsdAlphaSystem::FreebsdAlphaSystem(Params *p)

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

73FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc)
74{
75 Addr ppc_vaddr = 0;
76 Addr timer_vaddr = 0;
77
78 ppc_vaddr = (Addr)tc->readIntReg(17);
79 timer_vaddr = (Addr)tc->readIntReg(18);
80
45#include "sim/byteswap.hh"
46
47#define TIMER_FREQUENCY 1193180
48
49using namespace std;
50using namespace AlphaISA;
51
52FreebsdAlphaSystem::FreebsdAlphaSystem(Params *p)

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

71FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc)
72{
73 Addr ppc_vaddr = 0;
74 Addr timer_vaddr = 0;
75
76 ppc_vaddr = (Addr)tc->readIntReg(17);
77 timer_vaddr = (Addr)tc->readIntReg(18);
78
81 virtPort->write(ppc_vaddr, (uint32_t)SimClock::Frequency);
82 virtPort->write(timer_vaddr, (uint32_t)TIMER_FREQUENCY);
79 virtProxy->write(ppc_vaddr, (uint32_t)SimClock::Frequency);
80 virtProxy->write(timer_vaddr, (uint32_t)TIMER_FREQUENCY);
83}
84
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}
81}
82
83void
84FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ThreadContext *tc)
85{
86 SkipFuncEvent::process(tc);
87 ((FreebsdAlphaSystem *)tc->getSystemPtr())->doCalibrateClocks(tc);
88}
89
90FreebsdAlphaSystem *
91FreebsdAlphaSystemParams::create()
92{
93 return new FreebsdAlphaSystem(this);
94}