From c76675be58b90657078cfb2638a3d0d7f285ef48 Mon Sep 17 00:00:00 2001 From: Andrew Schultz Date: Thu, 5 Feb 2004 18:23:16 -0500 Subject: 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 --- dev/tsunami.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'dev/tsunami.cc') 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 ethernet; + SimObjectParam system; SimObjectParam cons; SimObjectParam intrctrl; Param 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); } -- cgit v1.2.3