38 #include "debug/IsaFake.hh"
59 if (
params()->warn_access !=
"")
60 warn(
"Device %s accessed by read to address %#x size=%d\n",
62 if (
params()->ret_bad_addr) {
71 case sizeof(uint64_t):
74 case sizeof(uint32_t):
77 case sizeof(uint16_t):
87 panic(
"invalid access size! Device being accessed by cache?\n");
97 if (
params()->warn_access !=
"") {
100 case sizeof(uint64_t):
101 data = pkt->
get<uint64_t>();
103 case sizeof(uint32_t):
104 data = pkt->
get<uint32_t>();
106 case sizeof(uint16_t):
107 data = pkt->
get<uint16_t>();
109 case sizeof(uint8_t):
110 data = pkt->
get<uint8_t>();
115 warn(
"Device %s accessed by write to address %#x size=%d data=%#x\n",
118 if (
params()->ret_bad_addr) {
126 if (
params()->update_data) {
128 case sizeof(uint64_t):
131 case sizeof(uint32_t):
134 case sizeof(uint16_t):
137 case sizeof(uint8_t):
141 panic(
"invalid access size!\n");
149 IsaFakeParams::create()
void set(T v, ByteOrder endian)
Set the value in the data pointer to v using the specified endianness.
IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and rites.
T * getPtr()
get a pointer to the data ptr.
T get(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness.
Declaration of a fake device.
Addr pioSize
Size that the device's address range.
void makeAtomicResponse()
uint64_t Tick
Tick count type.
virtual Tick read(PacketPtr pkt)
This read always returns -1.
virtual Tick write(PacketPtr pkt)
All writes are simply ignored.
A Packet is used to encapsulate a transfer between two objects in the memory system (e...
virtual const std::string name() const
Declaration of the Packet class.
IsaFake(Params *p)
The constructor for Isa Fake just registers itself with the MMU.
Tick pioDelay
Delay that the device experinces on an access.
Addr pioAddr
Address that the device listens to.
const Params * params() const