gem5  v20.1.0.0
ufs_device.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2015 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
38 
142 #ifndef __DEV_ARM_UFS_DEVICE_HH__
143 #define __DEV_ARM_UFS_DEVICE_HH__
144 
145 #include <deque>
146 #include <functional>
147 
148 #include "base/addr_range.hh"
149 #include "base/bitfield.hh"
150 #include "base/statistics.hh"
151 #include "debug/UFSHostDevice.hh"
152 #include "dev/arm/abstract_nvm.hh"
153 #include "dev/arm/base_gic.hh"
154 #include "dev/storage/disk_image.hh"
155 #include "dev/dma_device.hh"
156 #include "dev/io_device.hh"
157 #include "mem/packet.hh"
158 #include "mem/packet_access.hh"
159 #include "params/UFSHostDevice.hh"
160 #include "sim/serialize.hh"
161 #include "sim/stats.hh"
162 
169 class UFSHostDevice : public DmaDevice
170 {
171  public:
172 
173  UFSHostDevice(const UFSHostDeviceParams* p);
174 
175  DrainState drain() override;
176  void checkDrain();
177  void serialize(CheckpointOut &cp) const override;
178  void unserialize(CheckpointIn &cp) override;
179 
180  private:
188  struct HCIMem {
192  uint32_t HCCAP;
193  uint32_t HCversion;
194  uint32_t HCHCDDID;
195  uint32_t HCHCPMID;
196 
204  uint32_t ORUECPA;
205  uint32_t ORUECDL;
206  uint32_t ORUECN;
207  uint32_t ORUECT;
208  uint32_t ORUECDME;
209  uint32_t ORUTRIACR;
210 
214  uint32_t vendorSpecific;
215 
219  uint32_t TRUTRLBA;
220  uint32_t TRUTRLBAU;
221  uint32_t TRUTRLDBR;
222  uint32_t TRUTRLCLR;
223  uint32_t TRUTRLRSR;
224 
228  uint32_t TMUTMRLBA;
229  uint32_t TMUTMRLBAU;
230  uint32_t TMUTMRLDBR;
231  uint32_t TMUTMRLCLR;
232  uint32_t TMUTMRLRSR;
233 
237  uint32_t CMDUICCMDR;
238  uint32_t CMDUCMDARG1;
239  uint32_t CMDUCMDARG2;
240  uint32_t CMDUCMDARG3;
241  };
242 
256  struct UTPUPIUHeader {
257  uint32_t dWord0;
258  uint32_t dWord1;
259  uint32_t dWord2;
260  };
261 
270  struct UTPUPIURSP {
273  uint32_t reserved[4];
274  uint16_t senseDataLen;
275  uint8_t senseData[18];
276  };
277 
286  struct UTPUPIUTaskReq {
288  uint32_t inputParam1;
289  uint32_t inputParam2;
290  uint32_t inputParam3;
291  uint32_t reserved[2];
292  };
293 
301  struct UFSHCDSGEntry {
302  uint32_t baseAddr;
303  uint32_t upperAddr;
304  uint32_t reserved;
305  uint32_t size;
306  };
307 
316  uint8_t commandUPIU[128];
317  uint8_t responseUPIU[128];
318  struct UFSHCDSGEntry PRDTable[128];
319  };
320 
324  struct UPIUMessage {
326  uint32_t dataOffset;
327  uint32_t dataCount;
329  };
330 
342 
351  uint32_t dWord0;
352  uint32_t dWord1;
353  uint32_t dWord2;
354  uint32_t dWord3;
355  } header;
356 
357  /* DW 4-5*/
360 
361  /* DW 6 */
364 
365  /* DW 7 */
366  uint16_t PRDTableLength;
367  uint16_t PRDTableOffset;
368  };
369 
374  struct SCSIReply {
375  void reset() {
376  memset(static_cast<void*>(this), 0, sizeof(*this));
377  }
378 
379  uint8_t status;
380  uint32_t msgSize;
381  uint8_t LUN;
383  uint8_t senseSize;
384  uint8_t expectMore;//0x01 is for writes, 0x02 is for reads
385  uint64_t offset;
386  uint8_t senseCode[19];
387  };
388 
394  struct LUNInfo {
395  uint32_t dWord0;
396  uint32_t dWord1;
397  uint32_t vendor0;
398  uint32_t vendor1;
399  uint32_t product0;
400  uint32_t product1;
401  uint32_t product2;
402  uint32_t product3;
403  uint32_t productRevision;
404  };
405 
425  struct transferInfo {
427  uint32_t size;
428  uint64_t offset;
429  uint32_t filePointer;
430  uint32_t lunID;
431  };
432 
439  uint32_t reqPos;
441  uint32_t size;
443  uint8_t *destination;
444  bool finished;
445  uint32_t lunID;
446  };
447 
451  struct transferStart {
453  uint32_t mask;
455  uint32_t size;
456  uint32_t done;
457  uint32_t lun_id;
458  };
459 
463  struct taskStart {
465  uint32_t mask;
467  uint32_t size;
468  bool done;
469  };
470 
475  struct SCSIResumeInfo {
477  int reqPos;
479  uint32_t finalSize;
481  uint32_t done;
482  };
483 
490  uint64_t SCSIDiskOffset;
491  uint32_t size;
492  uint32_t LUN;
493  };
494 
503 
511 
515 
520 
525 
529  };
530 
537  {
538  public:
539  using Callback = std::function<void()>;
540 
544  UFSSCSIDevice(const UFSHostDeviceParams* p, uint32_t lun_id,
545  const Callback &transfer_cb, const Callback &read_cb);
546  ~UFSSCSIDevice();
547 
553  struct SCSIReply SCSICMDHandle(uint32_t* SCSI_msg);
554 
563  void readFlash(uint8_t* readaddr, uint64_t offset, uint32_t size);
564 
569  void writeFlash(uint8_t* writeaddr, uint64_t offset, uint32_t size);
570 
576  bool finishedCommand() const {return transferCompleted;};
577 
582  void clearSignal() {transferCompleted = false;};
583 
591  bool finishedRead() const {return readCompleted;};
592 
597  void clearReadSignal() {readCompleted = false;};
598 
604  void SSDReadStart(uint32_t total_read);
605  void SSDWriteStart();
606 
612  void setTotalWrite(uint32_t total_write) {totalWrite = total_write;};
613 
618 
629 
635 
643 
644  private:
651  void readCallback();
652 
657  void SSDReadDone();
658 
662  void SSDWriteDone();
663 
669  void statusCheck(uint8_t status, uint8_t* sensecodelist);
670 
674  void setSignal() {transferCompleted = true;};
675 
679  void setReadSignal() {readCompleted = true;};
680 
688 
692  const uint32_t blkSize;
693  const uint32_t lunAvail;
694  const uint64_t diskSize;
695  const uint32_t capacityLower;
696  const uint32_t capacityUpper;
697 
702  struct LUNInfo lunInfo;
703  const uint32_t lunID;
704 
712 
716  uint32_t totalRead;
717  uint32_t totalWrite;
718 
724 
730 
736 
737  /*
738  * Default response header layout. For more information refer to
739  * chapter 7 http://www.jedec.org/standards-documents/results/jesd220
740  */
741  static const unsigned int UPIUHeaderDataIndWord0 = 0x0000C022;
742  static const unsigned int UPIUHeaderDataIndWord1 = 0x00000000;
743  static const unsigned int UPIUHeaderDataIndWord2 = 0x40000000;
744 
745  /*
746  * SCSI mode pages values assigned in ufs_device.cc
747  * The mode pages give device specific information via the SCSI
748  * protocol. They are defined in
749  * http://www.jedec.org/standards-documents/results/jesd220
750  */
751  static const unsigned int controlPage[3];
752  static const unsigned int recoveryPage[3];
753  static const unsigned int cachingPage[5];
754 
755  /*
756  * SCSI command set; defined in
757  * http://www.jedec.org/standards-documents/results/jesd220
758  */
760  SCSIInquiry = 0x12,
761  SCSIRead6 = 0x08,
762  SCSIRead10 = 0x28,
763  SCSIRead16 = 0x88,
769  SCSIVerify10 = 0x2F,
770  SCSIWrite6 = 0x0A,
771  SCSIWrite10 = 0x2A,
772  SCSIWrite16 = 0x8A,
776  //UFS SCSI additional command set for full functionality
781  SCSIUnmap = 0x42,
784  //SCSI commands not supported by UFS; but Linux send them anyway
786  };
787 
788  /*
789  * SCSI status codes; defined in
790  * http://www.jedec.org/standards-documents/results/jesd220
791  */
793  SCSIGood = 0x00,
796  SCSIBusy = 0x08,
804  };
805 
806  /*
807  * SCSI sense codes; defined in
808  * http://www.jedec.org/standards-documents/results/jesd220
809  */
811  SCSINoSense = 0x00,
813  SCSINotReady = 0x02,
823  };
824 
825  };
826 
827  //All access functions are inherrited; no need to make them public
831  AddrRangeList getAddrRanges() const override;
832 
836  Tick read(PacketPtr pkt) override;
837  Tick write(PacketPtr pkt) override;
838  // end of access functions
839 
843  void setValues();
844 
858  void requestHandler();
859 
864  void commandHandler();
865 
870  void taskStart();
871 
877  void taskHandler(struct UTPUPIUTaskReq* request_in,
878  uint32_t req_pos, Addr finaladdress, uint32_t finalsize);
879 
884  void transferStart();
885 
895  void transferHandler(struct UTPTransferReqDesc*
896  request_in, int req_pos, Addr finaladdress,
897  uint32_t finalsize, uint32_t done);
898 
903  void SCSIStart();
904 
909  void SCSIResume(uint32_t lun_id);
910 
914  void LUNSignal();
915 
920  void transferDone(Addr responseStartAddr, uint32_t req_pos,
921  struct UTPUPIURSP request_out, uint32_t size,
922  Addr address, uint8_t* destination, bool finished,
923  uint32_t lun_id);
928  void finalUTP();
929 
933  void clearInterrupt();
934  void generateInterrupt();
935 
943  void writeDevice(Event* additional_action, bool toDisk, Addr start,
944  int size, uint8_t* destination, uint64_t SCSIDiskOffset,
945  uint32_t lun_id);
946  void readDevice(bool lastTransfer, Addr SCSIStart, uint32_t SCSISize,
947  uint8_t* SCSIDestination, bool no_cache,
948  Event* additional_action);
949 
956  void manageWriteTransfer(uint8_t LUN, uint64_t offset, uint32_t
957  sg_table_length, struct UFSHCDSGEntry* sglist);
958  void manageReadTransfer(uint32_t size, uint32_t LUN, uint64_t offset,
959  uint32_t sg_table_length,
960  struct UFSHCDSGEntry* sglist);
961 
968  void readDone();
969 
976  void writeDone();
977 
984  void readCallback();
985 
993  void readGarbage();
994 
996  void regStats() override;
997 
1001  const Addr pioAddr;
1002  const Addr pioSize;
1004  const int intNum;
1006  const uint32_t lunAvail;
1007  const uint8_t UFSSlots;
1008 
1013 
1019 
1031 
1039  uint32_t countInt;
1040 
1049  uint32_t transferTrack;
1051 
1059 
1066 
1073 
1081 
1090 
1102 
1107 
1112 
1117 
1122 
1127 
1139 
1151 
1156 
1161 
1169 
1173  static const unsigned int UTPTransferREQCOMPL = 0x01;//UFS_BIT(0)
1174  static const unsigned int UTPTaskREQCOMPL = 0x200;//UFS_BIT(9)
1175  static const unsigned int UICCommandCOMPL = 0x400;//UFS_BIT(10)
1176  static const unsigned int UICCommandReady = 0x08;//UFS_BIT(3)
1177 
1178  /*
1179  * UFSHCI Registers; please refer to
1180  * http://www.jedec.org/standards-documents/results/jesd223
1181  * for their definition.
1182  */
1212  };
1213 };
1214 
1215 #endif //__DEV_ARM_UFS_DEVICE_HH__
UFSHostDevice::setValues
void setValues()
Initialization function.
Definition: ufs_device.cc:881
UFSHostDevice::UFSHostDeviceStats::totalWriteUFSTransactions
Stats::Scalar totalWriteUFSTransactions
Definition: ufs_device.hh:510
UFSHostDevice::LUNInfo
Logic unit information structure.
Definition: ufs_device.hh:394
UFSHostDevice::HCIMem::vendorSpecific
uint32_t vendorSpecific
vendor specific register
Definition: ufs_device.hh:214
UFSHostDevice::HCIMem::TRUTRLDBR
uint32_t TRUTRLDBR
Definition: ufs_device.hh:221
UFSHostDevice::readDevice
void readDevice(bool lastTransfer, Addr SCSIStart, uint32_t SCSISize, uint8_t *SCSIDestination, bool no_cache, Event *additional_action)
Dma transaction function: read device.
Definition: ufs_device.cc:2078
UFSHostDevice::transferStart::size
uint32_t size
Definition: ufs_device.hh:455
ArmISA::status
Bitfield< 5, 0 > status
Definition: miscregs_types.hh:417
UFSHostDevice::LUNInfo::vendor0
uint32_t vendor0
Definition: ufs_device.hh:397
UFSHostDevice::UFSSCSIDevice::SCSIIntermediatCGood
@ SCSIIntermediatCGood
Definition: ufs_device.hh:798
UFSHostDevice::UFSSCSIDevice::SCSICMDHandle
struct SCSIReply SCSICMDHandle(uint32_t *SCSI_msg)
SCSI command handle function; determines what the command is and returns a reply structure that allow...
Definition: ufs_device.cc:157
UFSHostDevice::HCIMem
Host Controller Interface This is a set of registers that allow the driver to control the transaction...
Definition: ufs_device.hh:188
UFSHostDevice::UFSSCSIDevice::SCSIFormatUnit
@ SCSIFormatUnit
Definition: ufs_device.hh:773
UFSHostDevice::regControllerCapabilities
@ regControllerCapabilities
Definition: ufs_device.hh:1184
UFSHostDevice::transferStart::destination
struct UTPTransferReqDesc * destination
Definition: ufs_device.hh:452
UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord3
uint32_t dWord3
Definition: ufs_device.hh:354
UFSHostDevice::transferDoneInfo::lunID
uint32_t lunID
Definition: ufs_device.hh:445
UFSHostDevice::writeToDiskBurst
Disk transfer burst information.
Definition: ufs_device.hh:488
UFSHostDevice::UFSSCSIDevice::SCSISenseCodes
SCSISenseCodes
Definition: ufs_device.hh:810
UFSHostDevice::gic
BaseGic * gic
Definition: ufs_device.hh:1005
io_device.hh
UFSHostDevice::UFSSCSIDevice::SCSIBlankCheck
@ SCSIBlankCheck
Definition: ufs_device.hh:819
UFSHostDevice::UFSSCSIDevice::SCSIReadCapacity10
@ SCSIReadCapacity10
Definition: ufs_device.hh:764
UFSHostDevice::regUTPTaskREQListClear
@ regUTPTaskREQListClear
Definition: ufs_device.hh:1206
UFSHostDevice::UTPUPIUTaskReq::inputParam1
uint32_t inputParam1
Definition: ufs_device.hh:288
UFSHostDevice::commandHandler
void commandHandler()
Command handler function.
Definition: ufs_device.cc:1376
UFSHostDevice::UFSSCSIDevice::clearSignal
void clearSignal()
Clear signal.
Definition: ufs_device.hh:582
UFSHostDevice::SSDReadPending
std::deque< struct transferInfo > SSDReadPending
Information from the Disk, waiting to be pushed to the DMA.
Definition: ufs_device.hh:1116
UFSHostDevice::taskStart::destination
struct UTPUPIUTaskReq destination
Definition: ufs_device.hh:464
UFSHostDevice::transferInfo
Different events, and scenarios require different types of information.
Definition: ufs_device.hh:425
UFSHostDevice::LUNInfo::dWord1
uint32_t dWord1
Definition: ufs_device.hh:396
UFSHostDevice::transferStart
void transferStart()
Transfer Start function.
Definition: ufs_device.cc:1356
UFSHostDevice::SCSIResumeInfo::finalSize
uint32_t finalSize
Definition: ufs_device.hh:479
UFSHostDevice::UFSSCSIDevice::SCSIVolumeOverflow
@ SCSIVolumeOverflow
Definition: ufs_device.hh:821
UFSHostDevice::intNum
const int intNum
Definition: ufs_device.hh:1004
UFSHostDevice::UTPUPIUHeader::dWord0
uint32_t dWord0
Definition: ufs_device.hh:257
UFSHostDevice::UFSSCSIDevice::UFSSCSIDevice
UFSSCSIDevice(const UFSHostDeviceParams *p, uint32_t lun_id, const Callback &transfer_cb, const Callback &read_cb)
Constructor and destructor.
Definition: ufs_device.cc:75
serialize.hh
UFSHostDevice::UFSSCSIDevice::readFlash
void readFlash(uint8_t *readaddr, uint64_t offset, uint32_t size)
Disk access functions.
Definition: ufs_device.cc:688
UFSHostDevice::UFSSCSIDevice::SCSIAbortedCommand
@ SCSIAbortedCommand
Definition: ufs_device.hh:820
UFSHostDevice::UTPUPIUTaskReq::inputParam2
uint32_t inputParam2
Definition: ufs_device.hh:289
UFSHostDevice::UFSHCDSGEntry
struct UFSHCDSGEntry - UFSHCI PRD Entry baseAddr: Lower 32bit physical address DW-0 upperAddr: Upper ...
Definition: ufs_device.hh:301
UFSHostDevice::regUICCommand
@ regUICCommand
Definition: ufs_device.hh:1208
UFSHostDevice::UFSSCSIDevice::SCSIACAActive
@ SCSIACAActive
Definition: ufs_device.hh:802
UFSHostDevice::SCSIResumeInfo::finalAddress
Addr finalAddress
Definition: ufs_device.hh:478
UFSHostDevice::SCSIResumeInfo::done
uint32_t done
Definition: ufs_device.hh:481
UFSHostDevice::UFSSCSIDevice::SCSIInquiry
@ SCSIInquiry
Definition: ufs_device.hh:760
UFSHostDevice::UFSSCSIDevice::SCSIRead16
@ SCSIRead16
Definition: ufs_device.hh:763
UFSHostDevice::pendingDoorbells
uint8_t pendingDoorbells
Definition: ufs_device.hh:1030
UFSHostDevice::UFSSCSIDevice::SCSICommandTerminated
@ SCSICommandTerminated
Definition: ufs_device.hh:800
AbstractNVM
This is an interface between the disk interface (which will handle the disk data transactions) and th...
Definition: abstract_nvm.hh:53
UFSHostDevice::UFSSCSIDevice::SSDWriteStart
void SSDWriteStart()
SSD write start.
Definition: ufs_device.cc:2029
UFSHostDevice::UFSSCSIDevice::memWriteCallback
Callback memWriteCallback
Definition: ufs_device.hh:735
UFSHostDevice::regUTPTaskREQListRunStop
@ regUTPTaskREQListRunStop
Definition: ufs_device.hh:1207
UFSHostDevice::HCIMem::TRUTRLCLR
uint32_t TRUTRLCLR
Definition: ufs_device.hh:222
UFSHostDevice::UFSHostDeviceStats::transactionLatency
Stats::Histogram transactionLatency
Histogram of latencies.
Definition: ufs_device.hh:527
UFSHostDevice::writeToDiskBurst::SCSIDiskOffset
uint64_t SCSIDiskOffset
Definition: ufs_device.hh:490
UFSHostDevice::UFSSCSIDevice::SCSIMaintenanceIn
@ SCSIMaintenanceIn
Definition: ufs_device.hh:785
UFSHostDevice::HCIMem::ORInterruptStatus
uint32_t ORInterruptStatus
Operation and runtime registers.
Definition: ufs_device.hh:200
base_gic.hh
UFSHostDevice::HCIMem::ORHostControllerStatus
uint32_t ORHostControllerStatus
Definition: ufs_device.hh:202
UFSHostDevice::UFSSCSIDevice::amountOfReadTransfers
uint32_t amountOfReadTransfers
Definition: ufs_device.hh:723
UFSHostDevice::transferStartInfo
std::deque< struct transferStart > transferStartInfo
Definition: ufs_device.hh:1101
UFSHostDevice::UFSSCSIDevice::SSDReadStart
void SSDReadStart(uint32_t total_read)
Start the transactions to (and from) the disk The host will queue all the transactions.
Definition: ufs_device.cc:2178
UFSHostDevice::UFSDevice
std::vector< UFSSCSIDevice * > UFSDevice
logic units connected to the UFS Host device Note again that the "device" as such is represented by o...
Definition: ufs_device.hh:1065
UFSHostDevice::UFSSCSIDevice::SSDReadInfo
std::deque< struct transferInfo > SSDReadInfo
SSDReadInfo: Structure from disk to dma, that contains data, and helper info to get it to the right p...
Definition: ufs_device.hh:634
UFSHostDevice::regUTPTaskREQListBaseH
@ regUTPTaskREQListBaseH
Definition: ufs_device.hh:1204
disk_image.hh
UFSHostDevice::UFSSCSIDevice::SCSIReservationConflict
@ SCSIReservationConflict
Definition: ufs_device.hh:799
UFSHostDevice::UFSSCSIDevice::signalDone
Callback signalDone
Callbacks between Host and Device.
Definition: ufs_device.hh:728
UFSHostDevice::HCIMem::ORUECPA
uint32_t ORUECPA
Definition: ufs_device.hh:204
UFSHostDevice::UFSSCSIDevice::SCSIUnitAttention
@ SCSIUnitAttention
Definition: ufs_device.hh:817
UFSHostDevice::HCIMem::ORUECDME
uint32_t ORUECDME
Definition: ufs_device.hh:208
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:63
UFSHostDevice::UTPTransferREQCOMPL
static const unsigned int UTPTransferREQCOMPL
Bits of interest within UFS data packages.
Definition: ufs_device.hh:1173
UFSHostDevice::HCIMem::CMDUCMDARG2
uint32_t CMDUCMDARG2
Definition: ufs_device.hh:239
UFSHostDevice::transferDoneInfo::reqPos
uint32_t reqPos
Definition: ufs_device.hh:439
UFSHostDevice::UFSHCIMem
HCIMem UFSHCIMem
Host controller memory.
Definition: ufs_device.hh:1012
UFSHostDevice::regUTPTaskREQDoorbell
@ regUTPTaskREQDoorbell
Definition: ufs_device.hh:1205
UFSHostDevice::HCIMem::ORUECT
uint32_t ORUECT
Definition: ufs_device.hh:207
UFSHostDevice::UFSSCSIDevice::SSDReadDone
void SSDReadDone()
SSD Read done; Determines if the final callback of the transaction should be made at the end of a rea...
Definition: ufs_device.cc:2199
UFSHostDevice::readCallback
void readCallback()
Read callback Call back function for the logic units to indicate the completion of a read action.
Definition: ufs_device.cc:2240
UFSHostDevice::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize; needed to restore from checkpoints.
Definition: ufs_device.cc:2307
UFSHostDevice::UFSSCSIDevice::SCSIWriteBuffer
@ SCSIWriteBuffer
Definition: ufs_device.hh:782
UFSHostDevice::pioSize
const Addr pioSize
Definition: ufs_device.hh:1002
UFSHostDevice::UFSSCSIDevice::SCSITestUnitReady
@ SCSITestUnitReady
Definition: ufs_device.hh:768
UFSHostDevice::UICCommandCOMPL
static const unsigned int UICCommandCOMPL
Definition: ufs_device.hh:1175
UFSHostDevice::HCIMem::ORHostControllerEnable
uint32_t ORHostControllerEnable
Definition: ufs_device.hh:203
std::vector< uint32_t >
UFSHostDevice::UFSHostDeviceStats::totalReadSSD
Stats::Scalar totalReadSSD
Amount of data read/written.
Definition: ufs_device.hh:505
UFSHostDevice::drain
DrainState drain() override
Drain; needed to enable checkpoints.
Definition: ufs_device.cc:2324
UFSHostDevice::UFSSCSIDevice::finishedCommand
bool finishedCommand() const
finished command.
Definition: ufs_device.hh:576
UFSHostDevice::UTPUPIURSP::residualTransferCount
uint32_t residualTransferCount
Definition: ufs_device.hh:272
UFSHostDevice::writeToDiskBurst::LUN
uint32_t LUN
Definition: ufs_device.hh:492
UFSHostDevice::SSDWriteinfo
std::deque< struct transferInfo > SSDWriteinfo
Information from DMA transaction to disk.
Definition: ufs_device.hh:1111
UFSHostDevice::UFSHostDeviceStats::maxDoorbell
Stats::Scalar maxDoorbell
Definition: ufs_device.hh:523
UFSHostDevice::transferEventQueue
std::deque< EventFunctionWrapper > transferEventQueue
Definition: ufs_device.hh:1168
UFSHostDevice::transferDoneInfo::size
uint32_t size
Definition: ufs_device.hh:441
UFSHostDevice::regUICErrorCodeDME
@ regUICErrorCodeDME
Definition: ufs_device.hh:1196
UFSHostDevice::writeDevice
void writeDevice(Event *additional_action, bool toDisk, Addr start, int size, uint8_t *destination, uint64_t SCSIDiskOffset, uint32_t lun_id)
DMA transfer functions These allow the host to push/pull the data to the memory The provided event in...
Definition: ufs_device.cc:1872
UFSHostDevice::UFSSCSIDevice::SCSIModeSelect10
@ SCSIModeSelect10
Definition: ufs_device.hh:777
UFSHostDevice::UFSSCSIDevice::SCSIModeSense6
@ SCSIModeSense6
Definition: ufs_device.hh:778
UFSHostDevice::idlePhaseStart
Tick idlePhaseStart
Definition: ufs_device.hh:1058
UFSHostDevice::SCSIStart
void SCSIStart()
Transfer SCSI function.
Definition: ufs_device.cc:1469
UFSHostDevice::UFSSCSIDevice::SCSIUnmap
@ SCSIUnmap
Definition: ufs_device.hh:781
UFSHostDevice::UFSSCSIDevice::SCSISynchronizeCache
@ SCSISynchronizeCache
Definition: ufs_device.hh:775
UFSHostDevice::UFSSCSIDevice::~UFSSCSIDevice
~UFSSCSIDevice()
Definition: ufs_device.cc:143
UFSHostDevice::writePendingNum
int writePendingNum
Definition: ufs_device.hh:1018
UFSHostDevice::UFSSCSIDevice::SCSINoSense
@ SCSINoSense
Definition: ufs_device.hh:811
UFSHostDevice::readGarbage
void readGarbage()
Read garbage A read from disk data structure can vary in size and is therefor allocated on creation.
Definition: ufs_device.cc:2278
UFSHostDevice::UFSSCSIDevice::flashDisk
DiskImage * flashDisk
The objects this model links to.
Definition: ufs_device.hh:679
UFSHostDevice::UFSSCSIDevice::SCSIIntermediateGood
@ SCSIIntermediateGood
Definition: ufs_device.hh:797
UFSHostDevice::UFSSCSIDevice::SCSIConditionGood
@ SCSIConditionGood
Definition: ufs_device.hh:795
UFSHostDevice::UFSSCSIDevice::SCSIModeSense10
@ SCSIModeSense10
Definition: ufs_device.hh:779
UFSHostDevice::HCIMem::TRUTRLBA
uint32_t TRUTRLBA
Transfer control registers.
Definition: ufs_device.hh:219
UFSHostDevice::UTPUPIUHeader::dWord2
uint32_t dWord2
Definition: ufs_device.hh:259
UFSHostDevice::SCSIResumeInfo::RequestIn
struct UTPTransferReqDesc * RequestIn
Definition: ufs_device.hh:476
UFSHostDevice::UFSSCSIDevice::transferCompleted
bool transferCompleted
Signals to Host layer 1: signal for transaction completion 2: signal for read action completion.
Definition: ufs_device.hh:710
UFSHostDevice::writeDoneEvent
std::deque< EventFunctionWrapper > writeDoneEvent
Definition: ufs_device.hh:1138
UFSHostDevice::taskStart::address
Addr address
Definition: ufs_device.hh:466
UFSHostDevice::UFSSCSIDevice::finishedRead
bool finishedRead() const
Finished read.
Definition: ufs_device.hh:591
packet.hh
UFSHostDevice::regControllerEnable
@ regControllerEnable
Definition: ufs_device.hh:1191
UFSHostDevice::readDoneEvent
std::deque< EventFunctionWrapper > readDoneEvent
Transfer flow events Basically these events form two queues, one from memory to UFS device (DMA) and ...
Definition: ufs_device.hh:1137
UFSHostDevice::UFSSCSIDevice::capacityUpper
const uint32_t capacityUpper
Definition: ufs_device.hh:696
UFSHostDevice::SCSIReply::message
struct UPIUMessage message
Definition: ufs_device.hh:382
UFSHostDevice::UFSSCSIDevice::SCSITaskSetFull
@ SCSITaskSetFull
Definition: ufs_device.hh:801
EventFunctionWrapper
Definition: eventq.hh:1101
UFSHostDevice::UFSSCSIDevice::SCSIGood
@ SCSIGood
Definition: ufs_device.hh:793
UFSHostDevice::taskHandler
void taskHandler(struct UTPUPIUTaskReq *request_in, uint32_t req_pos, Addr finaladdress, uint32_t finalsize)
Task handler function.
Definition: ufs_device.cc:1390
UFSHostDevice::HCIMem::HCCAP
uint32_t HCCAP
Specify the host capabilities.
Definition: ufs_device.hh:192
Stats::Histogram
A simple histogram stat.
Definition: statistics.hh:2654
UFSHostDevice::UTPUPIURSP::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:271
UFSHostDevice::regUICErrorCodePHYAdapterLayer
@ regUICErrorCodePHYAdapterLayer
Definition: ufs_device.hh:1192
UFSHostDevice::UTPTransferReqDesc::responseUPIUOffset
uint16_t responseUPIUOffset
Definition: ufs_device.hh:363
UFSHostDevice::SCSIReply::expectMore
uint8_t expectMore
Definition: ufs_device.hh:384
UFSHostDevice::writeToDiskBurst::size
uint32_t size
Definition: ufs_device.hh:491
UFSHostDevice::HCIMem::TMUTMRLDBR
uint32_t TMUTMRLDBR
Definition: ufs_device.hh:230
DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:71
Stats::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:2533
UFSHostDevice::UFSHostDeviceStats::averageSCSIQueue
Stats::Average averageSCSIQueue
Average Queue lengths.
Definition: ufs_device.hh:517
UFSHostDevice::UTPUPIURSP
struct UTPUPIURSP - Response UPIU structure header: UPIU header DW-0 to DW-2 residualTransferCount: R...
Definition: ufs_device.hh:270
stats.hh
UFSHostDevice::UFSSCSIDevice::SSDWriteDone
void SSDWriteDone()
SSD Write Done; This is the callback function for the memory model.
Definition: ufs_device.cc:2048
cp
Definition: cprintf.cc:40
UFSHostDevice::countInt
uint32_t countInt
interrupt verification This keeps track of the number of interrupts generated.
Definition: ufs_device.hh:1039
UFSHostDevice::UTPTransferCMDDesc::responseUPIU
uint8_t responseUPIU[128]
Definition: ufs_device.hh:317
UFSHostDevice::UTPUPIUTaskReq
struct UTPUPIUTaskReq - Task request UPIU structure header - UPIU header structure DW0 to DW-2 inputP...
Definition: ufs_device.hh:286
UFSHostDevice::UFSHostDeviceStats::idleTimes
Stats::Histogram idleTimes
Definition: ufs_device.hh:528
dma_device.hh
UFSHostDevice::transferStart::done
uint32_t done
Definition: ufs_device.hh:456
UFSHostDevice::serialize
void serialize(CheckpointOut &cp) const override
Serialize; needed to make checkpoints.
Definition: ufs_device.cc:2290
UFSHostDevice::SCSIReply::LUN
uint8_t LUN
Definition: ufs_device.hh:381
UFSHostDevice::HCIMem::TMUTMRLBAU
uint32_t TMUTMRLBAU
Definition: ufs_device.hh:229
UFSHostDevice::UFSHostDeviceStats::averageReadSSDQueue
Stats::Average averageReadSSDQueue
Definition: ufs_device.hh:518
UFSHostDevice::LUNInfo::product0
uint32_t product0
Definition: ufs_device.hh:399
bitfield.hh
DiskImage
Basic interface for accessing a disk image.
Definition: disk_image.hh:49
UFSHostDevice::UFSHostDeviceStats::averageWriteSSDQueue
Stats::Average averageWriteSSDQueue
Definition: ufs_device.hh:519
UFSHostDevice::UFSSCSIDevice::transferInfo
transferDoneInfo transferInfo
End of transfer information.
Definition: ufs_device.hh:612
UFSHostDevice::UFSSCSIDevice::deviceReadCallback
Callback deviceReadCallback
Definition: ufs_device.hh:729
UFSHostDevice::UFSHostDeviceStats::currentSCSIQueue
Stats::Scalar currentSCSIQueue
Queue lengths.
Definition: ufs_device.hh:500
Event
Definition: eventq.hh:246
UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord1
static const unsigned int UPIUHeaderDataIndWord1
Definition: ufs_device.hh:742
UFSHostDevice::writeDone
void writeDone()
Write done After a DMA write with data intended for the disk, this function is called.
Definition: ufs_device.cc:1983
UFSHostDevice::UTPTransferReqDesc::responseUPIULength
uint16_t responseUPIULength
Definition: ufs_device.hh:362
UFSHostDevice::taskStart
void taskStart()
Task Start function.
Definition: ufs_device.cc:1342
UFSHostDevice::requestHandler
void requestHandler()
Handler functions.
Definition: ufs_device.cc:1223
UFSHostDevice::request_out_datain
struct SCSIReply request_out_datain
SCSI reply structure, used for direct answering.
Definition: ufs_device.hh:1072
UFSHostDevice::checkDrain
void checkDrain()
Checkdrain; needed to enable checkpoints.
Definition: ufs_device.cc:2340
UFSHostDevice::UFSSCSIDevice::readCallback
void readCallback()
Functions to indicate that the action to the SSD has completed.
Definition: ufs_device.cc:2220
UFSHostDevice::UTPUPIUTaskReq::reserved
uint32_t reserved[2]
Definition: ufs_device.hh:291
UFSHostDevice::HCIMem::CMDUCMDARG3
uint32_t CMDUCMDARG3
Definition: ufs_device.hh:240
abstract_nvm.hh
UFSHostDevice::UTPTransferReqDesc::commandDescBaseAddrHi
uint32_t commandDescBaseAddrHi
Definition: ufs_device.hh:359
UFSHostDevice::UFSSCSIDevice::lunID
const uint32_t lunID
Definition: ufs_device.hh:703
UFSHostDevice::UFSSCSIDevice::memReadCallback
Callback memReadCallback
Callbacks between Device and Memory.
Definition: ufs_device.hh:734
UFSHostDevice::regUICErrorCodeDataLinkLayer
@ regUICErrorCodeDataLinkLayer
Definition: ufs_device.hh:1193
statistics.hh
UFSHostDevice::UFSSCSIDevice::recoveryPage
static const unsigned int recoveryPage[3]
Definition: ufs_device.hh:752
UFSHostDevice::LUNInfo::product1
uint32_t product1
Definition: ufs_device.hh:400
UFSHostDevice::UFSSCSIDevice::diskSize
const uint64_t diskSize
Definition: ufs_device.hh:694
UFSHostDevice::SCSIReply
SCSI reply structure.
Definition: ufs_device.hh:374
UFSHostDevice::HCIMem::TRUTRLRSR
uint32_t TRUTRLRSR
Definition: ufs_device.hh:223
UFSHostDevice::activeDoorbells
uint8_t activeDoorbells
Statistics helper variables Active doorbells indicates how many doorbells are in teh process of being...
Definition: ufs_device.hh:1029
UFSHostDevice::SCSIReply::status
uint8_t status
Definition: ufs_device.hh:379
UFSHostDevice::UPIUMessage::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:325
UFSHostDevice::HCIMem::ORInterruptEnable
uint32_t ORInterruptEnable
Definition: ufs_device.hh:201
UFSHostDevice::dmaWriteInfo
std::deque< struct writeToDiskBurst > dmaWriteInfo
Information to get a DMA transaction.
Definition: ufs_device.hh:1106
UFSHostDevice
UFS command flow state machine digraph CommandFlow{ node [fontsize=10]; IDLE -> transferHandler [ lab...
Definition: ufs_device.hh:169
UFSHostDevice::lunAvail
const uint32_t lunAvail
Definition: ufs_device.hh:1006
UFSHostDevice::UFSSCSIDevice::SCSIBusy
@ SCSIBusy
Definition: ufs_device.hh:796
UFSHostDevice::UFSHostDeviceStats::averageWriteSSDBW
Stats::Formula averageWriteSSDBW
Definition: ufs_device.hh:514
UFSHostDevice::UTPTransferReqDesc::PRDTableOffset
uint16_t PRDTableOffset
Definition: ufs_device.hh:367
UFSHostDevice::UFSSCSIDevice::setReadSignal
void setReadSignal()
set signal to indicate that the read action has been completed
Definition: ufs_device.hh:679
UFSHostDevice::UFSSCSIDevice::statusCheck
void statusCheck(uint8_t status, uint8_t *sensecodelist)
Status of SCSI.
Definition: ufs_device.cc:671
UFSHostDevice::UPIUMessage
UPIU tranfer message.
Definition: ufs_device.hh:324
UFSHostDevice::regUTPTransferREQListRunStop
@ regUTPTransferREQListRunStop
Definition: ufs_device.hh:1202
UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord0
uint32_t dWord0
Definition: ufs_device.hh:351
UFSHostDevice::UFSSCSIDevice::SCSICheckCondition
@ SCSICheckCondition
Definition: ufs_device.hh:794
UFSHostDevice::UFSSCSIDevice::SCSIReadBuffer
@ SCSIReadBuffer
Definition: ufs_device.hh:783
UFSHostDevice::UFSSCSIDevice::SCSIMediumError
@ SCSIMediumError
Definition: ufs_device.hh:814
UFSHostDevice::UFSSCSIDevice::SCSIVerify10
@ SCSIVerify10
Definition: ufs_device.hh:769
UFSHostDevice::transferTrack
uint32_t transferTrack
Track the transfer This is allows the driver to "group" certain transfers together by using a tag in ...
Definition: ufs_device.hh:1049
UFSHostDevice::UFSHostDeviceStats::totalReadUFSTransactions
Stats::Scalar totalReadUFSTransactions
Definition: ufs_device.hh:509
UFSHostDevice::UTPTransferCMDDesc::commandUPIU
uint8_t commandUPIU[128]
Definition: ufs_device.hh:316
UFSHostDevice::HCIMem::TMUTMRLRSR
uint32_t TMUTMRLRSR
Definition: ufs_device.hh:232
UFSHostDevice::taskEventQueue
std::deque< EventFunctionWrapper > taskEventQueue
Multiple tasks transfers can be scheduled at once for the device, the only thing we know for sure abo...
Definition: ufs_device.hh:1167
UFSHostDevice::UFSHostDeviceStats::averageReadSSDBW
Stats::Formula averageReadSSDBW
Average bandwidth for reads and writes.
Definition: ufs_device.hh:513
UFSHostDevice::regInterruptEnable
@ regInterruptEnable
Definition: ufs_device.hh:1189
UFSHostDevice::UFSSCSIDevice
device layer: This is your Logic unit This layer implements the SCSI functionality of the UFS Device ...
Definition: ufs_device.hh:536
UFSHostDevice::SCSIReply::reset
void reset()
Definition: ufs_device.hh:375
UFSHostDevice::UFSSCSIDevice::SCSIRecoverdError
@ SCSIRecoverdError
Definition: ufs_device.hh:812
UFSHostDevice::getAddrRanges
AddrRangeList getAddrRanges() const override
Address range functions.
Definition: ufs_device.cc:908
UFSHostDevice::taskInfo
std::deque< struct taskStart > taskInfo
When a task/transfer is started it needs information about the task/transfer it is about to perform.
Definition: ufs_device.hh:1100
UFSHostDevice::UFSSCSIDevice::SCSIWrite6
@ SCSIWrite6
Definition: ufs_device.hh:770
UFSHostDevice::UTPUPIUTaskReq::inputParam3
uint32_t inputParam3
Definition: ufs_device.hh:290
UFSHostDevice::UFSSCSIDevice::SCSIRequestSense
@ SCSIRequestSense
Definition: ufs_device.hh:780
UFSHostDevice::transferStart::address
Addr address
Definition: ufs_device.hh:454
UFSHostDevice::regUICCommandArg1
@ regUICCommandArg1
Definition: ufs_device.hh:1209
UFSHostDevice::transferStart
Transfer start information.
Definition: ufs_device.hh:451
UFSHostDevice::taskStart::done
bool done
Definition: ufs_device.hh:468
UFSHostDevice::taskStart::mask
uint32_t mask
Definition: ufs_device.hh:465
UFSHostDevice::taskStart::size
uint32_t size
Definition: ufs_device.hh:467
UFSHostDevice::readDone
void readDone()
Read done Started at the end of a transaction after the last read action.
Definition: ufs_device.cc:1783
UFSHostDevice::finalUTP
void finalUTP()
final UTP, sends the last acknowledge data structure to the system; prepares the clean up functions.
Definition: ufs_device.cc:1737
UFSHostDevice::UFSSCSIDevice::SCSINotReady
@ SCSINotReady
Definition: ufs_device.hh:813
UFSHostDevice::UFSSCSIDevice::SCSIReadCapacity16
@ SCSIReadCapacity16
Definition: ufs_device.hh:765
UFSHostDevice::UFSSCSIDevice::SCSIRead6
@ SCSIRead6
Definition: ufs_device.hh:761
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
UFSHostDevice::regUTPTaskREQListBaseL
@ regUTPTaskREQListBaseL
Definition: ufs_device.hh:1203
UFSHostDevice::regUTPTransferREQDoorbell
@ regUTPTransferREQDoorbell
Definition: ufs_device.hh:1200
UFSHostDevice::UFSSCSIDevice::blkSize
const uint32_t blkSize
Logic unit dimensions.
Definition: ufs_device.hh:692
UFSHostDevice::transactionStart
Tick transactionStart[32]
Helper for latency stats These variables keep track of the latency for every doorbell.
Definition: ufs_device.hh:1057
UFSHostDevice::UFSSCSIDevice::readCompleted
bool readCompleted
Definition: ufs_device.hh:711
UFSHostDevice::UTPUPIURSP::senseDataLen
uint16_t senseDataLen
Definition: ufs_device.hh:274
UFSHostDevice::UFSHCDSGEntry::size
uint32_t size
Definition: ufs_device.hh:305
UFSHostDevice::HCIMem::HCversion
uint32_t HCversion
Definition: ufs_device.hh:193
UFSHostDevice::UFSSCSIDevice::lunInfo
struct LUNInfo lunInfo
Logic unit info; needed for SCSI Info messages and LU identification.
Definition: ufs_device.hh:702
UFSHostDevice::UFSHostDeviceStats::currentReadSSDQueue
Stats::Scalar currentReadSSDQueue
Definition: ufs_device.hh:501
UFSHostDevice::pioDelay
const Tick pioDelay
Definition: ufs_device.hh:1003
UFSHostDevice::UFSSCSIDevice::controlPage
static const unsigned int controlPage[3]
These pages are SCSI specific.
Definition: ufs_device.hh:751
UFSHostDevice::UFSSCSIDevice::SCSIDataProtect
@ SCSIDataProtect
Definition: ufs_device.hh:818
UFSHostDevice::transferInfo::offset
uint64_t offset
Definition: ufs_device.hh:428
UFSHostDevice::UTPTransferReqDesc::PRDTableLength
uint16_t PRDTableLength
Definition: ufs_device.hh:366
UFSHostDevice::UFSHCDSGEntry::baseAddr
uint32_t baseAddr
Definition: ufs_device.hh:302
packet_access.hh
UFSHostDevice::UTPEvent
EventFunctionWrapper UTPEvent
Wait for the moment where we can send the last frame.
Definition: ufs_device.hh:1155
UFSHostDevice::transferDoneInfo::finished
bool finished
Definition: ufs_device.hh:444
UFSHostDevice::readPendingNum
int readPendingNum
Track number of DMA transactions in progress.
Definition: ufs_device.hh:1017
UFSHostDevice::manageWriteTransfer
void manageWriteTransfer(uint8_t LUN, uint64_t offset, uint32_t sg_table_length, struct UFSHCDSGEntry *sglist)
Disk transfer management functions these set up the queues, and initiated them, leading to the data t...
Definition: ufs_device.cc:1924
addr_range.hh
UFSHostDevice::UFSHostDeviceStats::curDoorbell
Stats::Formula curDoorbell
Number of doorbells rung.
Definition: ufs_device.hh:522
UFSHostDevice::transferInfo::size
uint32_t size
Definition: ufs_device.hh:427
UFSHostDevice::regUICErrorCodeNetworkLayer
@ regUICErrorCodeNetworkLayer
Definition: ufs_device.hh:1194
UFSHostDevice::LUNInfo::product3
uint32_t product3
Definition: ufs_device.hh:402
UFSHostDevice::UFSSCSIDevice::lunAvail
const uint32_t lunAvail
Definition: ufs_device.hh:693
UFSHostDevice::regControllerPRODID
@ regControllerPRODID
Definition: ufs_device.hh:1187
UFSHostDevice::UFSSCSIDevice::SCSIInfoQueue
std::deque< struct SCSIResumeInfo > SCSIInfoQueue
Information message queues, as there can be multiple messages queued for handling in this system.
Definition: ufs_device.hh:628
UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord0
static const unsigned int UPIUHeaderDataIndWord0
Definition: ufs_device.hh:741
UFSHostDevice::transferDoneInfo
transfer completion info.
Definition: ufs_device.hh:437
UFSHostDevice::UFSSCSIDevice::flashDevice
AbstractNVM * flashDevice
Definition: ufs_device.hh:687
UFSHostDevice::regUICCommandArg2
@ regUICCommandArg2
Definition: ufs_device.hh:1210
UFSHostDevice::pioAddr
const Addr pioAddr
Host controller information.
Definition: ufs_device.hh:1001
UFSHostDevice::LUNInfo::vendor1
uint32_t vendor1
Definition: ufs_device.hh:398
Stats::Average
A stat that calculates the per tick average of a value.
Definition: statistics.hh:2549
UFSHostDevice::HCIMem::CMDUCMDARG1
uint32_t CMDUCMDARG1
Definition: ufs_device.hh:238
UFSHostDevice::UFSHCDSGEntry::upperAddr
uint32_t upperAddr
Definition: ufs_device.hh:303
UFSHostDevice::HCIMem::HCHCDDID
uint32_t HCHCDDID
Definition: ufs_device.hh:194
UFSHostDevice::UTPTransferCMDDesc
struct UTPTransferCMDDesc - UFS Commad Descriptor structure commandUPIU: Command UPIU Frame address r...
Definition: ufs_device.hh:315
UFSHostDevice::UFSSCSIDevice::SCSIHardwareError
@ SCSIHardwareError
Definition: ufs_device.hh:815
UFSHostDevice::UTPTransferReqDesc::RequestDescHeader
struct RequestDescHeader dword0: Descriptor Header DW0 dword1: Descriptor Header DW1 dword2: Descript...
Definition: ufs_device.hh:350
UFSHostDevice::regUTPTransferREQListBaseL
@ regUTPTransferREQListBaseL
Definition: ufs_device.hh:1198
UFSHostDevice::UFSHostDeviceStats
Statistics.
Definition: ufs_device.hh:498
UFSHostDevice::UFSSCSIDevice::SCSIStartStop
@ SCSIStartStop
Definition: ufs_device.hh:767
UFSHostDevice::transferStart::lun_id
uint32_t lun_id
Definition: ufs_device.hh:457
UFSHostDevice::taskCommandTrack
uint32_t taskCommandTrack
Definition: ufs_device.hh:1050
UFSHostDevice::SCSIReply::senseSize
uint8_t senseSize
Definition: ufs_device.hh:383
UFSHostDevice::generateInterrupt
void generateInterrupt()
set interrupt and sort out the doorbell register.
Definition: ufs_device.cc:1811
UFSHostDevice::UTPTransferReqDesc::commandDescBaseAddrLo
uint32_t commandDescBaseAddrLo
Definition: ufs_device.hh:358
UFSHostDevice::SCSIResumeInfo::reqPos
int reqPos
Definition: ufs_device.hh:477
DmaDevice
Definition: dma_device.hh:165
UFSHostDevice::transferDoneInfo::destination
uint8_t * destination
Definition: ufs_device.hh:443
UFSHostDevice::UPIUMessage::dataOffset
uint32_t dataOffset
Definition: ufs_device.hh:326
UFSHostDevice::UTPUPIUTaskReq::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:287
UFSHostDevice::transferHandler
void transferHandler(struct UTPTransferReqDesc *request_in, int req_pos, Addr finaladdress, uint32_t finalsize, uint32_t done)
Transfer handler function.
Definition: ufs_device.cc:1426
UFSHostDevice::HCIMem::ORUECN
uint32_t ORUECN
Definition: ufs_device.hh:206
UFSHostDevice::regControllerStatus
@ regControllerStatus
Definition: ufs_device.hh:1190
UFSHostDevice::UTPTransferReqDesc::header
struct UFSHostDevice::UTPTransferReqDesc::RequestDescHeader header
UFSHostDevice::UFSHCIRegisters
UFSHCIRegisters
Definition: ufs_device.hh:1183
UFSHostDevice::taskStart
Task start information.
Definition: ufs_device.hh:463
BaseGic
Definition: base_gic.hh:62
UFSHostDevice::UTPTransferCMDDesc::PRDTable
struct UFSHCDSGEntry PRDTable[128]
Definition: ufs_device.hh:318
UFSHostDevice::regStats
void regStats() override
register statistics
Definition: ufs_device.cc:767
UFSHostDevice::UFSSCSIDevice::SCSITaskAborted
@ SCSITaskAborted
Definition: ufs_device.hh:803
UFSHostDevice::transferInfo::lunID
uint32_t lunID
Definition: ufs_device.hh:430
Stats::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:3037
Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:257
UFSHostDevice::HCIMem::HCHCPMID
uint32_t HCHCPMID
Definition: ufs_device.hh:195
std::deque
STL deque class.
Definition: stl.hh:44
UFSHostDevice::HCIMem::CMDUICCMDR
uint32_t CMDUICCMDR
Command registers.
Definition: ufs_device.hh:237
UFSHostDevice::regUTPTransferREQListClear
@ regUTPTransferREQListClear
Definition: ufs_device.hh:1201
UFSHostDevice::UTPUPIURSP::senseData
uint8_t senseData[18]
Definition: ufs_device.hh:275
UFSHostDevice::clearInterrupt
void clearInterrupt()
Interrupt control functions.
Definition: ufs_device.cc:1834
UFSHostDevice::stats
struct UFSHostDeviceStats stats
RequestHandler stats.
Definition: ufs_device.hh:1126
UFSHostDevice::UFSSCSIDevice::cachingPage
static const unsigned int cachingPage[5]
Definition: ufs_device.hh:753
UFSHostDevice::read
Tick read(PacketPtr pkt) override
register access functions
Definition: ufs_device.cc:921
UFSHostDevice::UFSSCSIDevice::SSDWriteDoneInfo
std::deque< struct transferInfo > SSDWriteDoneInfo
SSDWriteDoneInfo: Structure from dma to disk, that contains data, and helper info to get it to the ri...
Definition: ufs_device.hh:642
UFSHostDevice::UFSSCSIDevice::clearReadSignal
void clearReadSignal()
Clear signal.
Definition: ufs_device.hh:597
UFSHostDevice::UFSHostDeviceStats::totalReadDiskTransactions
Stats::Scalar totalReadDiskTransactions
Definition: ufs_device.hh:507
UFSHostDevice::UFSSCSIDevice::SCSIWrite16
@ SCSIWrite16
Definition: ufs_device.hh:772
UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord2
static const unsigned int UPIUHeaderDataIndWord2
Definition: ufs_device.hh:743
UFSHostDevice::UFSSCSIDevice::SCSIWrite10
@ SCSIWrite10
Definition: ufs_device.hh:771
UFSHostDevice::write
Tick write(PacketPtr pkt) override
UFSHCD write function.
Definition: ufs_device.cc:1059
UFSHostDevice::UTPUPIUHeader
All the data structures are defined in the UFS standard This standard be found at the JEDEC website f...
Definition: ufs_device.hh:256
UFSHostDevice::transferInfo::filePointer
uint32_t filePointer
Definition: ufs_device.hh:429
UFSHostDevice::UFSHostDeviceStats::totalWrittenSSD
Stats::Scalar totalWrittenSSD
Definition: ufs_device.hh:506
UFSHostDevice::UFSSCSIDevice::SCSIStatusCodes
SCSIStatusCodes
Definition: ufs_device.hh:792
UFSHostDevice::UFSSCSIDevice::SCSIRead10
@ SCSIRead10
Definition: ufs_device.hh:762
UFSHostDevice::UPIUMessage::dataCount
uint32_t dataCount
Definition: ufs_device.hh:327
UFSHostDevice::HCIMem::TRUTRLBAU
uint32_t TRUTRLBAU
Definition: ufs_device.hh:220
UFSHostDevice::HCIMem::ORUECDL
uint32_t ORUECDL
Definition: ufs_device.hh:205
UFSHostDevice::HCIMem::TMUTMRLCLR
uint32_t TMUTMRLCLR
Definition: ufs_device.hh:231
UFSHostDevice::SCSIResumeInfo::destination
std::vector< uint8_t > destination
Definition: ufs_device.hh:480
UFSHostDevice::SCSIReply::offset
uint64_t offset
Definition: ufs_device.hh:385
UFSHostDevice::SCSIResumeInfo
After a SCSI command has been identified, the SCSI resume function will handle it.
Definition: ufs_device.hh:475
CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:63
UFSHostDevice::UPIUMessage::dataMsg
std::vector< uint32_t > dataMsg
Definition: ufs_device.hh:328
UFSHostDevice::transferDone
void transferDone(Addr responseStartAddr, uint32_t req_pos, struct UTPUPIURSP request_out, uint32_t size, Addr address, uint8_t *destination, bool finished, uint32_t lun_id)
transfer done, the beginning of the final stage of the transfer.
Definition: ufs_device.cc:1698
UFSHostDevice::UFSSCSIDevice::setSignal
void setSignal()
set signal to indicate that the transaction has been completed.
Definition: ufs_device.hh:674
UFSHostDevice::LUNInfo::productRevision
uint32_t productRevision
Definition: ufs_device.hh:403
UFSHostDevice::garbage
std::deque< struct UTPTransferReqDesc * > garbage
garbage queue, ensure clearing of the allocated memory
Definition: ufs_device.hh:1121
UFSHostDevice::regUTPTransferREQListBaseH
@ regUTPTransferREQListBaseH
Definition: ufs_device.hh:1199
UFSHostDevice::UFSSCSIDevice::SCSICommandSet
SCSICommandSet
Definition: ufs_device.hh:759
UFSHostDevice::LUNInfo::product2
uint32_t product2
Definition: ufs_device.hh:401
UFSHostDevice::UICCommandReady
static const unsigned int UICCommandReady
Definition: ufs_device.hh:1176
UFSHostDevice::UFSSCSIDevice::totalWrite
uint32_t totalWrite
Definition: ufs_device.hh:717
UFSHostDevice::UFSHostDeviceStats::averageDoorbell
Stats::Average averageDoorbell
Definition: ufs_device.hh:524
UFSHostDevice::SCSIReply::senseCode
uint8_t senseCode[19]
Definition: ufs_device.hh:386
UFSHostDevice::HCIMem::TMUTMRLBA
uint32_t TMUTMRLBA
Task control registers.
Definition: ufs_device.hh:228
UFSHostDevice::readGarbageEventQueue
std::deque< EventFunctionWrapper > readGarbageEventQueue
Event after a read to clean up the UTP data structures.
Definition: ufs_device.hh:1160
UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord2
uint32_t dWord2
Definition: ufs_device.hh:353
UFSHostDevice::transferDoneInfo::responseStartAddr
Addr responseStartAddr
Definition: ufs_device.hh:438
UFSHostDevice::regInterruptStatus
@ regInterruptStatus
Definition: ufs_device.hh:1188
UFSHostDevice::UFSSCSIDevice::amountOfWriteTransfers
uint32_t amountOfWriteTransfers
transaction progress tracking
Definition: ufs_device.hh:722
UFSHostDevice::LUNSignal
void LUNSignal()
LU callback function to indicate that the action has completed.
Definition: ufs_device.cc:1666
UFSHostDevice::UFSSCSIDevice::SCSIReportLUNs
@ SCSIReportLUNs
Definition: ufs_device.hh:766
UFSHostDevice::transferStart::mask
uint32_t mask
Definition: ufs_device.hh:453
UFSHostDevice::transferInfo::buffer
std::vector< uint8_t > buffer
Definition: ufs_device.hh:426
UFSHostDevice::SCSIResume
void SCSIResume(uint32_t lun_id)
Starts the scsi handling function in the apropriate Logic unit, prepares the right data transfer sche...
Definition: ufs_device.cc:1514
MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:323
std::list< AddrRange >
UFSHostDevice::UFSSCSIDevice::SCSIMisCompare
@ SCSIMisCompare
Definition: ufs_device.hh:822
UFSHostDevice::UFSHostDeviceStats::totalWriteDiskTransactions
Stats::Scalar totalWriteDiskTransactions
Definition: ufs_device.hh:508
UFSHostDevice::UFSHostDevice
UFSHostDevice(const UFSHostDeviceParams *p)
Constructor for the UFS Host device.
Definition: ufs_device.cc:715
UFSHostDevice::UFSSCSIDevice::Callback
std::function< void()> Callback
Definition: ufs_device.hh:539
UFSHostDevice::UTPUPIURSP::reserved
uint32_t reserved[4]
Definition: ufs_device.hh:273
CheckpointIn
Definition: serialize.hh:67
X86ISA::destination
destination
Definition: intmessage.hh:43
UFSHostDevice::SCSIInfo
struct SCSIResumeInfo SCSIInfo
SCSI resume info information structure for SCSI resume.
Definition: ufs_device.hh:1080
UFSHostDevice::UFSSCSIDevice::SCSISendDiagnostic
@ SCSISendDiagnostic
Definition: ufs_device.hh:774
UFSHostDevice::regUFSVersion
@ regUFSVersion
Definition: ufs_device.hh:1185
UFSHostDevice::UTPTransferReqDesc
struct UTPTransferReqDesc - UTRD structure header: UTRD header DW-0 to DW-3 commandDescBaseAddrLo: UC...
Definition: ufs_device.hh:341
UFSHostDevice::regUTPTransferREQINTAGGControl
@ regUTPTransferREQINTAGGControl
Definition: ufs_device.hh:1197
UFSHostDevice::SCSIResumeEvent
EventFunctionWrapper SCSIResumeEvent
The events that control the functionality.
Definition: ufs_device.hh:1150
UFSHostDevice::regControllerDEVID
@ regControllerDEVID
Definition: ufs_device.hh:1186
UFSHostDevice::HCIMem::ORUTRIACR
uint32_t ORUTRIACR
Definition: ufs_device.hh:209
UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord1
uint32_t dWord1
Definition: ufs_device.hh:352
UFSHostDevice::transferDoneInfo::address
Addr address
Definition: ufs_device.hh:442
UFSHostDevice::regUICErrorCodeTransportLayer
@ regUICErrorCodeTransportLayer
Definition: ufs_device.hh:1195
UFSHostDevice::transferDoneInfo::requestOut
struct UTPUPIURSP requestOut
Definition: ufs_device.hh:440
UFSHostDevice::UFSSCSIDevice::SCSIIllegalRequest
@ SCSIIllegalRequest
Definition: ufs_device.hh:816
UFSHostDevice::LUNInfo::dWord0
uint32_t dWord0
Definition: ufs_device.hh:395
UFSHostDevice::UTPUPIUHeader::dWord1
uint32_t dWord1
Definition: ufs_device.hh:258
UFSHostDevice::UFSSCSIDevice::setTotalWrite
void setTotalWrite(uint32_t total_write)
Sets total amount of write transactions that needs to be made.
Definition: ufs_device.hh:612
UFSHostDevice::UTPTaskREQCOMPL
static const unsigned int UTPTaskREQCOMPL
Definition: ufs_device.hh:1174
UFSHostDevice::manageReadTransfer
void manageReadTransfer(uint32_t size, uint32_t LUN, uint64_t offset, uint32_t sg_table_length, struct UFSHCDSGEntry *sglist)
Manage read transfer.
Definition: ufs_device.cc:2113
UFSHostDevice::UFSHostDeviceStats::currentWriteSSDQueue
Stats::Scalar currentWriteSSDQueue
Definition: ufs_device.hh:502
UFSHostDevice::UFSSCSIDevice::capacityLower
const uint32_t capacityLower
Definition: ufs_device.hh:695
UFSHostDevice::regUICCommandArg3
@ regUICCommandArg3
Definition: ufs_device.hh:1211
UFSHostDevice::UFSSCSIDevice::writeFlash
void writeFlash(uint8_t *writeaddr, uint64_t offset, uint32_t size)
Write flash.
Definition: ufs_device.cc:702
UFSHostDevice::UFSHCDSGEntry::reserved
uint32_t reserved
Definition: ufs_device.hh:304
UFSHostDevice::writeToDiskBurst::start
Addr start
Definition: ufs_device.hh:489
UFSHostDevice::UFSSCSIDevice::totalRead
uint32_t totalRead
Total amount transactions that need to be made.
Definition: ufs_device.hh:716
UFSHostDevice::SCSIReply::msgSize
uint32_t msgSize
Definition: ufs_device.hh:380
UFSHostDevice::transferEnd
std::deque< struct transferStart > transferEnd
To finish the transaction one needs information about the original message.
Definition: ufs_device.hh:1089
UFSHostDevice::UFSSlots
const uint8_t UFSSlots
Definition: ufs_device.hh:1007
ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:153
SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:92

Generated on Wed Sep 30 2020 14:02:10 for gem5 by doxygen 1.8.17