PciDev::PciDev(const string &name, MemoryController *mmu, PciConfigAll *cf,
PciConfigData *cd, uint32_t bus, uint32_t dev, uint32_t func)
- : DmaDevice(name), MMU(mmu), ConfigSpace(cf), ConfigData(cd), BusNum(bus),
- DeviceNum(dev), FunctionNum(func)
+ : DmaDevice(name), mmu(mmu), configSpace(cf), configData(cd), busNum(bus),
+ deviceNum(dev), functionNum(func)
{
// copy the config data from the PciConfigData object
if (cd) {
memcpy((uint32_t*)data, config.data + offset, sizeof(uint32_t));
DPRINTF(PCIDEV,
"read device: %#x function: %#x register: %#x data: %#x\n",
- DeviceNum, FunctionNum, offset,
+ deviceNum, functionNum, offset,
*(uint32_t*)(config.data + offset));
break;
memcpy((uint16_t*)data, config.data + offset, sizeof(uint16_t));
DPRINTF(PCIDEV,
"read device: %#x function: %#x register: %#x data: %#x\n",
- DeviceNum, FunctionNum, offset,
+ deviceNum, functionNum, offset,
*(uint16_t*)(config.data + offset));
break;
memcpy((uint8_t*)data, config.data + offset, sizeof(uint8_t));
DPRINTF(PCIDEV,
"read device: %#x function: %#x register: %#x data: %#x\n",
- DeviceNum, FunctionNum, offset,
+ deviceNum, functionNum, offset,
(uint16_t)(*(uint8_t*)(config.data + offset)));
break;
DPRINTF(PCIDEV,
"write device: %#x function: %#x reg: %#x size: %#x data: %#x\n",
- DeviceNum, FunctionNum, offset, size, word_value);
+ deviceNum, functionNum, offset, size, word_value);
barnum = (offset - PCI0_BASE_ADDR0) >> 2;
// It's never been set
if (BARAddrs[barnum] == 0)
- MMU->add_child((FunctionalMemory *)this,
+ mmu->add_child((FunctionalMemory *)this,
Range<Addr>(base_addr,
base_addr + base_size));
else
- MMU->update_child((FunctionalMemory *)this,
+ mmu->update_child((FunctionalMemory *)this,
Range<Addr>(BARAddrs[barnum],
BARAddrs[barnum] +
base_size),
// It's never been set
if (BARAddrs[barnum] == 0)
- MMU->add_child((FunctionalMemory *)this,
+ mmu->add_child((FunctionalMemory *)this,
Range<Addr>(base_addr,
base_addr + base_size));
else
- MMU->update_child((FunctionalMemory *)this,
+ mmu->update_child((FunctionalMemory *)this,
Range<Addr>(BARAddrs[barnum],
BARAddrs[barnum] +
base_size),