summaryrefslogtreecommitdiff
path: root/dev/sinic.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2006-02-28 06:17:57 -0500
committerGabe Black <gblack@eecs.umich.edu>2006-02-28 06:17:57 -0500
commit8e6b8cb212ba79978056b57dd60c60a39f6428e9 (patch)
treee0fbb23e2bac27d965fc55657d0a41f70a63305e /dev/sinic.cc
parentf7360d5bca61baf4539698faf08fc36113c4fb33 (diff)
downloadgem5-8e6b8cb212ba79978056b57dd60c60a39f6428e9.tar.xz
Hand merged
--HG-- extra : convert_revision : 0fd5ecbba5dc6299dd046926ec27595ca4d97ee7
Diffstat (limited to 'dev/sinic.cc')
-rw-r--r--dev/sinic.cc21
1 files changed, 5 insertions, 16 deletions
diff --git a/dev/sinic.cc b/dev/sinic.cc
index c28ab335b..1c0e59e0a 100644
--- a/dev/sinic.cc
+++ b/dev/sinic.cc
@@ -494,30 +494,17 @@ Device::writeBar0(MemReqPtr &req, Addr daddr, const uint8_t *data)
//this prevents compilation.
//uint32_t reg32 = *(uint32_t *)data;
//uint64_t reg64 = *(uint64_t *)data;
+ VirtualReg &vnic = virtualRegs[index];
+
DPRINTF(EthernetPIO,
"write %s: cpu=%d val=%#x da=%#x pa=%#x va=%#x size=%d\n",
info.name, cpu, info.size == 4 ?
(*(uint32_t *)data) :
- (*(uint32_t *)data),
+ (*(uint64_t *)data),
daddr, req->paddr, req->vaddr, req->size);
prepareWrite(cpu, index);
- regWrite(daddr, cpu, data);
-
- return NoFault;
-}
-
-void
-Device::regWrite(Addr daddr, int cpu, const uint8_t *data)
-{
- Addr index = daddr >> Regs::VirtualShift;
- Addr raddr = daddr & Regs::VirtualMask;
-
- uint32_t reg32 = *(uint32_t *)data;
- uint64_t reg64 = *(uint64_t *)data;
- VirtualReg &vnic = virtualRegs[index];
-
switch (raddr) {
case Regs::Config:
changeConfig(reg32);
@@ -564,6 +551,8 @@ Device::regWrite(Addr daddr, int cpu, const uint8_t *data)
}
break;
}
+
+ return NoFault;
}
void