Go to the documentation of this file.
39 #include "debug/IdeDisk.hh"
48 image(
p->image), curSector((off_t)-1), dirty(false)
88 case sizeof(uint16_t):
91 DPRINTF(
IdeDisk,
"reading word %#x value= %#x\n", accessAddr, d16);
93 case sizeof(uint32_t):
96 DPRINTF(
IdeDisk,
"reading dword %#x value= %#x\n", accessAddr, d32);
98 case sizeof(uint64_t):
101 DPRINTF(
IdeDisk,
"reading qword %#x value= %#x\n", accessAddr, d64);
104 panic(
"Invalid access size\n");
128 off_t bytes_written =
143 case sizeof(uint8_t):
148 case sizeof(uint16_t):
149 d16 = pkt->
getRaw<uint16_t>();
151 DPRINTF(
IdeDisk,
"writing word %#x value= %#x\n", accessAddr, d16);
153 case sizeof(uint32_t):
154 d32 = pkt->
getRaw<uint32_t>();
156 DPRINTF(
IdeDisk,
"writing dword %#x value= %#x\n", accessAddr, d32);
158 case sizeof(uint64_t):
159 d64 = pkt->
getRaw<uint64_t>();
161 DPRINTF(
IdeDisk,
"writing qword %#x value= %#x\n", accessAddr, d64);
164 panic(
"Invalid access size\n");
187 MmDiskParams::create()
virtual std::streampos write(const uint8_t *data, std::streampos offset)=0
void makeAtomicResponse()
Addr pioAddr
Address that the device listens to.
Tick write(PacketPtr pkt) override
Pure virtual function that the device must implement.
void setRaw(T v)
Set the value in the data pointer to v without byte swapping.
void serialize(CheckpointOut &cp) const override
Serialize an object.
uint64_t Tick
Tick count type.
uint8_t diskData[SectorSize]
Tick read(PacketPtr pkt) override
Pure virtual function that the device must implement.
Addr pioSize
Size that the device's address range.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void serialize(CheckpointOut &cp) const override
Serialize an object.
T getRaw() const
Get the data in the packet without byte swapping.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Tick pioDelay
Delay that the device experinces on an access.
virtual std::streampos read(uint8_t *data, std::streampos offset) const =0
std::ostream CheckpointOut
#define panic(...)
This implements a cprintf based panic() function.
Generated on Wed Sep 30 2020 14:02:11 for gem5 by doxygen 1.8.17