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->
getLE<uint64_t>();
103 case sizeof(uint32_t):
104 data = pkt->
getLE<uint32_t>();
106 case sizeof(uint16_t):
107 data = pkt->
getLE<uint16_t>();
109 case sizeof(uint8_t):
110 data = pkt->
getLE<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()
#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 const std::string name() const
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...
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.