summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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