From fd21387149c272b8aaee62466fe96863f3ef458f Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 14 May 2004 17:34:15 -0400 Subject: Linux boots... various fixes to make console work correctly dev/console.cc: commented out code that checks if an interrupt is happening before issuing one because they can get lost when linux boots dev/console.hh: added a setPlatform function to set the platform to interrupt dev/platform.hh: dev/tsunami.cc: dev/tsunami.hh: Added virtual functions to post console interrupts dev/tsunami_io.cc: allowed a 64bit read of the PIC since we can't do a physical byte read dev/tsunami_uart.cc: moved TsunamiUart to PioDevice various little fixes to make linux work dev/tsunami_uart.hh: Made Tsunami_Uart a PIO device dev/tsunamireg.h: added some UART defines and used the ULL macros kern/linux/linux_system.cc: commented out waiting for gdb --HG-- extra : convert_revision : 8cfd0700f3812ab349a6d7f132f85f4f421c5c5e --- dev/tsunami.cc | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'dev/tsunami.cc') diff --git a/dev/tsunami.cc b/dev/tsunami.cc index 252f9f1cc..8956ee557 100644 --- a/dev/tsunami.cc +++ b/dev/tsunami.cc @@ -37,6 +37,7 @@ #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,18 @@ Tsunami::Tsunami(const string &name, System *s, SimConsole *con, intr_sum_type[i] = 0; } +void +Tsunami::postConsoleInt() +{ + io->postPIC(0x10); +} + +void +Tsunami::clearConsoleInt() +{ + io->clearPIC(0x10); +} + void Tsunami::serialize(std::ostream &os) { @@ -89,7 +102,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); } -- cgit v1.2.3