summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.hh
diff options
context:
space:
mode:
authorAndrew Schultz <alschult@umich.edu>2004-02-05 18:23:16 -0500
committerAndrew Schultz <alschult@umich.edu>2004-02-05 18:23:16 -0500
commitc76675be58b90657078cfb2638a3d0d7f285ef48 (patch)
treef204a4e55bda9091690d3cefd4ba60c97e39788d /dev/tsunami_io.hh
parent77a30ed48daec8fa8db2aaf955eda4e2384df912 (diff)
downloadgem5-c76675be58b90657078cfb2638a3d0d7f285ef48.tar.xz
Now skips the calibrate_delay loop in the kernel boot
dev/tsunami.cc: Changed so Tsunami has a pointer to the System to which it belongs. Now it is derived from generic base class Platform so platform stuff can be accessed based on the system dev/tsunami_io.cc: dev/tsunami_io.hh: Cleanup and added copyright kern/linux/linux_system.cc: kern/linux/linux_system.hh: Added event to skip the "calibrate_delay" function, now calculate loops_per_jiffy based on frequency, interrupt frequency, and constant sim/system.hh: Added pointer to generic Platform base class --HG-- extra : convert_revision : 5bd925eec220a2ca48eb6164d2ecfdec96922c2c
Diffstat (limited to 'dev/tsunami_io.hh')
-rw-r--r--dev/tsunami_io.hh64
1 files changed, 34 insertions, 30 deletions
diff --git a/dev/tsunami_io.hh b/dev/tsunami_io.hh
index 9ebf61481..aa77645f3 100644
--- a/dev/tsunami_io.hh
+++ b/dev/tsunami_io.hh
@@ -56,19 +56,19 @@ class TsunamiIO : public MmapDevice
class ClockEvent : public Event
{
- protected:
- Tick interval;
- uint8_t mode;
- uint8_t status;
+ protected:
+ Tick interval;
+ uint8_t mode;
+ uint8_t status;
- public:
- ClockEvent();
+ public:
+ ClockEvent();
- virtual void process();
- virtual const char *description();
- void Program(int count);
- void ChangeMode(uint8_t mode);
- uint8_t Status();
+ virtual void process();
+ virtual const char *description();
+ void Program(int count);
+ void ChangeMode(uint8_t mode);
+ uint8_t Status();
};
@@ -83,41 +83,45 @@ class TsunamiIO : public MmapDevice
virtual const char *description();
};
- uint8_t uip;
+ uint8_t uip;
- uint8_t mask1;
- uint8_t mask2;
- uint8_t mode1;
- uint8_t mode2;
+ uint8_t mask1;
+ uint8_t mask2;
+ uint8_t mode1;
+ uint8_t mode2;
uint8_t picr; //Raw PIC interrput register, before masking
bool picInterrupting;
Tsunami *tsunami;
- /* 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;
+ /*
+ * 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;
- /* 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;
+ /*
+ * 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;
+ RTCEvent rtc;
- uint32_t timerData;
+ uint32_t timerData;
public:
uint32_t frequency() const { return RTC_RATE; }
TsunamiIO(const std::string &name, Tsunami *t, time_t init_time,
- Addr addr, Addr mask, MemoryController *mmu);
+ Addr addr, Addr mask, MemoryController *mmu);
void set_time(time_t t);