system.cc (2665:a124942bacb8) | system.cc (2680:246e7104f744) |
---|---|
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; --- 24 unchanged lines hidden (view full) --- 33 * Modifications for the FreeBSD kernel. 34 * Based on kern/linux/linux_system.cc. 35 * 36 */ 37 38#include "arch/alpha/system.hh" 39#include "arch/alpha/freebsd/system.hh" 40#include "base/loader/symtab.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; --- 24 unchanged lines hidden (view full) --- 33 * Modifications for the FreeBSD kernel. 34 * Based on kern/linux/linux_system.cc. 35 * 36 */ 37 38#include "arch/alpha/system.hh" 39#include "arch/alpha/freebsd/system.hh" 40#include "base/loader/symtab.hh" |
41#include "cpu/exec_context.hh" | 41#include "cpu/thread_context.hh" |
42#include "mem/physical.hh" 43#include "mem/port.hh" 44#include "arch/isa_traits.hh" 45#include "sim/builder.hh" 46#include "sim/byteswap.hh" 47#include "arch/vtophys.hh" 48 49#define TIMER_FREQUENCY 1193180 --- 17 unchanged lines hidden (view full) --- 67FreebsdAlphaSystem::~FreebsdAlphaSystem() 68{ 69 delete skipDelayEvent; 70 delete skipCalibrateClocks; 71} 72 73 74void | 42#include "mem/physical.hh" 43#include "mem/port.hh" 44#include "arch/isa_traits.hh" 45#include "sim/builder.hh" 46#include "sim/byteswap.hh" 47#include "arch/vtophys.hh" 48 49#define TIMER_FREQUENCY 1193180 --- 17 unchanged lines hidden (view full) --- 67FreebsdAlphaSystem::~FreebsdAlphaSystem() 68{ 69 delete skipDelayEvent; 70 delete skipCalibrateClocks; 71} 72 73 74void |
75FreebsdAlphaSystem::doCalibrateClocks(ExecContext *xc) | 75FreebsdAlphaSystem::doCalibrateClocks(ThreadContext *tc) |
76{ 77 Addr ppc_vaddr = 0; 78 Addr timer_vaddr = 0; 79 | 76{ 77 Addr ppc_vaddr = 0; 78 Addr timer_vaddr = 0; 79 |
80 ppc_vaddr = (Addr)xc->readIntReg(ArgumentReg1); 81 timer_vaddr = (Addr)xc->readIntReg(ArgumentReg2); | 80 ppc_vaddr = (Addr)tc->readIntReg(ArgumentReg1); 81 timer_vaddr = (Addr)tc->readIntReg(ArgumentReg2); |
82 83 virtPort.write(ppc_vaddr, (uint32_t)Clock::Frequency); 84 virtPort.write(timer_vaddr, (uint32_t)TIMER_FREQUENCY); 85} 86 87 88void | 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(ExecContext *xc) | 89FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ThreadContext *tc) |
90{ | 90{ |
91 SkipFuncEvent::process(xc); 92 ((FreebsdAlphaSystem *)xc->getSystemPtr())->doCalibrateClocks(xc); | 91 SkipFuncEvent::process(tc); 92 ((FreebsdAlphaSystem *)tc->getSystemPtr())->doCalibrateClocks(tc); |
93} 94 95 96BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem) 97 98 Param<Tick> boot_cpu_frequency; 99 SimObjectParam<PhysicalMemory *> physmem; 100 --- 58 unchanged lines hidden --- | 93} 94 95 96BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem) 97 98 Param<Tick> boot_cpu_frequency; 99 SimObjectParam<PhysicalMemory *> physmem; 100 --- 58 unchanged lines hidden --- |