summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2004-01-28 18:12:52 -0500
committerAli Saidi <saidi@eecs.umich.edu>2004-01-28 18:12:52 -0500
commitb6fba57065d42f12274e83d885a3af048e2daa78 (patch)
tree62cc0cac418a3e2fe10df6d716e925dad04605e6 /dev/tsunami_io.cc
parent3ccc0b1f968e3efaeccda65e06f862c899678312 (diff)
downloadgem5-b6fba57065d42f12274e83d885a3af048e2daa78.tar.xz
our first interrupt
cpu/exetrace.cc: added looking for symbols at PC+4 and PC+8 thanks to gcc skiping setting the gp where it can and jumping <func>+8 dev/console.cc: commented out weird interrupt per nate's suggestion dev/tsunami_cchip.cc: moved rtc flag to correct bit dev/tsunami_io.cc: time interrupt will be 1024Hz and at some point be configurable by linux dev/tsunami_io.hh: Timer interrupt will be 1024hz for now and in the future be configurable by linux --HG-- extra : convert_revision : 2fcc924c8848eb3c6166d9d517617ed193a2b89a
Diffstat (limited to 'dev/tsunami_io.cc')
-rw-r--r--dev/tsunami_io.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/dev/tsunami_io.cc b/dev/tsunami_io.cc
index 611496e58..87f997e9e 100644
--- a/dev/tsunami_io.cc
+++ b/dev/tsunami_io.cc
@@ -25,8 +25,6 @@ using namespace std;
#define UNIX_YEAR_OFFSET 52
-//This will have to be dynamic if we want support usermode access of the RTC
-#define RTC_RATE 1024
// Timer Event for Periodic interrupt of RTC
TsunamiIO::RTCEvent::RTCEvent(Tsunami* t)
@@ -39,7 +37,7 @@ TsunamiIO::RTCEvent::RTCEvent(Tsunami* t)
void
TsunamiIO::RTCEvent::process()
{
- DPRINTF(MC146818, "Timer Interrupt\n");
+ DPRINTF(MC146818, "RTC Timer Interrupt\n");
schedule(curTick + ticksPerSecond/RTC_RATE);
//Actually interrupt the processor here
if (!tsunami->cchip->RTCInterrupting) {
@@ -105,8 +103,8 @@ TsunamiIO::ClockEvent::Status()
TsunamiIO::TsunamiIO(const string &name, Tsunami *t, time_t init_time,
- Addr addr, Addr mask, uint32_t f, MemoryController *mmu)
- : MmapDevice(name, addr, mask, mmu), tsunami(t), rtc(t), freq(f)
+ Addr addr, Addr mask, MemoryController *mmu)
+ : MmapDevice(name, addr, mask, mmu), tsunami(t), rtc(t)
{
timerData = 0;
set_time(init_time == 0 ? time(NULL) : init_time);
@@ -300,7 +298,6 @@ BEGIN_DECLARE_SIM_OBJECT_PARAMS(TsunamiIO)
SimObjectParam<MemoryController *> mmu;
Param<Addr> addr;
Param<Addr> mask;
- Param<uint32_t> frequency;
END_DECLARE_SIM_OBJECT_PARAMS(TsunamiIO)
@@ -311,15 +308,14 @@ BEGIN_INIT_SIM_OBJECT_PARAMS(TsunamiIO)
"(0 for actual time, default is 1/1/06", ULL(1136073600)),
INIT_PARAM(mmu, "Memory Controller"),
INIT_PARAM(addr, "Device Address"),
- INIT_PARAM(mask, "Address Mask"),
- INIT_PARAM(frequency, "clock interrupt frequency")
+ INIT_PARAM(mask, "Address Mask")
END_INIT_SIM_OBJECT_PARAMS(TsunamiIO)
CREATE_SIM_OBJECT(TsunamiIO)
{
return new TsunamiIO(getInstanceName(), tsunami, time, addr,
- mask, frequency, mmu);
+ mask, mmu);
}
REGISTER_SIM_OBJECT("TsunamiIO", TsunamiIO)