Hand merged

--HG--
extra : convert_revision : 0fd5ecbba5dc6299dd046926ec27595ca4d97ee7
This commit is contained in:
Gabe Black 2006-02-28 06:17:57 -05:00
parent f7360d5bca
commit 8e6b8cb212

View file

@ -494,30 +494,17 @@ Device::writeBar0(MemReqPtr &req, Addr daddr, const uint8_t *data)
//this prevents compilation. //this prevents compilation.
//uint32_t reg32 = *(uint32_t *)data; //uint32_t reg32 = *(uint32_t *)data;
//uint64_t reg64 = *(uint64_t *)data; //uint64_t reg64 = *(uint64_t *)data;
VirtualReg &vnic = virtualRegs[index];
DPRINTF(EthernetPIO, DPRINTF(EthernetPIO,
"write %s: cpu=%d val=%#x da=%#x pa=%#x va=%#x size=%d\n", "write %s: cpu=%d val=%#x da=%#x pa=%#x va=%#x size=%d\n",
info.name, cpu, info.size == 4 ? info.name, cpu, info.size == 4 ?
(*(uint32_t *)data) : (*(uint32_t *)data) :
(*(uint32_t *)data), (*(uint64_t *)data),
daddr, req->paddr, req->vaddr, req->size); daddr, req->paddr, req->vaddr, req->size);
prepareWrite(cpu, index); 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) { switch (raddr) {
case Regs::Config: case Regs::Config:
changeConfig(reg32); changeConfig(reg32);
@ -564,6 +551,8 @@ Device::regWrite(Addr daddr, int cpu, const uint8_t *data)
} }
break; break;
} }
return NoFault;
} }
void void