summaryrefslogtreecommitdiff
path: root/src/dev/isa_fake.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/dev/isa_fake.hh')
-rw-r--r--src/dev/isa_fake.hh25
1 files changed, 9 insertions, 16 deletions
diff --git a/src/dev/isa_fake.hh b/src/dev/isa_fake.hh
index dc2ad48e8..5f54b1af3 100644
--- a/src/dev/isa_fake.hh
+++ b/src/dev/isa_fake.hh
@@ -35,13 +35,14 @@
#ifndef __ISA_FAKE_HH__
#define __ISA_FAKE_HH__
+#include <string>
+
#include "base/range.hh"
#include "dev/io_device.hh"
#include "dev/alpha/tsunami.hh"
+#include "params/IsaFake.hh"
#include "mem/packet.hh"
-#include <string>
-
/**
* 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
@@ -51,27 +52,19 @@
*/
class IsaFake : public BasicPioDevice
{
- public:
- struct Params : public BasicPioDevice::Params
- {
- Addr pio_size;
- bool retBadAddr;
- bool updateData;
- uint8_t retData8;
- uint16_t retData16;
- uint32_t retData32;
- uint64_t retData64;
- std::string warnAccess;
- };
protected:
- const Params *params() const { return (const Params*)_params; }
uint8_t retData8;
uint16_t retData16;
uint32_t retData32;
uint64_t retData64;
-
public:
+ typedef IsaFakeParams Params;
+ const Params *
+ params() const
+ {
+ return dynamic_cast<const Params *>(_params);
+ }
/**
* The constructor for Tsunmami Fake just registers itself with the MMU.
* @param p params structure