diff options
author | Andrew Schultz <alschult@umich.edu> | 2004-02-05 18:23:16 -0500 |
---|---|---|
committer | Andrew Schultz <alschult@umich.edu> | 2004-02-05 18:23:16 -0500 |
commit | c76675be58b90657078cfb2638a3d0d7f285ef48 (patch) | |
tree | f204a4e55bda9091690d3cefd4ba60c97e39788d /dev/tsunami.cc | |
parent | 77a30ed48daec8fa8db2aaf955eda4e2384df912 (diff) | |
download | gem5-c76675be58b90657078cfb2638a3d0d7f285ef48.tar.xz |
Now skips the calibrate_delay loop in the kernel boot
dev/tsunami.cc:
Changed so Tsunami has a pointer to the System to which it belongs.
Now it is derived from generic base class Platform so platform stuff
can be accessed based on the system
dev/tsunami_io.cc:
dev/tsunami_io.hh:
Cleanup and added copyright
kern/linux/linux_system.cc:
kern/linux/linux_system.hh:
Added event to skip the "calibrate_delay" function, now calculate
loops_per_jiffy based on frequency, interrupt frequency, and constant
sim/system.hh:
Added pointer to generic Platform base class
--HG--
extra : convert_revision : 5bd925eec220a2ca48eb6164d2ecfdec96922c2c
Diffstat (limited to 'dev/tsunami.cc')
-rw-r--r-- | dev/tsunami.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/dev/tsunami.cc b/dev/tsunami.cc index 42281c507..04ab922b9 100644 --- a/dev/tsunami.cc +++ b/dev/tsunami.cc @@ -43,11 +43,13 @@ using namespace std; -Tsunami::Tsunami(const string &name, EtherDev *e, SimConsole *con, +Tsunami::Tsunami(const string &name, System *s, SimConsole *con, IntrControl *ic, int intr_freq) - : SimObject(name), intrctrl(ic), cons(con), ethernet(e), - interrupt_frequency(intr_freq) + : Platform(name, con, ic, intr_freq), system(s) { + // set the back pointer from the system to myself + system->platform = this; + for (int i = 0; i < Tsunami::Max_CPUs; i++) intr_sum_type[i] = 0; } @@ -66,7 +68,7 @@ Tsunami::unserialize(Checkpoint *cp, const std::string §ion) BEGIN_DECLARE_SIM_OBJECT_PARAMS(Tsunami) - SimObjectParam<EtherDev *> ethernet; + SimObjectParam<System *> system; SimObjectParam<SimConsole *> cons; SimObjectParam<IntrControl *> intrctrl; Param<int> interrupt_frequency; @@ -75,7 +77,7 @@ END_DECLARE_SIM_OBJECT_PARAMS(Tsunami) BEGIN_INIT_SIM_OBJECT_PARAMS(Tsunami) - INIT_PARAM(ethernet, "ethernet controller"), + INIT_PARAM(system, "system"), INIT_PARAM(cons, "system console"), INIT_PARAM(intrctrl, "interrupt controller"), INIT_PARAM_DFLT(interrupt_frequency, "frequency of interrupts", 1024) @@ -84,7 +86,7 @@ END_INIT_SIM_OBJECT_PARAMS(Tsunami) CREATE_SIM_OBJECT(Tsunami) { - return new Tsunami(getInstanceName(), ethernet, cons, intrctrl, + return new Tsunami(getInstanceName(), system, cons, intrctrl, interrupt_frequency); } |