36 #include "debug/IsaFake.hh" 57 if (
params()->warn_access !=
"")
58 warn(
"Device %s accessed by read to address %#x size=%d\n",
60 if (
params()->ret_bad_addr) {
69 case sizeof(uint64_t):
72 case sizeof(uint32_t):
75 case sizeof(uint16_t):
85 panic(
"invalid access size! Device being accessed by cache?\n");
95 if (
params()->warn_access !=
"") {
98 case sizeof(uint64_t):
99 data = pkt->
getLE<uint64_t>();
101 case sizeof(uint32_t):
102 data = pkt->
getLE<uint32_t>();
104 case sizeof(uint16_t):
105 data = pkt->
getLE<uint16_t>();
107 case sizeof(uint8_t):
108 data = pkt->
getLE<uint8_t>();
113 warn(
"Device %s accessed by write to address %#x size=%d data=%#x\n",
116 if (
params()->ret_bad_addr) {
124 if (
params()->update_data) {
126 case sizeof(uint64_t):
129 case sizeof(uint32_t):
132 case sizeof(uint16_t):
135 case sizeof(uint8_t):
139 panic(
"invalid access size!\n");
147 IsaFakeParams::create()
#define panic(...)
This implements a cprintf based panic() function.
IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and rites.
Overload hash function for BasicBlockRange type.
T * getPtr()
get a pointer to the data ptr.
void setLE(T v)
Set the value in the data pointer to v as little endian.
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.
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
const Params * params() const
Addr pioAddr
Address that the device listens to.