X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=dev%2Ftsunami.cc;h=c44da69b7f134a52ef7b14988bfbe0f5f3dbe0e7;hb=19fd3439c738e06be8c43078f520054011a385cc;hp=252f9f1cc3b5f9de7f51259b65f2ff14968866b9;hpb=6807c319b02af31626ab2ed716da6341924eb857;p=gem5.git diff --git a/dev/tsunami.cc b/dev/tsunami.cc index 252f9f1cc..c44da69b7 100644 --- a/dev/tsunami.cc +++ b/dev/tsunami.cc @@ -1,5 +1,5 @@ /* - * 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 @@ -31,12 +31,13 @@ #include #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" @@ -44,9 +45,9 @@ 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; @@ -55,6 +56,24 @@ Tsunami::Tsunami(const string &name, System *s, SimConsole *con, 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::serialize(std::ostream &os) { @@ -89,7 +108,7 @@ END_INIT_SIM_OBJECT_PARAMS(Tsunami) CREATE_SIM_OBJECT(Tsunami) { - return new Tsunami(getInstanceName(), system, cons, intrctrl, pciconfig, + return new Tsunami(getInstanceName(), system, intrctrl, pciconfig, interrupt_frequency); }