summaryrefslogtreecommitdiff
path: root/dev/tsunami_io.cc
diff options
context:
space:
mode:
authorBenjamin Nash <benash@umich.edu>2005-07-13 12:30:13 -0400
committerBenjamin Nash <benash@umich.edu>2005-07-13 12:30:13 -0400
commit32b52fe7126091692c0a76314bb3692fa3f70d27 (patch)
tree70a8172ea171a31ffc88c683eadeb1a9f1175c9a /dev/tsunami_io.cc
parent6d7911dea0a4f60cbe6726416a9e3248843cc03b (diff)
downloadgem5-32b52fe7126091692c0a76314bb3692fa3f70d27.tar.xz
Various changes to m5/dev files to work with FreeBSD.
dev/ide_ctrl.cc: dev/ide_disk.cc: dev/pcidev.cc: Made endian-independent. dev/ide_disk.hh: fixed. dev/pciconfigall.cc: The data to write is contained in a 32-bit unsigned int now. The union method would not have worked on big-endian machines. dev/pcidev.hh: Fixed typo. dev/tsunami_io.cc: Return zero on RTC alarm reads. dev/uart8250.cc: Fix uart interrupt handling. --HG-- extra : convert_revision : b5c08e8e77644c399c20888666406805ff1b6649
Diffstat (limited to 'dev/tsunami_io.cc')
-rw-r--r--dev/tsunami_io.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/dev/tsunami_io.cc b/dev/tsunami_io.cc
index 6e517d431..6a704f7ac 100644
--- a/dev/tsunami_io.cc
+++ b/dev/tsunami_io.cc
@@ -270,7 +270,7 @@ TsunamiIO::read(MemReqPtr &req, uint8_t *data)
DPRINTF(Tsunami, "io read va=%#x size=%d IOPorrt=%#x\n",
req->vaddr, req->size, req->vaddr & 0xfff);
- Addr daddr = (req->paddr - (addr & EV5::PAddrImplMask)) + 0x20;
+ Addr daddr = (req->paddr - (addr & EV5::PAddrImplMask));
switch(req->size) {
@@ -319,6 +319,12 @@ TsunamiIO::read(MemReqPtr &req, uint8_t *data)
case RTC_SEC:
*(uint8_t *)data = tm.tm_sec;
return No_Fault;
+ case RTC_SEC_ALRM:
+ case RTC_MIN_ALRM:
+ case RTC_HR_ALRM:
+ // RTC alarm functionality is not currently implemented
+ *(uint8_t *)data = 0x00;
+ return No_Fault;
case RTC_MIN:
*(uint8_t *)data = tm.tm_min;
return No_Fault;
@@ -391,7 +397,7 @@ TsunamiIO::write(MemReqPtr &req, const uint8_t *data)
DPRINTF(Tsunami, "io write - va=%#x size=%d IOPort=%#x Data=%#x\n",
req->vaddr, req->size, req->vaddr & 0xfff, dt64);
- Addr daddr = (req->paddr - (addr & EV5::PAddrImplMask)) + 0x20;
+ Addr daddr = (req->paddr - (addr & EV5::PAddrImplMask));
switch(req->size) {
case sizeof(uint8_t):