From 8e6b8cb212ba79978056b57dd60c60a39f6428e9 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Tue, 28 Feb 2006 06:17:57 -0500 Subject: [PATCH] Hand merged --HG-- extra : convert_revision : 0fd5ecbba5dc6299dd046926ec27595ca4d97ee7 --- dev/sinic.cc | 21 +++++---------------- 1 file 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 -- 2.30.2