summaryrefslogtreecommitdiff
path: root/dev/baddev.hh
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-04-10 14:14:06 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-04-10 14:14:06 -0400
commite8b6eb49bcaa768c40c10e354bb66cae0a65a2a1 (patch)
treebaca46eb4f45784aa40cf0e9aa722dfa7e474308 /dev/baddev.hh
parent2609ed2a7cf736834cafcf0b07465c45dfb567e3 (diff)
downloadgem5-e8b6eb49bcaa768c40c10e354bb66cae0a65a2a1.tar.xz
updates for newmem
SConscript: compile some more devices --HG-- extra : convert_revision : 82a8164ab38814a56a0c143658bc06338cf6b8f5
Diffstat (limited to 'dev/baddev.hh')
-rw-r--r--dev/baddev.hh49
1 files changed, 13 insertions, 36 deletions
diff --git a/dev/baddev.hh b/dev/baddev.hh
index 189f28331..4cf0d6ba4 100644
--- a/dev/baddev.hh
+++ b/dev/baddev.hh
@@ -37,7 +37,6 @@
#include "base/range.hh"
#include "dev/io_device.hh"
-class MemoryController;
/**
* BadDevice
@@ -45,51 +44,29 @@ class MemoryController;
* the user that the kernel they are running has unsupported
* options (i.e. frame buffer)
*/
-class BadDevice : public PioDevice
+class BadDevice : public BasicPioDevice
{
private:
- Addr addr;
- static const Addr size = 0xf;
-
std::string devname;
public:
+ struct Params : public BasicPioDevice::Params
+ {
+ std::string device_name;
+ };
+ protected:
+ const Params *params() const { return (const Params *)_params; }
+
+ public:
/**
* Constructor for the Baddev Class.
- * @param name name of the object
+ * @param p object parameters
* @param a base address of the write
- * @param mmu the memory controller
- * @param hier object to store parameters universal the device hierarchy
- * @param bus The bus that this device is attached to
- * @param devicename device that is not implemented
- */
- BadDevice(const std::string &name, Addr a, MemoryController *mmu,
- HierParams *hier, Bus *bus, const std::string &devicename);
-
- /**
- * On a read event we just panic aand hopefully print a
- * meaningful error message.
- * @param req Contains the address to read from.
- * @param data A pointer to write the read data to.
- * @return The fault condition of the access.
- */
- virtual Fault read(MemReqPtr &req, uint8_t *data);
-
- /**
- * On a write event we just panic aand hopefully print a
- * meaningful error message.
- * @param req Contains the address to write to.
- * @param data The data to write.
- * @return The fault condition of the access.
*/
- virtual Fault write(MemReqPtr &req, const uint8_t *data);
+ BadDevice(Params *p);
- /**
- * Return how long this access will take.
- * @param req the memory request to calcuate
- * @return Tick when the request is done
- */
- Tick cacheAccess(MemReqPtr &req);
+ virtual Tick read(Packet &pkt);
+ virtual Tick write(Packet &pkt);
};
#endif // __DEV_BADDEV_HH__