move alpha specific code into arch/alpha
System -> AlphaSystem SConscript: Move some more files around arch/alpha/freebsd/system.cc: arch/alpha/freebsd/system.hh: System -> AlphaSystem arch/alpha/linux/aligned.hh: arch/alpha/linux/hwrpb.hh: arch/alpha/linux/system.cc: arch/alpha/linux/thread_info.hh: arch/alpha/linux/threadinfo.hh: move alpha specific code into arch/alpha python/m5/objects/System.py: Split off arch specific parts of system into AlphaSystem --HG-- rename : kern/freebsd/freebsd_system.cc => arch/alpha/freebsd/system.cc rename : kern/freebsd/freebsd_system.hh => arch/alpha/freebsd/system.hh rename : kern/linux/aligned.hh => arch/alpha/linux/aligned.hh rename : kern/linux/hwrpb.hh => arch/alpha/linux/hwrpb.hh rename : kern/linux/linux_system.cc => arch/alpha/linux/system.cc rename : kern/linux/linux_system.hh => arch/alpha/linux/system.hh rename : kern/linux/thread_info.hh => arch/alpha/linux/thread_info.hh rename : kern/linux/linux_threadinfo.hh => arch/alpha/linux/threadinfo.hh rename : kern/tru64/tru64_system.cc => arch/alpha/tru64/system.cc rename : kern/tru64/tru64_system.hh => arch/alpha/tru64/system.hh extra : convert_revision : 1c496efb823326a4b629574bd9b5f30e99a0aa40
This commit is contained in:
parent
9ad9178587
commit
d01a593433
14 changed files with 206 additions and 112 deletions
|
@ -212,7 +212,10 @@ mysql_sources = Split('''
|
|||
|
||||
# Full-system sources
|
||||
full_system_sources = Split('''
|
||||
arch/alpha/freebsd/system.cc
|
||||
arch/alpha/linux/system.cc
|
||||
arch/alpha/system.cc
|
||||
arch/alpha/tru64/system.cc
|
||||
|
||||
base/crc.cc
|
||||
base/inet.cc
|
||||
|
@ -253,15 +256,13 @@ full_system_sources = Split('''
|
|||
kern/kernel_binning.cc
|
||||
kern/kernel_stats.cc
|
||||
kern/system_events.cc
|
||||
kern/freebsd/freebsd_system.cc
|
||||
kern/linux/events.cc
|
||||
kern/linux/linux_syscalls.cc
|
||||
kern/linux/linux_system.cc
|
||||
kern/linux/printk.cc
|
||||
kern/tru64/dump_mbuf.cc
|
||||
kern/tru64/printf.cc
|
||||
kern/tru64/tru64_events.cc
|
||||
kern/tru64/tru64_syscalls.cc
|
||||
kern/tru64/tru64_system.cc
|
||||
|
||||
mem/functional/memory_control.cc
|
||||
mem/functional/physical.cc
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
*/
|
||||
|
||||
#include "arch/alpha/system.hh"
|
||||
#include "arch/alpha/freebsd/system.hh"
|
||||
#include "base/loader/symtab.hh"
|
||||
#include "cpu/exec_context.hh"
|
||||
#include "kern/freebsd/freebsd_system.hh"
|
||||
#include "mem/functional/memory_control.hh"
|
||||
#include "mem/functional/physical.hh"
|
||||
#include "sim/builder.hh"
|
||||
|
@ -47,9 +47,9 @@
|
|||
#define TIMER_FREQUENCY 1193180
|
||||
|
||||
using namespace std;
|
||||
using namespace TheISA;
|
||||
using namespace AlphaISA;
|
||||
|
||||
FreebsdSystem::FreebsdSystem(Params *p)
|
||||
FreebsdAlphaSystem::FreebsdAlphaSystem(Params *p)
|
||||
: AlphaSystem(p)
|
||||
{
|
||||
/**
|
||||
|
@ -62,7 +62,7 @@ FreebsdSystem::FreebsdSystem(Params *p)
|
|||
}
|
||||
|
||||
|
||||
FreebsdSystem::~FreebsdSystem()
|
||||
FreebsdAlphaSystem::~FreebsdAlphaSystem()
|
||||
{
|
||||
delete skipDelayEvent;
|
||||
delete skipCalibrateClocks;
|
||||
|
@ -70,7 +70,7 @@ FreebsdSystem::~FreebsdSystem()
|
|||
|
||||
|
||||
void
|
||||
FreebsdSystem::doCalibrateClocks(ExecContext *xc)
|
||||
FreebsdAlphaSystem::doCalibrateClocks(ExecContext *xc)
|
||||
{
|
||||
Addr ppc_vaddr = 0;
|
||||
Addr timer_vaddr = 0;
|
||||
|
@ -92,14 +92,14 @@ FreebsdSystem::doCalibrateClocks(ExecContext *xc)
|
|||
|
||||
|
||||
void
|
||||
FreebsdSystem::SkipCalibrateClocksEvent::process(ExecContext *xc)
|
||||
FreebsdAlphaSystem::SkipCalibrateClocksEvent::process(ExecContext *xc)
|
||||
{
|
||||
SkipFuncEvent::process(xc);
|
||||
((FreebsdSystem *)xc->system)->doCalibrateClocks(xc);
|
||||
((FreebsdAlphaSystem *)xc->system)->doCalibrateClocks(xc);
|
||||
}
|
||||
|
||||
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdSystem)
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
|
||||
Param<Tick> boot_cpu_frequency;
|
||||
SimObjectParam<MemoryController *> memctrl;
|
||||
|
@ -120,9 +120,9 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(FreebsdSystem)
|
|||
VectorParam<string> binned_fns;
|
||||
Param<bool> bin_int;
|
||||
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(FreebsdSystem)
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdSystem)
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
|
||||
INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
|
||||
INIT_PARAM(memctrl, "memory controller"),
|
||||
|
@ -140,9 +140,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(FreebsdSystem)
|
|||
INIT_PARAM(binned_fns, "functions to be broken down and binned"),
|
||||
INIT_PARAM_DFLT(bin_int, "is interrupt code binned seperately?", true)
|
||||
|
||||
END_INIT_SIM_OBJECT_PARAMS(FreebsdSystem)
|
||||
END_INIT_SIM_OBJECT_PARAMS(FreebsdAlphaSystem)
|
||||
|
||||
CREATE_SIM_OBJECT(FreebsdSystem)
|
||||
CREATE_SIM_OBJECT(FreebsdAlphaSystem)
|
||||
{
|
||||
AlphaSystem::Params *p = new AlphaSystem::Params;
|
||||
p->name = getInstanceName();
|
||||
|
@ -160,8 +160,8 @@ CREATE_SIM_OBJECT(FreebsdSystem)
|
|||
p->bin = bin;
|
||||
p->binned_fns = binned_fns;
|
||||
p->bin_int = bin_int;
|
||||
return new FreebsdSystem(p);
|
||||
return new FreebsdAlphaSystem(p);
|
||||
}
|
||||
|
||||
REGISTER_SIM_OBJECT("FreebsdSystem", FreebsdSystem)
|
||||
REGISTER_SIM_OBJECT("FreebsdAlphaSystem", FreebsdAlphaSystem)
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
#include "kern/system_events.hh"
|
||||
|
||||
class FreebsdSystem : public AlphaSystem
|
||||
class FreebsdAlphaSystem : public AlphaSystem
|
||||
{
|
||||
private:
|
||||
class SkipCalibrateClocksEvent : public SkipFuncEvent
|
||||
|
@ -47,8 +47,8 @@ class FreebsdSystem : public AlphaSystem
|
|||
SkipCalibrateClocksEvent *skipCalibrateClocks;
|
||||
|
||||
public:
|
||||
FreebsdSystem(Params *p);
|
||||
~FreebsdSystem();
|
||||
FreebsdAlphaSystem(Params *p);
|
||||
~FreebsdAlphaSystem();
|
||||
void doCalibrateClocks(ExecContext *xc);
|
||||
|
||||
};
|
|
@ -26,15 +26,15 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_ALIGNED_HH__
|
||||
#define __KERN_LINUX_ALIGNED_HH__
|
||||
#ifndef __ARCH_ALPHA_LINUX_ALIGNED_HH__
|
||||
#define __ARCH_ALPHA_LINUX_ALIGNED_HH__
|
||||
|
||||
|
||||
/* GCC 3.3.X has a bug in which attributes+typedefs don't work. 3.2.X is fine
|
||||
* as in 3.4.X, but the bug is marked will not fix in 3.3.X so here is
|
||||
* the work around.
|
||||
*/
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ != 3
|
||||
#if (__GNUC__ == 3 && __GNUC_MINOR__ != 3) || __GNUC__ > 3
|
||||
typedef uint64_t uint64_ta __attribute__ ((aligned (8))) ;
|
||||
typedef int64_t int64_ta __attribute__ ((aligned (8))) ;
|
||||
typedef Addr Addr_a __attribute__ ((aligned (8))) ;
|
||||
|
@ -44,4 +44,4 @@ typedef Addr Addr_a __attribute__ ((aligned (8))) ;
|
|||
#define Addr_a Addr __attribute__ ((aligned (8)))
|
||||
#endif /* __GNUC__ __GNUC_MINOR__ */
|
||||
|
||||
#endif /* __KERN_LINUX_ALIGNED_HH__ */
|
||||
#endif /* __ARCH_ALPHA_LINUX_ALIGNED_HH__ */
|
|
@ -22,10 +22,10 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_HWRPB_HH__
|
||||
#define __KERN_LINUX_HWRPB_HH__
|
||||
#ifndef __ARCH_ALPHA_LINUX_HWRPB_HH__
|
||||
#define __ARCH_ALPHA_LINUX_HWRPB_HH__
|
||||
|
||||
#include "kern/linux/aligned.hh"
|
||||
#include "arch/alpha/linux/aligned.hh"
|
||||
|
||||
namespace Linux {
|
||||
struct pcb_struct {
|
||||
|
@ -39,4 +39,4 @@ namespace Linux {
|
|||
uint64_ta res1, res2;
|
||||
};
|
||||
}
|
||||
#endif // __KERN_LINUX_HWRPB_HH__
|
||||
#endif // __ARCH_ALPHA_LINUX_HWRPB_HH__
|
|
@ -35,25 +35,27 @@
|
|||
* up boot time.
|
||||
*/
|
||||
|
||||
#include "arch/arguments.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
#include "arch/alpha/linux/system.hh"
|
||||
#include "arch/alpha/linux/threadinfo.hh"
|
||||
#include "arch/alpha/system.hh"
|
||||
#include "base/loader/symtab.hh"
|
||||
#include "cpu/exec_context.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "kern/linux/linux_system.hh"
|
||||
#include "kern/linux/linux_threadinfo.hh"
|
||||
#include "dev/platform.hh"
|
||||
#include "kern/linux/printk.hh"
|
||||
#include "kern/linux/events.hh"
|
||||
#include "mem/functional/memory_control.hh"
|
||||
#include "mem/functional/physical.hh"
|
||||
#include "sim/builder.hh"
|
||||
#include "sim/byteswap.hh"
|
||||
#include "dev/platform.hh"
|
||||
#include "arch/arguments.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
|
||||
using namespace std;
|
||||
using namespace TheISA;
|
||||
using namespace AlphaISA;
|
||||
using namespace Linux;
|
||||
|
||||
LinuxSystem::LinuxSystem(Params *p)
|
||||
LinuxAlphaSystem::LinuxAlphaSystem(Params *p)
|
||||
: AlphaSystem(p)
|
||||
{
|
||||
Addr addr = 0;
|
||||
|
@ -166,7 +168,7 @@ LinuxSystem::LinuxSystem(Params *p)
|
|||
}
|
||||
}
|
||||
|
||||
LinuxSystem::~LinuxSystem()
|
||||
LinuxAlphaSystem::~LinuxAlphaSystem()
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
delete kernelPanicEvent;
|
||||
|
@ -184,7 +186,7 @@ LinuxSystem::~LinuxSystem()
|
|||
|
||||
|
||||
void
|
||||
LinuxSystem::setDelayLoop(ExecContext *xc)
|
||||
LinuxAlphaSystem::setDelayLoop(ExecContext *xc)
|
||||
{
|
||||
Addr addr = 0;
|
||||
if (kernelSymtab->findAddress("loops_per_jiffy", addr)) {
|
||||
|
@ -200,31 +202,17 @@ LinuxSystem::setDelayLoop(ExecContext *xc)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
LinuxSystem::SkipDelayLoopEvent::process(ExecContext *xc)
|
||||
LinuxAlphaSystem::SkipDelayLoopEvent::process(ExecContext *xc)
|
||||
{
|
||||
SkipFuncEvent::process(xc);
|
||||
// calculate and set loops_per_jiffy
|
||||
((LinuxSystem *)xc->system)->setDelayLoop(xc);
|
||||
((LinuxAlphaSystem *)xc->system)->setDelayLoop(xc);
|
||||
}
|
||||
|
||||
void
|
||||
LinuxSystem::DebugPrintkEvent::process(ExecContext *xc)
|
||||
{
|
||||
if (DTRACE(DebugPrintf)) {
|
||||
if (!raw) {
|
||||
StringWrap name(xc->system->name() + ".dprintk");
|
||||
DPRINTFN("");
|
||||
}
|
||||
|
||||
AlphaArguments args(xc);
|
||||
Printk(args);
|
||||
SkipFuncEvent::process(xc);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
LinuxSystem::PrintThreadInfo::process(ExecContext *xc)
|
||||
LinuxAlphaSystem::PrintThreadInfo::process(ExecContext *xc)
|
||||
{
|
||||
Linux::ThreadInfo ti(xc);
|
||||
|
||||
|
@ -233,7 +221,7 @@ LinuxSystem::PrintThreadInfo::process(ExecContext *xc)
|
|||
}
|
||||
|
||||
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem)
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
|
||||
Param<Tick> boot_cpu_frequency;
|
||||
SimObjectParam<MemoryController *> memctrl;
|
||||
|
@ -254,9 +242,9 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem)
|
|||
VectorParam<string> binned_fns;
|
||||
Param<bool> bin_int;
|
||||
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(LinuxSystem)
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxSystem)
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
|
||||
INIT_PARAM(boot_cpu_frequency, "Frequency of the boot CPU"),
|
||||
INIT_PARAM(memctrl, "memory controller"),
|
||||
|
@ -274,9 +262,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(LinuxSystem)
|
|||
INIT_PARAM(binned_fns, "functions to be broken down and binned"),
|
||||
INIT_PARAM_DFLT(bin_int, "is interrupt code binned seperately?", true)
|
||||
|
||||
END_INIT_SIM_OBJECT_PARAMS(LinuxSystem)
|
||||
END_INIT_SIM_OBJECT_PARAMS(LinuxAlphaSystem)
|
||||
|
||||
CREATE_SIM_OBJECT(LinuxSystem)
|
||||
CREATE_SIM_OBJECT(LinuxAlphaSystem)
|
||||
{
|
||||
AlphaSystem::Params *p = new AlphaSystem::Params;
|
||||
p->name = getInstanceName();
|
||||
|
@ -294,8 +282,8 @@ CREATE_SIM_OBJECT(LinuxSystem)
|
|||
p->bin = bin;
|
||||
p->binned_fns = binned_fns;
|
||||
p->bin_int = bin_int;
|
||||
return new LinuxSystem(p);
|
||||
return new LinuxAlphaSystem(p);
|
||||
}
|
||||
|
||||
REGISTER_SIM_OBJECT("LinuxSystem", LinuxSystem)
|
||||
REGISTER_SIM_OBJECT("LinuxAlphaSystem", LinuxAlphaSystem)
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2005 The Regents of The University of Michigan
|
||||
* Copyright (c) 2004-2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -26,21 +26,27 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_LINUX_SYSTEM_HH__
|
||||
#define __KERN_LINUX_LINUX_SYSTEM_HH__
|
||||
#ifndef __ARCH_ALPHA_LINUX_SYSTEM_HH__
|
||||
#define __ARCH_ALPHA_LINUX_SYSTEM_HH__
|
||||
|
||||
class ExecContext;
|
||||
|
||||
class BreakPCEvent;
|
||||
class IdleStartEvent;
|
||||
class PrintThreadInfo;
|
||||
|
||||
#include "arch/alpha/system.hh"
|
||||
#include "kern/linux/events.hh"
|
||||
|
||||
using namespace AlphaISA;
|
||||
using namespace Linux;
|
||||
using namespace std;
|
||||
|
||||
/**
|
||||
* This class contains linux specific system code (Loading, Events, Binning).
|
||||
* It points to objects that are the system binaries to load and patches them
|
||||
* appropriately to work in simulator.
|
||||
*/
|
||||
class LinuxSystem : public AlphaSystem
|
||||
class LinuxAlphaSystem : public AlphaSystem
|
||||
{
|
||||
private:
|
||||
class SkipDelayLoopEvent : public SkipFuncEvent
|
||||
|
@ -51,18 +57,6 @@ class LinuxSystem : public AlphaSystem
|
|||
virtual void process(ExecContext *xc);
|
||||
};
|
||||
|
||||
class DebugPrintkEvent : public SkipFuncEvent
|
||||
{
|
||||
private:
|
||||
bool raw;
|
||||
|
||||
public:
|
||||
DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr,
|
||||
bool r = false)
|
||||
: SkipFuncEvent(q, desc, addr), raw(r) {}
|
||||
virtual void process(ExecContext *xc);
|
||||
};
|
||||
|
||||
class PrintThreadInfo : public PCEvent
|
||||
{
|
||||
public:
|
||||
|
@ -71,6 +65,7 @@ class LinuxSystem : public AlphaSystem
|
|||
virtual void process(ExecContext *xc);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Addresses defining where the kernel bootloader places various
|
||||
* elements. Details found in include/asm-alpha/system.h
|
||||
|
@ -142,10 +137,10 @@ class LinuxSystem : public AlphaSystem
|
|||
IdleStartEvent *idleStartEvent;
|
||||
|
||||
public:
|
||||
LinuxSystem(Params *p);
|
||||
~LinuxSystem();
|
||||
LinuxAlphaSystem(Params *p);
|
||||
~LinuxAlphaSystem();
|
||||
|
||||
void setDelayLoop(ExecContext *xc);
|
||||
};
|
||||
|
||||
#endif // __KERN_LINUX_LINUX_SYSTEM_HH__
|
||||
#endif // __ARCH_ALPHA_LINUX_SYSTEM_HH__
|
|
@ -26,10 +26,10 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_THREAD_INFO_H__
|
||||
#define __KERN_LINUX_THREAD_INFO_H__
|
||||
#ifndef __ARCH_ALPHA_LINUX_THREAD_INFO_H__
|
||||
#define __ARCH_ALPHA_LINUX_THREAD_INFO_H__
|
||||
|
||||
#include "kern/linux/hwrpb.hh"
|
||||
#include "arch/alpha/linux/hwrpb.hh"
|
||||
|
||||
namespace Linux {
|
||||
struct thread_info {
|
||||
|
@ -38,4 +38,4 @@ namespace Linux {
|
|||
};
|
||||
}
|
||||
|
||||
#endif // __KERN_LINUX_THREAD_INFO_H__
|
||||
#endif // __ARCH_ALPHA_LINUX_THREAD_INFO_H__
|
|
@ -26,10 +26,11 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_LINUX_TREADNIFO_HH__
|
||||
#define __KERN_LINUX_LINUX_TREADNIFO_HH__
|
||||
#ifndef __ARCH_ALPHA_LINUX_LINUX_TREADNIFO_HH__
|
||||
#define __ARCH_ALPHA_LINUX_LINUX_TREADNIFO_HH__
|
||||
|
||||
#include "kern/linux/thread_info.hh"
|
||||
#include "arch/alpha/linux/thread_info.hh"
|
||||
#include "cpu/exec_context.hh"
|
||||
#include "kern/linux/sched.hh"
|
||||
#include "sim/vptr.hh"
|
||||
|
||||
|
@ -85,4 +86,4 @@ class ThreadInfo
|
|||
|
||||
/* namespace Linux */ }
|
||||
|
||||
#endif // __KERN_LINUX_LINUX_THREADINFO_HH__
|
||||
#endif // __ARCH_ALPHA_LINUX_LINUX_THREADINFO_HH__
|
|
@ -26,22 +26,22 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "arch/alpha/tru64/system.hh"
|
||||
#include "arch/isa_traits.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
#include "base/loader/symtab.hh"
|
||||
#include "base/trace.hh"
|
||||
#include "cpu/base.hh"
|
||||
#include "cpu/exec_context.hh"
|
||||
#include "kern/tru64/tru64_events.hh"
|
||||
#include "kern/tru64/tru64_system.hh"
|
||||
#include "kern/system_events.hh"
|
||||
#include "mem/functional/memory_control.hh"
|
||||
#include "mem/functional/physical.hh"
|
||||
#include "sim/builder.hh"
|
||||
#include "arch/isa_traits.hh"
|
||||
#include "arch/vtophys.hh"
|
||||
|
||||
using namespace std;
|
||||
|
||||
Tru64System::Tru64System(Tru64System::Params *p)
|
||||
Tru64AlphaSystem::Tru64AlphaSystem(Tru64AlphaSystem::Params *p)
|
||||
: AlphaSystem(p)
|
||||
{
|
||||
Addr addr = 0;
|
||||
|
@ -77,7 +77,7 @@ Tru64System::Tru64System(Tru64System::Params *p)
|
|||
#endif
|
||||
}
|
||||
|
||||
Tru64System::~Tru64System()
|
||||
Tru64AlphaSystem::~Tru64AlphaSystem()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
delete kernelPanicEvent;
|
||||
|
@ -93,7 +93,7 @@ Tru64System::~Tru64System()
|
|||
#endif
|
||||
}
|
||||
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64System)
|
||||
BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
|
||||
Param<Tick> boot_cpu_frequency;
|
||||
SimObjectParam<MemoryController *> memctrl;
|
||||
|
@ -113,9 +113,9 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tru64System)
|
|||
Param<bool> bin;
|
||||
VectorParam<string> binned_fns;
|
||||
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(Tru64System)
|
||||
END_DECLARE_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(Tru64System)
|
||||
BEGIN_INIT_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
|
||||
INIT_PARAM(boot_cpu_frequency, "frequency of the boot cpu"),
|
||||
INIT_PARAM(memctrl, "memory controller"),
|
||||
|
@ -132,9 +132,9 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(Tru64System)
|
|||
INIT_PARAM_DFLT(bin, "is this system to be binned", false),
|
||||
INIT_PARAM(binned_fns, "functions to be broken down and binned")
|
||||
|
||||
END_INIT_SIM_OBJECT_PARAMS(Tru64System)
|
||||
END_INIT_SIM_OBJECT_PARAMS(Tru64AlphaSystem)
|
||||
|
||||
CREATE_SIM_OBJECT(Tru64System)
|
||||
CREATE_SIM_OBJECT(Tru64AlphaSystem)
|
||||
{
|
||||
AlphaSystem::Params *p = new AlphaSystem::Params;
|
||||
p->name = getInstanceName();
|
||||
|
@ -153,7 +153,7 @@ CREATE_SIM_OBJECT(Tru64System)
|
|||
p->binned_fns = binned_fns;
|
||||
p->bin_int = false;
|
||||
|
||||
return new Tru64System(p);
|
||||
return new Tru64AlphaSystem(p);
|
||||
}
|
||||
|
||||
REGISTER_SIM_OBJECT("Tru64System", Tru64System)
|
||||
REGISTER_SIM_OBJECT("Tru64AlphaSystem", Tru64AlphaSystem)
|
|
@ -26,8 +26,8 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_TRU64_TRU64_SYSTEM_HH__
|
||||
#define __KERN_TRU64_TRU64_SYSTEM_HH__
|
||||
#ifndef __ARCH_ALPHA_TRU64_SYSTEM_HH__
|
||||
#define __ARCH_ALPHA_TRU64_SYSTEM_HH__
|
||||
|
||||
#include "arch/alpha/system.hh"
|
||||
#include "arch/isa_traits.hh"
|
||||
|
@ -40,10 +40,11 @@ class BadAddrEvent;
|
|||
class SkipFuncEvent;
|
||||
class PrintfEvent;
|
||||
class DebugPrintfEvent;
|
||||
class DebugPrintfrEvent;
|
||||
class DumpMbufEvent;
|
||||
class AlphaArguments;
|
||||
|
||||
class Tru64System : public AlphaSystem
|
||||
class Tru64AlphaSystem : public AlphaSystem
|
||||
{
|
||||
private:
|
||||
#ifdef DEBUG
|
||||
|
@ -60,11 +61,11 @@ class Tru64System : public AlphaSystem
|
|||
DumpMbufEvent *dumpMbufEvent;
|
||||
|
||||
public:
|
||||
Tru64System(Params *p);
|
||||
~Tru64System();
|
||||
Tru64AlphaSystem(Params *p);
|
||||
~Tru64AlphaSystem();
|
||||
|
||||
static void Printf(AlphaArguments args);
|
||||
static void DumpMbuf(AlphaArguments args);
|
||||
};
|
||||
|
||||
#endif // __KERN_TRU64_TRU64_SYSTEM_HH__
|
||||
#endif // __ARCH_ALPHA_TRU64_SYSTEM_HH__
|
54
kern/linux/events.cc
Normal file
54
kern/linux/events.cc
Normal file
|
@ -0,0 +1,54 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "arch/arguments.hh"
|
||||
#include "base/trace.hh"
|
||||
#include "cpu/exec_context.hh"
|
||||
#include "kern/linux/events.hh"
|
||||
#include "kern/linux/printk.hh"
|
||||
#include "kern/system_events.hh"
|
||||
|
||||
|
||||
namespace Linux {
|
||||
|
||||
void
|
||||
DebugPrintkEvent::process(ExecContext *xc)
|
||||
{
|
||||
if (DTRACE(DebugPrintf)) {
|
||||
if (!raw) {
|
||||
StringWrap name(xc->system->name() + ".dprintk");
|
||||
DPRINTFN("");
|
||||
}
|
||||
|
||||
AlphaArguments args(xc);
|
||||
Printk(args);
|
||||
SkipFuncEvent::process(xc);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace linux
|
50
kern/linux/events.hh
Normal file
50
kern/linux/events.hh
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright (c) 2004-2006 The Regents of The University of Michigan
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met: redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer;
|
||||
* redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution;
|
||||
* neither the name of the copyright holders nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef __KERN_LINUX_EVENTS_HH__
|
||||
#define __KERN_LINUX_EVENTS_HH__
|
||||
|
||||
#include "kern/system_events.hh"
|
||||
|
||||
namespace Linux {
|
||||
|
||||
class DebugPrintkEvent : public SkipFuncEvent
|
||||
{
|
||||
private:
|
||||
bool raw;
|
||||
|
||||
public:
|
||||
DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr,
|
||||
bool r = false)
|
||||
: SkipFuncEvent(q, desc, addr), raw(r) {}
|
||||
virtual void process(ExecContext *xc);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
|
@ -1,17 +1,21 @@
|
|||
from m5 import *
|
||||
|
||||
class System(SimObject):
|
||||
type = 'System'
|
||||
boot_cpu_frequency = Param.Frequency(Self.cpu[0].clock.frequency,
|
||||
"boot processor frequency")
|
||||
memctrl = Param.MemoryController(Parent.any, "memory controller")
|
||||
physmem = Param.PhysicalMemory(Parent.any, "phsyical memory")
|
||||
init_param = Param.UInt64(0, "numerical value to pass into simulator")
|
||||
bin = Param.Bool(False, "is this system binned")
|
||||
binned_fns = VectorParam.String([], "functions broken down and binned")
|
||||
kernel = Param.String("file that contains the kernel code")
|
||||
readfile = Param.String("", "file to read startup script from")
|
||||
|
||||
class AlphaSystem(System):
|
||||
type = 'AlphaSystem'
|
||||
console = Param.String("file that contains the console code")
|
||||
pal = Param.String("file that contains palcode")
|
||||
readfile = Param.String("", "file to read startup script from")
|
||||
init_param = Param.UInt64(0, "numerical value to pass into simulator")
|
||||
boot_osflags = Param.String("a", "boot flags to pass to the kernel")
|
||||
system_type = Param.UInt64("Type of system we are emulating")
|
||||
system_rev = Param.UInt64("Revision of system we are emulating")
|
||||
bin = Param.Bool(False, "is this system binned")
|
||||
binned_fns = VectorParam.String([], "functions broken down and binned")
|
||||
|
|
Loading…
Reference in a new issue