summaryrefslogtreecommitdiff
path: root/src/dev/isa_fake.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-11-06 16:24:25 -0500
committerAli Saidi <saidi@eecs.umich.edu>2006-11-06 16:24:25 -0500
commitbf3223d7ce681db8ca59dac49c6b44b672012e5d (patch)
treea1c5f041ecac086e722121e866baf162cdae5c0e /src/dev/isa_fake.hh
parent84e07f3a51ec0202f819254efd7b8442f114ae8a (diff)
downloadgem5-bf3223d7ce681db8ca59dac49c6b44b672012e5d.tar.xz
delete pcifake, tsunamifake. Combine BadAddr/IsaFake into one
src/SConscript: remove pcifake and tsunami fake from sconscript src/dev/isa_fake.cc: src/dev/isa_fake.hh: combine badaddr and isa fake into one src/python/m5/objects/Pci.py: remove pcifake src/python/m5/objects/Tsunami.py: make badaddr derive from isafake --HG-- extra : convert_revision : 91470db60aa1de6b85827304e27bd3414cc9d8d1
Diffstat (limited to 'src/dev/isa_fake.hh')
-rw-r--r--src/dev/isa_fake.hh32
1 files changed, 10 insertions, 22 deletions
diff --git a/src/dev/isa_fake.hh b/src/dev/isa_fake.hh
index 6665f1a78..c4072e42c 100644
--- a/src/dev/isa_fake.hh
+++ b/src/dev/isa_fake.hh
@@ -25,8 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * Authors: Miguel Serrano
- * Ali Saidi
+ * Authors: Ali Saidi
*/
/** @file
@@ -42,10 +41,11 @@
#include "mem/packet.hh"
/**
- * IsaFake is a device that returns -1 on all reads and
- * accepts all writes. It is meant to be placed at an address range
+ * IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and
+ * rites. It is meant to be placed at an address range
* so that an mcheck doesn't occur when an os probes a piece of hw
- * that doesn't exist (e.g. UARTs1-3).
+ * that doesn't exist (e.g. UARTs1-3), or catch requests in the memory system
+ * that have no responders..
*/
class IsaFake : public BasicPioDevice
{
@@ -53,9 +53,12 @@ class IsaFake : public BasicPioDevice
struct Params : public BasicPioDevice::Params
{
Addr pio_size;
+ bool retBadAddr;
+ uint8_t retData;
};
protected:
const Params *params() const { return (const Params*)_params; }
+ uint64_t retData;
public:
/**
@@ -77,23 +80,8 @@ class IsaFake : public BasicPioDevice
* @param data the data to not write.
*/
virtual Tick write(PacketPtr pkt);
-};
-/**
- * BadAddr is a device that fills the packet's result field with "BadAddress".
- * @todo: Consider consolidating with IsaFake and similar classes.
- */
-class BadAddr : public BasicPioDevice
-{
- public:
- struct Params : public BasicPioDevice::Params
- {
- };
-
- BadAddr(Params *p);
- virtual void init();
- virtual Tick read(PacketPtr pkt);
- virtual Tick write(PacketPtr pkt);
+ void init();
};
-#endif // __TSUNAMI_FAKE_HH__
+#endif // __ISA_FAKE_HH__