/*
- * Copyright (c) 2003 The Regents of The University of Michigan
+ * Copyright (c) 2004 The Regents of The University of Michigan
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
#include <vector>
#include "cpu/intr_control.hh"
-#include "dev/console.hh"
+#include "dev/simconsole.hh"
#include "dev/etherdev.hh"
#include "dev/ide_ctrl.hh"
#include "dev/tlaser_clock.hh"
#include "dev/tsunami_cchip.hh"
#include "dev/tsunami_pchip.hh"
+#include "dev/tsunami_io.hh"
#include "dev/tsunami.hh"
#include "dev/pciconfigall.hh"
#include "sim/builder.hh"
using namespace std;
-Tsunami::Tsunami(const string &name, System *s, SimConsole *con,
+Tsunami::Tsunami(const string &name, System *s,
IntrControl *ic, PciConfigAll *pci, int intr_freq)
- : Platform(name, con, ic, pci, intr_freq), system(s)
+ : Platform(name, ic, pci, intr_freq), system(s)
{
// set the back pointer from the system to myself
system->platform = this;
intr_sum_type[i] = 0;
}
+Tick
+Tsunami::intrFrequency()
+{
+ return io->frequency();
+}
+
+void
+Tsunami::postConsoleInt()
+{
+ io->postPIC(0x10);
+}
+
+void
+Tsunami::clearConsoleInt()
+{
+ io->clearPIC(0x10);
+}
+
+void
+Tsunami::postPciInt(int line)
+{
+ cchip->postDRIR(line);
+}
+
+void
+Tsunami::clearPciInt(int line)
+{
+ cchip->clearDRIR(line);
+}
+
+Addr
+Tsunami::pciToDma(Addr pciAddr) const
+{
+ return pchip->translatePciToDma(pciAddr);
+}
+
void
Tsunami::serialize(std::ostream &os)
{
CREATE_SIM_OBJECT(Tsunami)
{
- return new Tsunami(getInstanceName(), system, cons, intrctrl, pciconfig,
+ return new Tsunami(getInstanceName(), system, intrctrl, pciconfig,
interrupt_frequency);
}