|
gem5 v23.0.0.1
|
IDE Disk device model. More...
#include <ide_disk.hh>
Classes | |
| struct | IdeDiskStats |
Public Types | |
| typedef IdeDiskParams | Params |
Public Types inherited from gem5::SimObject | |
| typedef SimObjectParams | Params |
Public Member Functions | |
| IdeDisk (const Params &p) | |
| ~IdeDisk () | |
| Delete the data buffer. | |
| void | reset (int id) |
| Reset the device state. | |
| void | setChannel (IdeController::Channel *_channel, Addr chunk_bytes) |
| Set the controller for this device. | |
| void | readCommand (const Addr offset, int size, uint8_t *data) |
| void | readControl (const Addr offset, int size, uint8_t *data) |
| void | writeCommand (const Addr offset, int size, const uint8_t *data) |
| void | writeControl (const Addr offset, int size, const uint8_t *data) |
| void | startDma (const uint32_t &prdTableBase) |
| void | abortDma () |
Public Member Functions inherited from gem5::SimObject | |
| const Params & | params () const |
| SimObject (const Params &p) | |
| virtual | ~SimObject () |
| virtual void | init () |
| init() is called after all C++ SimObjects have been created and all ports are connected. | |
| virtual void | loadState (CheckpointIn &cp) |
| loadState() is called on each SimObject when restoring from a checkpoint. | |
| virtual void | initState () |
| initState() is called on each SimObject when not restoring from a checkpoint. | |
| virtual void | regProbePoints () |
| Register probe points for this object. | |
| virtual void | regProbeListeners () |
| Register probe listeners for this object. | |
| ProbeManager * | getProbeManager () |
| Get the probe manager for this object. | |
| virtual Port & | getPort (const std::string &if_name, PortID idx=InvalidPortID) |
| Get a port with a given name and index. | |
| virtual void | startup () |
| startup() is the final initialization call before simulation. | |
| DrainState | drain () override |
| Provide a default implementation of the drain interface for objects that don't need draining. | |
| virtual void | memWriteback () |
| Write back dirty buffers to memory using functional writes. | |
| virtual void | memInvalidate () |
| Invalidate the contents of memory buffers. | |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. | |
Public Member Functions inherited from gem5::EventManager | |
| EventQueue * | eventQueue () const |
| void | schedule (Event &event, Tick when) |
| void | deschedule (Event &event) |
| void | reschedule (Event &event, Tick when, bool always=false) |
| void | schedule (Event *event, Tick when) |
| void | deschedule (Event *event) |
| void | reschedule (Event *event, Tick when, bool always=false) |
| void | wakeupEventQueue (Tick when=(Tick) -1) |
| This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. | |
| void | setCurTick (Tick newVal) |
| EventManager (EventManager &em) | |
| Event manger manages events in the event queue. | |
| EventManager (EventManager *em) | |
| EventManager (EventQueue *eq) | |
Public Member Functions inherited from gem5::Serializable | |
| Serializable () | |
| virtual | ~Serializable () |
| virtual void | serialize (CheckpointOut &cp) const =0 |
| Serialize an object. | |
| virtual void | unserialize (CheckpointIn &cp)=0 |
| Unserialize an object. | |
| void | serializeSection (CheckpointOut &cp, const char *name) const |
| Serialize an object into a new section. | |
| void | serializeSection (CheckpointOut &cp, const std::string &name) const |
| void | unserializeSection (CheckpointIn &cp, const char *name) |
| Unserialize an a child object. | |
| void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Member Functions inherited from gem5::Drainable | |
| DrainState | drainState () const |
| Return the current drain state of an object. | |
| virtual void | notifyFork () |
| Notify a child process of a fork. | |
Public Member Functions inherited from gem5::statistics::Group | |
| Group (Group *parent, const char *name=nullptr) | |
| Construct a new statistics group. | |
| virtual | ~Group () |
| virtual void | regStats () |
| Callback to set stat parameters. | |
| virtual void | resetStats () |
| Callback to reset stats. | |
| virtual void | preDumpStats () |
| Callback before stats are dumped. | |
| void | addStat (statistics::Info *info) |
| Register a stat with this group. | |
| const std::map< std::string, Group * > & | getStatGroups () const |
| Get all child groups associated with this object. | |
| const std::vector< Info * > & | getStats () const |
| Get all stats associated with this object. | |
| void | addStatGroup (const char *name, Group *block) |
| Add a stat block as a child of this block. | |
| const Info * | resolveStat (std::string name) const |
| Resolve a stat by its name within this group. | |
| void | mergeStatGroup (Group *block) |
| Merge the contents (stats & children) of a block to this block. | |
| Group (const Group &)=delete | |
| Group & | operator= (const Group &)=delete |
Public Member Functions inherited from gem5::Named | |
| Named (const std::string &name_) | |
| virtual | ~Named ()=default |
| virtual std::string | name () const |
Protected Attributes | |
| IdeController * | ctrl = nullptr |
| The IDE controller for this disk. | |
| IdeController::Channel * | channel = nullptr |
| The channel this disk is connected to. | |
| DiskImage * | image |
| The image that contains the data of this disk. | |
| int | diskDelay |
| The disk delay in microseconds. | |
Protected Attributes inherited from gem5::SimObject | |
| const SimObjectParams & | _params |
| Cached copy of the object parameters. | |
Protected Attributes inherited from gem5::EventManager | |
| EventQueue * | eventq |
| A pointer to this object's event queue. | |
Private Member Functions | |
| void | startCommand () |
| void | postInterrupt () |
| void | clearInterrupt () |
| void | doDmaTransfer () |
| void | doDmaDataRead () |
| void | doDmaRead () |
| void | doDmaDataWrite () |
| void | doDmaWrite () |
| void | dmaPrdReadDone () |
| void | dmaReadDone () |
| void | dmaWriteDone () |
| void | readDisk (uint32_t sector, uint8_t *data) |
| void | writeDisk (uint32_t sector, uint8_t *data) |
| void | updateState (DevAction_t action) |
| bool | isBSYSet () |
| bool | isIENSet () |
| bool | isDEVSelect () |
| void | setComplete () |
| uint32_t | getLBABase () |
| Addr | pciToDma (Addr pciAddr) |
| void | serialize (CheckpointOut &cp) const override |
| Serialize an object. | |
| void | unserialize (CheckpointIn &cp) override |
| Unserialize an object. | |
Private Attributes | |
| struct ataparams | driveID |
| Drive identification structure for this disk. | |
| uint8_t * | dataBuffer |
| Data buffer for transfers. | |
| uint32_t | cmdBytes |
| Number of bytes in command data transfer. | |
| uint32_t | cmdBytesLeft |
| Number of bytes left in command data transfer. | |
| uint32_t | drqBytesLeft |
| Number of bytes left in DRQ block. | |
| uint32_t | curSector |
| Current sector in access. | |
| CommandReg_t | cmdReg |
| Command block registers. | |
| uint8_t | status |
| Status register. | |
| bool | nIENBit |
| Interrupt enable bit. | |
| DevState_t | devState |
| Device state. | |
| DmaState_t | dmaState |
| Dma state. | |
| bool | dmaRead |
| Dma transaction is a read. | |
| Addr | chunkBytes |
| Size of chunks to DMA. | |
| uint32_t | curPrdAddr |
| PRD table base address. | |
| PrdTableEntry | curPrd |
| PRD entry. | |
| int | devID |
| Device ID (device0=0/device1=1) | |
| bool | pendingInterrupt |
| Interrupt pending. | |
| bool | dmaAborted |
| DMA Aborted. | |
| gem5::IdeDisk::IdeDiskStats | ideDiskStats |
| EventFunctionWrapper | dmaTransferEvent |
| ChunkGenerator * | dmaReadCG = nullptr |
| EventFunctionWrapper | dmaReadWaitEvent |
| ChunkGenerator * | dmaWriteCG = nullptr |
| EventFunctionWrapper | dmaWriteWaitEvent |
| EventFunctionWrapper | dmaPrdReadEvent |
| EventFunctionWrapper | dmaReadEvent |
| EventFunctionWrapper | dmaWriteEvent |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::SimObject | |
| static void | serializeAll (const std::string &cpt_dir) |
| Create a checkpoint by serializing all SimObjects in the system. | |
| static SimObject * | find (const char *name) |
| Find the SimObject with the given name and return a pointer to it. | |
| static void | setSimObjectResolver (SimObjectResolver *resolver) |
| There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
| static SimObjectResolver * | getSimObjectResolver () |
| There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. | |
Static Public Member Functions inherited from gem5::Serializable | |
| static const std::string & | currentSection () |
| Gets the fully-qualified name of the active section. | |
| static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
| Generate a checkpoint file so that the serialization can be routed to it. | |
Protected Member Functions inherited from gem5::Drainable | |
| Drainable () | |
| virtual | ~Drainable () |
| virtual DrainState | drain ()=0 |
| Draining is the process of clearing out the states of SimObjects.These are the SimObjects that are partially executed or are partially in flight. | |
| virtual void | drainResume () |
| Resume execution after a successful drain. | |
| void | signalDrainDone () const |
| Signal that an object is drained. | |
IDE Disk device model.
Definition at line 216 of file ide_disk.hh.
| typedef IdeDiskParams gem5::IdeDisk::Params |
Definition at line 281 of file ide_disk.hh.
| gem5::IdeDisk::IdeDisk | ( | const Params & | p | ) |
Definition at line 66 of file ide_disk.cc.
References doDmaTransfer().
| gem5::IdeDisk::~IdeDisk | ( | ) |
| void gem5::IdeDisk::abortDma | ( | ) |
Definition at line 599 of file ide_disk.cc.
References gem5::ACT_CMD_ERROR, devState, gem5::Dma_Idle, dmaState, panic_if, gem5::Prepare_Data_Dma, gem5::Transfer_Data_Dma, and updateState().
|
private |
Definition at line 752 of file ide_disk.cc.
References channel, gem5::IdeController::Channel::clearInterrupt(), DPRINTF, panic_if, and pendingInterrupt.
Referenced by updateState().
|
private |
Definition at line 357 of file ide_disk.cc.
References gem5::ACT_CMD_ERROR, cmdBytesLeft, curPrd, curPrdAddr, curSector, dmaAborted, dmaRead, doDmaDataRead(), doDmaDataWrite(), DPRINTF, gem5::PrdTableEntry::getBaseAddr(), gem5::PrdTableEntry::getByteCount(), gem5::PrdTableEntry::getEOT(), pciToDma(), SectorSize, and updateState().
|
private |
Definition at line 450 of file ide_disk.cc.
References gem5::ACT_DMA_DONE, cmdBytesLeft, curPrd, curSector, dataBuffer, gem5::Dma_Idle, dmaState, doDmaTransfer(), gem5::PrdTableEntry::getByteCount(), gem5::PrdTableEntry::getEOT(), SectorSize, updateState(), and writeDisk().
Referenced by doDmaRead().
|
private |
Definition at line 537 of file ide_disk.cc.
References gem5::ACT_DMA_DONE, cmdBytesLeft, curPrd, gem5::Dma_Idle, dmaState, doDmaTransfer(), DPRINTF, gem5::PrdTableEntry::getByteCount(), gem5::PrdTableEntry::getEOT(), and updateState().
Referenced by doDmaWrite().
|
private |
Definition at line 381 of file ide_disk.cc.
References curPrd, gem5::curTick(), diskDelay, dmaReadWaitEvent, DPRINTF, gem5::PrdTableEntry::getByteCount(), gem5::EventManager::schedule(), and SectorSize.
Referenced by dmaPrdReadDone().
|
private |
Definition at line 473 of file ide_disk.cc.
References cmdBytesLeft, curPrd, curSector, gem5::curTick(), dataBuffer, diskDelay, dmaWriteWaitEvent, DPRINTF, gem5::PrdTableEntry::getByteCount(), MAX_DMA_SIZE, readDisk(), gem5::EventManager::schedule(), and SectorSize.
Referenced by dmaPrdReadDone().
|
private |
Definition at line 411 of file ide_disk.cc.
References gem5::ACT_CMD_ERROR, gem5::ChunkGenerator::addr(), chunkBytes, gem5::ChunkGenerator::complete(), ctrl, curPrd, gem5::curTick(), dataBuffer, DMA_BACKOFF_PERIOD, dmaAborted, gem5::DmaDevice::dmaPending(), gem5::DmaDevice::dmaRead(), gem5::IdeDisk::IdeDiskStats::dmaReadBytes, dmaReadCG, dmaReadDone(), gem5::IdeDisk::IdeDiskStats::dmaReadFullPages, gem5::IdeDisk::IdeDiskStats::dmaReadTxs, dmaReadWaitEvent, gem5::ChunkGenerator::done(), DPRINTF, gem5::Drainable::drainState(), gem5::PrdTableEntry::getBaseAddr(), gem5::PrdTableEntry::getByteCount(), ideDiskStats, MAX_DMA_SIZE, gem5::ChunkGenerator::next(), pciToDma(), gem5::Running, gem5::EventManager::schedule(), gem5::ChunkGenerator::size(), and updateState().
|
private |
Definition at line 334 of file ide_disk.cc.
References gem5::ACT_CMD_ERROR, ctrl, curPrd, curPrdAddr, gem5::curTick(), devState, DMA_BACKOFF_PERIOD, gem5::Dma_Transfer, dmaAborted, gem5::DmaDevice::dmaPending(), dmaPrdReadEvent, gem5::DmaDevice::dmaRead(), dmaState, dmaTransferEvent, DPRINTF, gem5::Drainable::drainState(), gem5::PrdTableEntry::entry, panic, gem5::Running, gem5::EventManager::schedule(), gem5::Transfer_Data_Dma, and updateState().
Referenced by dmaReadDone(), dmaWriteDone(), and IdeDisk().
|
private |
Definition at line 496 of file ide_disk.cc.
References gem5::ACT_CMD_ERROR, gem5::ChunkGenerator::addr(), chunkBytes, gem5::ChunkGenerator::complete(), ctrl, curPrd, gem5::curTick(), dataBuffer, DMA_BACKOFF_PERIOD, dmaAborted, gem5::DmaDevice::dmaPending(), gem5::DmaDevice::dmaWrite(), gem5::IdeDisk::IdeDiskStats::dmaWriteBytes, dmaWriteCG, dmaWriteDone(), gem5::IdeDisk::IdeDiskStats::dmaWriteFullPages, gem5::IdeDisk::IdeDiskStats::dmaWriteTxs, dmaWriteWaitEvent, gem5::ChunkGenerator::done(), DPRINTF, gem5::Drainable::drainState(), gem5::PrdTableEntry::getBaseAddr(), gem5::PrdTableEntry::getByteCount(), gem5::PrdTableEntry::getEOT(), ideDiskStats, MAX_DMA_SIZE, gem5::ChunkGenerator::next(), pciToDma(), gem5::Running, gem5::EventManager::schedule(), gem5::ChunkGenerator::size(), and updateState().
|
inlineprivate |
Definition at line 373 of file ide_disk.hh.
References cmdReg, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, gem5::CommandReg_t::head, and gem5::CommandReg_t::sec_num.
Referenced by startCommand().
|
inlineprivate |
Definition at line 357 of file ide_disk.hh.
References status, and STATUS_BSY_BIT.
|
private |
Definition at line 189 of file ide_disk.cc.
References channel, and gem5::IdeController::Channel::selected().
Referenced by updateState().
|
inlineprivate |
Definition at line 195 of file ide_disk.cc.
References ctrl, panic_if, and gem5::PciDevice::pciToDma().
Referenced by dmaPrdReadDone(), doDmaRead(), doDmaWrite(), and startDma().
|
private |
Definition at line 739 of file ide_disk.cc.
References channel, DPRINTF, panic_if, pendingInterrupt, and gem5::IdeController::Channel::postInterrupt().
Referenced by updateState().
| void gem5::IdeDisk::readCommand | ( | const Addr | offset, |
| int | size, | ||
| uint8_t * | data | ||
| ) |
Definition at line 206 of file ide_disk.cc.
References gem5::ACT_DATA_READ_SHORT, gem5::ACT_STAT_READ, cmdReg, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, data, gem5::CommandReg_t::data, DATA_OFFSET, DPRINTF, gem5::CommandReg_t::drive, DRIVE_OFFSET, gem5::CommandReg_t::error, ERROR_OFFSET, HCYL_OFFSET, LCYL_OFFSET, NSECTOR_OFFSET, gem5::ArmISA::offset, panic, gem5::CommandReg_t::sec_count, gem5::CommandReg_t::sec_num, SECTOR_OFFSET, status, STATUS_OFFSET, and updateState().
| void gem5::IdeDisk::readControl | ( | const Addr | offset, |
| int | size, | ||
| uint8_t * | data | ||
| ) |
Definition at line 252 of file ide_disk.cc.
References ALTSTAT_OFFSET, data, DPRINTF, gem5::ArmISA::offset, panic, and status.
|
private |
Definition at line 557 of file ide_disk.cc.
References data, image, gem5::Named::name(), panic_if, gem5::DiskImage::read(), and SectorSize.
Referenced by doDmaDataWrite(), and updateState().
| void gem5::IdeDisk::reset | ( | int | id | ) |
Reset the device state.
Definition at line 145 of file ide_disk.cc.
References cmdBytes, cmdBytesLeft, cmdReg, curPrd, curPrdAddr, curSector, dataBuffer, DEV0, DEV1, gem5::Device_Idle_NS, gem5::Device_Idle_S, devID, devState, gem5::Dma_Idle, dmaAborted, dmaRead, dmaState, drqBytesLeft, gem5::PrdTableEntry::entry, gem5::CommandReg_t::error, MAX_DMA_SIZE, panic, pendingInterrupt, status, and STATUS_DRDY_BIT.
|
overrideprivatevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 1068 of file ide_disk.cc.
References gem5::PrdEntry_t::baseAddr, gem5::PrdEntry_t::byteCount, cmdBytes, cmdBytesLeft, cmdReg, gem5::CommandReg_t::command, curPrd, curPrdAddr, curSector, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, gem5::CommandReg_t::data, dataBuffer, devID, devState, dmaAborted, dmaPrdReadEvent, gem5::DmaRead, dmaRead, dmaReadEvent, dmaReadWaitEvent, dmaState, dmaTransferEvent, gem5::DmaWrite, dmaWriteEvent, dmaWriteWaitEvent, gem5::CommandReg_t::drive, drqBytesLeft, gem5::PrdEntry_t::endOfTable, gem5::PrdTableEntry::entry, gem5::MipsISA::event, MAX_DMA_SIZE, nIENBit, gem5::None, gem5::paramOut(), pendingInterrupt, gem5::PrdRead, gem5::ReadWait, gem5::EventManager::reschedule(), gem5::Event::scheduled(), gem5::CommandReg_t::sec_count, gem5::CommandReg_t::sec_num, SERIALIZE_ARRAY, SERIALIZE_ENUM, SERIALIZE_SCALAR, status, gem5::Transfer, gem5::Event::when(), and gem5::WriteWait.
|
inline |
Set the controller for this device.
| c | The IDE controller |
Definition at line 299 of file ide_disk.hh.
References channel, chunkBytes, gem5::IdeController::Channel::controller(), ctrl, and panic_if.
|
inlineprivate |
Definition at line 362 of file ide_disk.hh.
References status, STATUS_DRDY_BIT, and STATUS_SEEK_BIT.
Referenced by updateState().
|
private |
Definition at line 611 of file ide_disk.cc.
References gem5::ACT_CMD_COMPLETE, gem5::ACT_CMD_ERROR, gem5::ACT_DATA_READY, gem5::ACT_DMA_READY, gem5::ACT_NONE, ATAPI_IDENTIFY_DEVICE, cmdBytes, cmdBytesLeft, cmdReg, gem5::CommandReg_t::command, gem5::Command_Execution, curSector, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, devState, dmaRead, DPRINTF, gem5::CommandReg_t::drive, DRIVE_LBA_BIT, gem5::CommandReg_t::error, getLBABase(), gem5::CommandReg_t::head, image, panic, panic_if, gem5::Prepare_Data_Dma, gem5::Prepare_Data_In, gem5::Prepare_Data_Out, gem5::replaceBits(), gem5::CommandReg_t::sec_count, gem5::CommandReg_t::sec_num, SectorSize, SET_FEATURES, gem5::DiskImage::size(), status, STATUS_BSY_BIT, updateState(), WDCC_FLUSHCACHE, WDCC_IDENTIFY, WDCC_IDLE, WDCC_IDP, WDCC_READ, WDCC_READDMA, WDCC_READMULTI, WDCC_RECAL, WDCC_SETMULTI, WDCC_STANDBY_IMMED, WDCC_WRITE, WDCC_WRITEDMA, WDCC_WRITEMULTI, WDSF_READ_NATIVE_MAX, WDSF_SEEK, and WDSF_VERIFY.
Referenced by updateState().
| void gem5::IdeDisk::startDma | ( | const uint32_t & | prdTableBase | ) |
Definition at line 581 of file ide_disk.cc.
References curPrdAddr, gem5::curTick(), devState, gem5::Dma_Start, gem5::Dma_Transfer, dmaState, dmaTransferEvent, panic_if, pciToDma(), gem5::EventManager::schedule(), and gem5::Transfer_Data_Dma.
|
overrideprivatevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 1146 of file ide_disk.cc.
References gem5::PrdEntry_t::baseAddr, gem5::PrdEntry_t::byteCount, cmdBytes, cmdBytesLeft, cmdReg, gem5::CommandReg_t::command, curPrd, curPrdAddr, curSector, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, gem5::CommandReg_t::data, dataBuffer, devID, devState, dmaAborted, dmaPrdReadEvent, gem5::DmaRead, dmaRead, dmaReadEvent, dmaReadWaitEvent, dmaState, dmaTransferEvent, gem5::DmaWrite, dmaWriteEvent, dmaWriteWaitEvent, gem5::CommandReg_t::drive, drqBytesLeft, gem5::PrdEntry_t::endOfTable, gem5::PrdTableEntry::entry, gem5::MipsISA::event, MAX_DMA_SIZE, nIENBit, gem5::None, gem5::paramIn(), pendingInterrupt, gem5::PrdRead, gem5::ReadWait, gem5::EventManager::reschedule(), gem5::EventManager::schedule(), gem5::CommandReg_t::sec_count, gem5::CommandReg_t::sec_num, status, gem5::Transfer, UNSERIALIZE_ARRAY, UNSERIALIZE_ENUM, UNSERIALIZE_SCALAR, and gem5::WriteWait.
|
private |
Definition at line 768 of file ide_disk.cc.
References gem5::ACT_CMD_COMPLETE, gem5::ACT_CMD_ERROR, gem5::ACT_CMD_WRITE, gem5::ACT_DATA_READ_BYTE, gem5::ACT_DATA_READ_SHORT, gem5::ACT_DATA_READY, gem5::ACT_DATA_WRITE_BYTE, gem5::ACT_DATA_WRITE_SHORT, gem5::ACT_DMA_DONE, gem5::ACT_DMA_READY, gem5::ACT_SELECT_WRITE, gem5::ACT_SRST_CLEAR, gem5::ACT_SRST_SET, gem5::ACT_STAT_READ, ATAPI_IDENTIFY_DEVICE, channel, clearInterrupt(), cmdBytes, cmdBytesLeft, cmdReg, gem5::CommandReg_t::command, gem5::Command_Execution, curSector, gem5::CommandReg_t::data, gem5::Data_Ready_INTRQ_In, gem5::Data_Ready_INTRQ_Out, dataBuffer, gem5::Device_Dma_Abort, gem5::Device_Idle_NS, gem5::Device_Idle_S, gem5::Device_Idle_SI, gem5::Device_Srst, devID, devState, gem5::Dma_Idle, gem5::Dma_Start, dmaAborted, dmaState, DPRINTF, driveID, drqBytesLeft, isDEVSelect(), isIENSet(), MAX_DMA_SIZE, panic, pendingInterrupt, postInterrupt(), gem5::Prepare_Data_Dma, gem5::Prepare_Data_In, gem5::Prepare_Data_Out, readDisk(), gem5::statistics::reset(), SectorSize, setComplete(), gem5::IdeController::Channel::setDmaComplete(), startCommand(), status, STATUS_BSY_BIT, STATUS_DRQ_BIT, STATUS_SEEK_BIT, gem5::Transfer_Data_Dma, gem5::Transfer_Data_In, gem5::Transfer_Data_Out, updateState(), WDCC_IDENTIFY, and writeDisk().
Referenced by abortDma(), dmaPrdReadDone(), dmaReadDone(), dmaWriteDone(), doDmaRead(), doDmaTransfer(), doDmaWrite(), readCommand(), startCommand(), updateState(), writeCommand(), and writeControl().
| void gem5::IdeDisk::writeCommand | ( | const Addr | offset, |
| int | size, | ||
| const uint8_t * | data | ||
| ) |
Definition at line 262 of file ide_disk.cc.
References gem5::ACT_CMD_WRITE, gem5::ACT_DATA_WRITE_SHORT, gem5::ACT_SELECT_WRITE, cmdReg, gem5::CommandReg_t::command, COMMAND_OFFSET, gem5::CommandReg_t::cyl_high, gem5::CommandReg_t::cyl_low, data, gem5::CommandReg_t::data, DATA_OFFSET, DPRINTF, gem5::CommandReg_t::drive, DRIVE_OFFSET, FEATURES_OFFSET, HCYL_OFFSET, LCYL_OFFSET, NSECTOR_OFFSET, gem5::ArmISA::offset, panic, gem5::CommandReg_t::sec_count, gem5::CommandReg_t::sec_num, SECTOR_OFFSET, and updateState().
| void gem5::IdeDisk::writeControl | ( | const Addr | offset, |
| int | size, | ||
| const uint8_t * | data | ||
| ) |
Definition at line 310 of file ide_disk.cc.
References gem5::ACT_SRST_CLEAR, gem5::ACT_SRST_SET, CONTROL_IEN_BIT, CONTROL_OFFSET, CONTROL_RST_BIT, data, gem5::Device_Srst, devState, DPRINTF, nIENBit, gem5::ArmISA::offset, panic, and updateState().
|
private |
Definition at line 567 of file ide_disk.cc.
References data, image, gem5::Named::name(), panic_if, SectorSize, and gem5::DiskImage::write().
Referenced by dmaReadDone(), and updateState().
|
protected |
The channel this disk is connected to.
Definition at line 222 of file ide_disk.hh.
Referenced by clearInterrupt(), isDEVSelect(), postInterrupt(), setChannel(), and updateState().
|
private |
Size of chunks to DMA.
Definition at line 256 of file ide_disk.hh.
Referenced by doDmaRead(), doDmaWrite(), and setChannel().
|
private |
Number of bytes in command data transfer.
Definition at line 236 of file ide_disk.hh.
Referenced by reset(), serialize(), startCommand(), unserialize(), and updateState().
|
private |
Number of bytes left in command data transfer.
Definition at line 238 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), dmaReadDone(), dmaWriteDone(), doDmaDataWrite(), reset(), serialize(), startCommand(), unserialize(), and updateState().
|
private |
Command block registers.
Definition at line 244 of file ide_disk.hh.
Referenced by getLBABase(), readCommand(), reset(), serialize(), startCommand(), unserialize(), updateState(), and writeCommand().
|
protected |
The IDE controller for this disk.
Definition at line 220 of file ide_disk.hh.
Referenced by doDmaRead(), doDmaTransfer(), doDmaWrite(), pciToDma(), and setChannel().
|
private |
PRD entry.
Definition at line 260 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), dmaReadDone(), dmaWriteDone(), doDmaDataRead(), doDmaDataWrite(), doDmaRead(), doDmaTransfer(), doDmaWrite(), reset(), serialize(), and unserialize().
|
private |
PRD table base address.
Definition at line 258 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), doDmaTransfer(), reset(), serialize(), startDma(), and unserialize().
|
private |
Current sector in access.
Definition at line 242 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), dmaReadDone(), doDmaDataWrite(), reset(), serialize(), startCommand(), unserialize(), and updateState().
|
private |
Data buffer for transfers.
Definition at line 234 of file ide_disk.hh.
Referenced by dmaReadDone(), doDmaDataWrite(), doDmaRead(), doDmaWrite(), reset(), serialize(), unserialize(), updateState(), and ~IdeDisk().
|
private |
Device ID (device0=0/device1=1)
Definition at line 262 of file ide_disk.hh.
Referenced by reset(), serialize(), unserialize(), and updateState().
|
private |
Device state.
Definition at line 250 of file ide_disk.hh.
Referenced by abortDma(), doDmaTransfer(), reset(), serialize(), startCommand(), startDma(), unserialize(), updateState(), and writeControl().
|
protected |
The disk delay in microseconds.
Definition at line 228 of file ide_disk.hh.
Referenced by doDmaDataRead(), and doDmaDataWrite().
|
private |
DMA Aborted.
Definition at line 266 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), doDmaRead(), doDmaTransfer(), doDmaWrite(), reset(), serialize(), unserialize(), and updateState().
|
private |
Definition at line 341 of file ide_disk.hh.
Referenced by doDmaTransfer(), serialize(), and unserialize().
|
private |
Dma transaction is a read.
Definition at line 254 of file ide_disk.hh.
Referenced by dmaPrdReadDone(), reset(), serialize(), startCommand(), and unserialize().
|
private |
Definition at line 331 of file ide_disk.hh.
Referenced by doDmaRead().
|
private |
Definition at line 344 of file ide_disk.hh.
Referenced by serialize(), and unserialize().
|
private |
Definition at line 332 of file ide_disk.hh.
Referenced by doDmaDataRead(), doDmaRead(), serialize(), and unserialize().
|
private |
Dma state.
Definition at line 252 of file ide_disk.hh.
Referenced by abortDma(), dmaReadDone(), dmaWriteDone(), doDmaTransfer(), reset(), serialize(), startDma(), unserialize(), and updateState().
|
private |
Definition at line 326 of file ide_disk.hh.
Referenced by doDmaTransfer(), serialize(), startDma(), and unserialize().
|
private |
Definition at line 337 of file ide_disk.hh.
Referenced by doDmaWrite().
|
private |
Definition at line 347 of file ide_disk.hh.
Referenced by serialize(), and unserialize().
|
private |
Definition at line 338 of file ide_disk.hh.
Referenced by doDmaDataWrite(), doDmaWrite(), serialize(), and unserialize().
|
private |
Drive identification structure for this disk.
Definition at line 232 of file ide_disk.hh.
Referenced by updateState().
|
private |
Number of bytes left in DRQ block.
Definition at line 240 of file ide_disk.hh.
Referenced by reset(), serialize(), unserialize(), and updateState().
|
private |
Referenced by doDmaRead(), and doDmaWrite().
|
protected |
The image that contains the data of this disk.
Definition at line 224 of file ide_disk.hh.
Referenced by readDisk(), startCommand(), and writeDisk().
|
private |
Interrupt enable bit.
Definition at line 248 of file ide_disk.hh.
Referenced by isIENSet(), serialize(), unserialize(), and writeControl().
|
private |
Interrupt pending.
Definition at line 264 of file ide_disk.hh.
Referenced by clearInterrupt(), postInterrupt(), reset(), serialize(), unserialize(), and updateState().
|
private |
Status register.
Definition at line 246 of file ide_disk.hh.
Referenced by isBSYSet(), readCommand(), readControl(), reset(), serialize(), setComplete(), startCommand(), unserialize(), and updateState().