diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-26 13:26:34 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2004-01-26 13:26:34 -0500 |
commit | b7f44f6e0676a933c5aa4d892d789c46daeaaa27 (patch) | |
tree | 1e48e5b6614ec85f5ee9d3d2254f90814ae88e0b /dev/tsunami_io.hh | |
parent | 9b397ce7f45fc275f9004d78520628e2e7c0dd16 (diff) | |
download | gem5-b7f44f6e0676a933c5aa4d892d789c46daeaaa27.tar.xz |
Support for Tsunami coming along... RTC, PIC working, UART in progress
dev/tsunami_io.cc:
PIC, PIT, RTC implementation for tsunami working so far
dev/tsunami_io.hh:
PIT, PIC, RTC implementation for tlaser working so far
dev/tsunamireg.h:
Added RTC defines
kern/linux/linux_system.cc:
wrote cycle frequency into variable so linux doesn't probe for it.
The support exists, but it takes two seconds of time to do on a real
machine, so forever in the simulator.
--HG--
extra : convert_revision : e0ed7f271ece4ed69c06af35d1b0e8ed848cd138
Diffstat (limited to 'dev/tsunami_io.hh')
-rw-r--r-- | dev/tsunami_io.hh | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/dev/tsunami_io.hh b/dev/tsunami_io.hh index 4e342523f..fe904605c 100644 --- a/dev/tsunami_io.hh +++ b/dev/tsunami_io.hh @@ -42,7 +42,13 @@ class TsunamiIO : public MmapDevice { - public: + private: + struct tm tm; + + // In Tsunami RTC only has two i/o ports + // one for data and one for address, so you + // write the address and then read/write the data + uint8_t RTCAddress; protected: @@ -66,33 +72,43 @@ class TsunamiIO : public MmapDevice class RTCEvent : public Event { - protected: - Tick interval; - uint8_t rtc_uip; - public: RTCEvent(); virtual void process(); virtual const char *description(); - uint8_t rtc_uip_value(); }; + uint8_t uip; + uint8_t mask1; uint8_t mask2; uint8_t mode1; uint8_t mode2; + /* This timer is initilized, but after I wrote the code + it doesn't seem to be used again, and best I can tell + it too is not connected to any interrupt port */ ClockEvent timer0; - ClockEvent timer1; + + /* This timer is used to control the speaker, which + we normally could care less about, however it is + also used to calculated the clockspeed and hense + bogomips which is kinda important to the scheduler + so we need to implemnt it although after boot I can't + imagine we would be playing with the PC speaker much */ ClockEvent timer2; + RTCEvent rtc; + uint32_t timerData; public: - TsunamiIO(const std::string &name, /*Tsunami *t,*/ + TsunamiIO(const std::string &name, /*Tsunami *t,*/ time_t init_time, Addr addr, Addr mask, MemoryController *mmu); + void set_time(time_t t); + virtual Fault read(MemReqPtr req, uint8_t *data); virtual Fault write(MemReqPtr req, const uint8_t *data); |