36#include "debug/IsaFake.hh"
58 if (
params().warn_access !=
"")
59 warn(
"Device %s accessed by read to address %#x size=%d\n",
61 if (
params().ret_bad_addr) {
70 case sizeof(uint64_t):
73 case sizeof(uint32_t):
76 case sizeof(uint16_t):
86 panic(
"invalid access size! Device being accessed by cache?\n");
96 if (
params().warn_access !=
"") {
99 case sizeof(uint64_t):
102 case sizeof(uint32_t):
105 case sizeof(uint16_t):
108 case sizeof(uint8_t):
114 warn(
"Device %s accessed by write to address %#x size=%d data=%#x\n",
117 if (
params().ret_bad_addr) {
125 if (
params().update_data) {
127 case sizeof(uint64_t):
130 case sizeof(uint32_t):
133 case sizeof(uint16_t):
136 case sizeof(uint8_t):
140 panic(
"invalid access size!\n");
Addr pioAddr
Address that the device listens to.
Tick pioDelay
Delay that the device experinces on an access.
Addr pioSize
Size that the device's address range.
IsaFake is a device that returns, BadAddr, 1 or 0 on all reads and rites.
virtual Tick write(PacketPtr pkt)
All writes are simply ignored.
virtual Tick read(PacketPtr pkt)
This read always returns -1.
IsaFake(const Params &p)
The constructor for Isa Fake just registers itself with the MMU.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
void setLE(T v)
Set the value in the data pointer to v as little endian.
T * getPtr()
get a pointer to the data ptr.
void makeAtomicResponse()
T getLE() const
Get the data in the packet byte swapped from little endian to host endian.
#define panic(...)
This implements a cprintf based panic() function.
const Params & params() const
Declaration of a fake device.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
uint64_t Tick
Tick count type.
Declaration of the Packet class.
const std::string & name()