diff --git a/dev/io_device.cc b/dev/io_device.cc index 15c835ded..478c9c66e 100644 --- a/dev/io_device.cc +++ b/dev/io_device.cc @@ -88,6 +88,13 @@ PioDevice::~PioDevice() delete pioPort; } +PioDevice::init() +{ + if (!pioPort) + panic("Pio port not connected to anything!"); + pioPort->sendStatusChange(Port::RangeChange); +} + void BasicPioDevice::addressRanges(AddrRangeList &range_list) { diff --git a/dev/io_device.hh b/dev/io_device.hh index b787fa4fd..1e9a49899 100644 --- a/dev/io_device.hh +++ b/dev/io_device.hh @@ -229,6 +229,8 @@ class PioDevice : public SimObject virtual ~PioDevice(); + virtual void init(); + virtual Port *getPort(const std::string &if_name) { if (if_name == "pio") { diff --git a/mem/physical.cc b/mem/physical.cc index 603f8f63e..b00935990 100644 --- a/mem/physical.cc +++ b/mem/physical.cc @@ -90,6 +90,14 @@ PhysicalMemory::PhysicalMemory(const string &n) page_ptr = 0; } +void +PhysicalMemory::init() +{ + if (!port) + panic("PhysicalMemory not connected to anything!"); + port->sendStatusChange(Port::RangeChange); +} + PhysicalMemory::~PhysicalMemory() { if (pmem_addr) diff --git a/mem/physical.hh b/mem/physical.hh index 53e86f85f..ce0a2099c 100644 --- a/mem/physical.hh +++ b/mem/physical.hh @@ -107,7 +107,7 @@ class PhysicalMemory : public MemObject int deviceBlockSize(); void getAddressRanges(AddrRangeList &resp, AddrRangeList &snoop); virtual Port *getPort(const std::string &if_name); - void virtual init() { port->sendStatusChange(Port::RangeChange); } + void virtual init(); // fast back-door memory access for vtophys(), remote gdb, etc. // uint64_t phys_read_qword(Addr addr) const;