From 93b271117f8fc93b844b08934ee8fcfa5224053d Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Mon, 10 Apr 2006 14:40:22 -0400 Subject: Panic if physical memory isn't connected to anything send range change at init for all devices dev/io_device.cc: dev/io_device.hh: add init function for pio devices to sent status changes around mem/physical.cc: mem/physical.hh: Panic if physical memory isn't connected to anything --HG-- extra : convert_revision : 4223d1c3c73522d1e196c218eb0084d238677ad9 --- mem/physical.cc | 8 ++++++++ mem/physical.hh | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'mem') 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; -- cgit v1.2.3