gem5  v21.1.0.2
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 
163 namespace gem5
164 {
165 
172 class UFSHostDevice : public DmaDevice
173 {
174  public:
175 
176  UFSHostDevice(const UFSHostDeviceParams &p);
177 
178  DrainState drain() override;
179  void checkDrain();
180  void serialize(CheckpointOut &cp) const override;
181  void unserialize(CheckpointIn &cp) override;
182 
183  private:
191  struct HCIMem
192  {
196  uint32_t HCCAP;
197  uint32_t HCversion;
198  uint32_t HCHCDDID;
199  uint32_t HCHCPMID;
200 
208  uint32_t ORUECPA;
209  uint32_t ORUECDL;
210  uint32_t ORUECN;
211  uint32_t ORUECT;
212  uint32_t ORUECDME;
213  uint32_t ORUTRIACR;
214 
218  uint32_t vendorSpecific;
219 
223  uint32_t TRUTRLBA;
224  uint32_t TRUTRLBAU;
225  uint32_t TRUTRLDBR;
226  uint32_t TRUTRLCLR;
227  uint32_t TRUTRLRSR;
228 
232  uint32_t TMUTMRLBA;
233  uint32_t TMUTMRLBAU;
234  uint32_t TMUTMRLDBR;
235  uint32_t TMUTMRLCLR;
236  uint32_t TMUTMRLRSR;
237 
241  uint32_t CMDUICCMDR;
242  uint32_t CMDUCMDARG1;
243  uint32_t CMDUCMDARG2;
244  uint32_t CMDUCMDARG3;
245  };
246 
261  {
262  uint32_t dWord0;
263  uint32_t dWord1;
264  uint32_t dWord2;
265  };
266 
275  struct UTPUPIURSP
276  {
279  uint32_t reserved[4];
280  uint16_t senseDataLen;
281  uint8_t senseData[18];
282  };
283 
293  {
295  uint32_t inputParam1;
296  uint32_t inputParam2;
297  uint32_t inputParam3;
298  uint32_t reserved[2];
299  };
300 
309  {
310  uint32_t baseAddr;
311  uint32_t upperAddr;
312  uint32_t reserved;
313  uint32_t size;
314  };
315 
324  {
325  uint8_t commandUPIU[128];
326  uint8_t responseUPIU[128];
327  struct UFSHCDSGEntry PRDTable[128];
328  };
329 
333  struct UPIUMessage
334  {
336  uint32_t dataOffset;
337  uint32_t dataCount;
339  };
340 
352  {
353 
362  {
363  uint32_t dWord0;
364  uint32_t dWord1;
365  uint32_t dWord2;
366  uint32_t dWord3;
367  } header;
368 
369  /* DW 4-5*/
372 
373  /* DW 6 */
376 
377  /* DW 7 */
378  uint16_t PRDTableLength;
379  uint16_t PRDTableOffset;
380  };
381 
386  struct SCSIReply
387  {
388  void reset() {
389  memset(static_cast<void*>(this), 0, sizeof(*this));
390  }
391 
392  uint8_t status;
393  uint32_t msgSize;
394  uint8_t LUN;
396  uint8_t senseSize;
397  uint8_t expectMore;//0x01 is for writes, 0x02 is for reads
398  uint64_t offset;
399  uint8_t senseCode[19];
400  };
401 
407  struct LUNInfo
408  {
409  uint32_t dWord0;
410  uint32_t dWord1;
411  uint32_t vendor0;
412  uint32_t vendor1;
413  uint32_t product0;
414  uint32_t product1;
415  uint32_t product2;
416  uint32_t product3;
417  uint32_t productRevision;
418  };
419 
440  {
442  uint32_t size;
443  uint64_t offset;
444  uint32_t filePointer;
445  uint32_t lunID;
446  };
447 
453  {
455  uint32_t reqPos;
457  uint32_t size;
459  uint8_t *destination;
460  bool finished;
461  uint32_t lunID;
462  };
463 
468  {
470  uint32_t mask;
472  uint32_t size;
473  uint32_t done;
474  uint32_t lun_id;
475  };
476 
480  struct taskStart
481  {
483  uint32_t mask;
485  uint32_t size;
486  bool done;
487  };
488 
494  {
496  int reqPos;
498  uint32_t finalSize;
500  uint32_t done;
501  };
502 
508  {
510  uint64_t SCSIDiskOffset;
511  uint32_t size;
512  uint32_t LUN;
513  };
514 
519  {
521 
526 
534 
538 
543 
548 
552  };
553 
560  {
561  public:
562  using Callback = std::function<void()>;
563 
567  UFSSCSIDevice(const UFSHostDeviceParams &p, uint32_t lun_id,
568  const Callback &transfer_cb, const Callback &read_cb);
569  ~UFSSCSIDevice();
570 
576  struct SCSIReply SCSICMDHandle(uint32_t* SCSI_msg);
577 
586  void readFlash(uint8_t* readaddr, uint64_t offset, uint32_t size);
587 
592  void writeFlash(uint8_t* writeaddr, uint64_t offset, uint32_t size);
593 
599  bool finishedCommand() const {return transferCompleted;};
600 
605  void clearSignal() {transferCompleted = false;};
606 
614  bool finishedRead() const {return readCompleted;};
615 
620  void clearReadSignal() {readCompleted = false;};
621 
627  void SSDReadStart(uint32_t total_read);
628  void SSDWriteStart();
629 
635  void setTotalWrite(uint32_t total_write) {totalWrite = total_write;};
636 
641 
652 
658 
666 
667  private:
674  void readCallback();
675 
680  void SSDReadDone();
681 
685  void SSDWriteDone();
686 
692  void statusCheck(uint8_t status, uint8_t* sensecodelist);
693 
697  void setSignal() {transferCompleted = true;};
698 
702  void setReadSignal() {readCompleted = true;};
703 
711 
715  const uint32_t blkSize;
716  const uint32_t lunAvail;
717  const uint64_t diskSize;
718  const uint32_t capacityLower;
719  const uint32_t capacityUpper;
720 
725  struct LUNInfo lunInfo;
726  const uint32_t lunID;
727 
735 
739  uint32_t totalRead;
740  uint32_t totalWrite;
741 
747 
753 
759 
760  /*
761  * Default response header layout. For more information refer to
762  * chapter 7 http://www.jedec.org/standards-documents/results/jesd220
763  */
764  static const unsigned int UPIUHeaderDataIndWord0 = 0x0000C022;
765  static const unsigned int UPIUHeaderDataIndWord1 = 0x00000000;
766  static const unsigned int UPIUHeaderDataIndWord2 = 0x40000000;
767 
768  /*
769  * SCSI mode pages values assigned in ufs_device.cc
770  * The mode pages give device specific information via the SCSI
771  * protocol. They are defined in
772  * http://www.jedec.org/standards-documents/results/jesd220
773  */
774  static const unsigned int controlPage[3];
775  static const unsigned int recoveryPage[3];
776  static const unsigned int cachingPage[5];
777 
778  /*
779  * SCSI command set; defined in
780  * http://www.jedec.org/standards-documents/results/jesd220
781  */
783  {
784  SCSIInquiry = 0x12,
785  SCSIRead6 = 0x08,
786  SCSIRead10 = 0x28,
787  SCSIRead16 = 0x88,
793  SCSIVerify10 = 0x2F,
794  SCSIWrite6 = 0x0A,
795  SCSIWrite10 = 0x2A,
796  SCSIWrite16 = 0x8A,
800  //UFS SCSI additional command set for full functionality
805  SCSIUnmap = 0x42,
808  //SCSI commands not supported by UFS; but Linux send them anyway
810  };
811 
812  /*
813  * SCSI status codes; defined in
814  * http://www.jedec.org/standards-documents/results/jesd220
815  */
817  {
818  SCSIGood = 0x00,
821  SCSIBusy = 0x08,
829  };
830 
831  /*
832  * SCSI sense codes; defined in
833  * http://www.jedec.org/standards-documents/results/jesd220
834  */
836  {
837  SCSINoSense = 0x00,
839  SCSINotReady = 0x02,
849  };
850 
851  };
852 
853  //All access functions are inherrited; no need to make them public
857  AddrRangeList getAddrRanges() const override;
858 
862  Tick read(PacketPtr pkt) override;
863  Tick write(PacketPtr pkt) override;
864  // end of access functions
865 
869  void setValues();
870 
884  void requestHandler();
885 
890  void commandHandler();
891 
896  void taskStart();
897 
903  void taskHandler(struct UTPUPIUTaskReq* request_in,
904  uint32_t req_pos, Addr finaladdress, uint32_t finalsize);
905 
910  void transferStart();
911 
921  void transferHandler(struct UTPTransferReqDesc*
922  request_in, int req_pos, Addr finaladdress,
923  uint32_t finalsize, uint32_t done);
924 
929  void SCSIStart();
930 
935  void SCSIResume(uint32_t lun_id);
936 
940  void LUNSignal();
941 
946  void transferDone(Addr responseStartAddr, uint32_t req_pos,
947  struct UTPUPIURSP request_out, uint32_t size,
948  Addr address, uint8_t* destination, bool finished,
949  uint32_t lun_id);
954  void finalUTP();
955 
959  void clearInterrupt();
960  void generateInterrupt();
961 
969  void writeDevice(Event* additional_action, bool toDisk, Addr start,
970  int size, uint8_t* destination, uint64_t SCSIDiskOffset,
971  uint32_t lun_id);
972  void readDevice(bool lastTransfer, Addr SCSIStart, uint32_t SCSISize,
973  uint8_t* SCSIDestination, bool no_cache,
974  Event* additional_action);
975 
982  void manageWriteTransfer(uint8_t LUN, uint64_t offset, uint32_t
983  sg_table_length, struct UFSHCDSGEntry* sglist);
984  void manageReadTransfer(uint32_t size, uint32_t LUN, uint64_t offset,
985  uint32_t sg_table_length,
986  struct UFSHCDSGEntry* sglist);
987 
994  void readDone();
995 
1002  void writeDone();
1003 
1010  void readCallback();
1011 
1019  void readGarbage();
1020 
1024  const Addr pioAddr;
1025  const Addr pioSize;
1027  const int intNum;
1029  const uint32_t lunAvail;
1030  const uint8_t UFSSlots;
1031 
1036 
1042 
1054 
1062  uint32_t countInt;
1063 
1072  uint32_t transferTrack;
1074 
1082 
1089 
1096 
1104 
1113 
1125 
1130 
1135 
1140 
1145 
1150 
1162 
1174 
1179 
1184 
1192 
1196  static const unsigned int UTPTransferREQCOMPL = 0x01;//UFS_BIT(0)
1197  static const unsigned int UTPTaskREQCOMPL = 0x200;//UFS_BIT(9)
1198  static const unsigned int UICCommandCOMPL = 0x400;//UFS_BIT(10)
1199  static const unsigned int UICCommandReady = 0x08;//UFS_BIT(3)
1200 
1201  /*
1202  * UFSHCI Registers; please refer to
1203  * http://www.jedec.org/standards-documents/results/jesd223
1204  * for their definition.
1205  */
1207  {
1236  };
1237 };
1238 
1239 } // namespace gem5
1240 
1241 #endif //__DEV_ARM_UFS_DEVICE_HH__
gem5::statistics::Scalar
This is a simple scalar statistic, like a counter.
Definition: statistics.hh:1927
gem5::UFSHostDevice::UFSSCSIDevice::SCSIIntermediateGood
@ SCSIIntermediateGood
Definition: ufs_device.hh:822
gem5::UFSHostDevice::HCIMem::vendorSpecific
uint32_t vendorSpecific
vendor specific register
Definition: ufs_device.hh:218
gem5::UFSHostDevice::writeToDiskBurst
Disk transfer burst information.
Definition: ufs_device.hh:507
gem5::UFSHostDevice::UFSSCSIDevice::SCSISenseCodes
SCSISenseCodes
Definition: ufs_device.hh:835
gem5::UFSHostDevice::request_out_datain
struct SCSIReply request_out_datain
SCSI reply structure, used for direct answering.
Definition: ufs_device.hh:1095
gem5::UFSHostDevice::UFSHostDeviceStats::averageWriteSSDBW
statistics::Formula averageWriteSSDBW
Definition: ufs_device.hh:537
gem5::UFSHostDevice::UFSHCDSGEntry::upperAddr
uint32_t upperAddr
Definition: ufs_device.hh:311
gem5::UFSHostDevice::requestHandler
void requestHandler()
Handler functions.
Definition: ufs_device.cc:1201
gem5::UFSHostDevice::UFSSCSIDevice::setSignal
void setSignal()
set signal to indicate that the transaction has been completed.
Definition: ufs_device.hh:697
gem5::UFSHostDevice::UFSSCSIDevice::SCSIReadCapacity10
@ SCSIReadCapacity10
Definition: ufs_device.hh:788
gem5::UFSHostDevice::HCIMem::HCversion
uint32_t HCversion
Definition: ufs_device.hh:197
gem5::UFSHostDevice::UFSSCSIDevice::diskSize
const uint64_t diskSize
Definition: ufs_device.hh:717
gem5::UFSHostDevice::setValues
void setValues()
Initialization function.
Definition: ufs_device.cc:876
gem5::UFSHostDevice::transferStart
void transferStart()
Transfer Start function.
Definition: ufs_device.cc:1334
gem5::UFSHostDevice::UFSSCSIDevice::transferCompleted
bool transferCompleted
Signals to Host layer 1: signal for transaction completion 2: signal for read action completion.
Definition: ufs_device.hh:733
gem5::UFSHostDevice::UTPUPIUTaskReq
struct UTPUPIUTaskReq - Task request UPIU structure header - UPIU header structure DW0 to DW-2 inputP...
Definition: ufs_device.hh:292
gem5::UFSHostDevice::regUICErrorCodeDME
@ regUICErrorCodeDME
Definition: ufs_device.hh:1220
gem5::UFSHostDevice::transferStart::address
Addr address
Definition: ufs_device.hh:471
gem5::UFSHostDevice::UFSHostDeviceStats::totalReadDiskTransactions
statistics::Scalar totalReadDiskTransactions
Definition: ufs_device.hh:530
gem5::UFSHostDevice::taskCommandTrack
uint32_t taskCommandTrack
Definition: ufs_device.hh:1073
gem5::UFSHostDevice::SCSIReply::offset
uint64_t offset
Definition: ufs_device.hh:398
gem5::UFSHostDevice::UFSSCSIDevice::SCSITaskAborted
@ SCSITaskAborted
Definition: ufs_device.hh:828
io_device.hh
gem5::UFSHostDevice::commandHandler
void commandHandler()
Command handler function.
Definition: ufs_device.cc:1354
gem5::UFSHostDevice::regControllerPRODID
@ regControllerPRODID
Definition: ufs_device.hh:1211
gem5::UFSHostDevice::UFSSCSIDevice::signalDone
Callback signalDone
Callbacks between Host and Device.
Definition: ufs_device.hh:751
gem5::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:1492
gem5::UFSHostDevice::regUICCommandArg1
@ regUICCommandArg1
Definition: ufs_device.hh:1233
gem5::UFSHostDevice::SCSIReply
SCSI reply structure.
Definition: ufs_device.hh:386
gem5::UFSHostDevice::countInt
uint32_t countInt
interrupt verification This keeps track of the number of interrupts generated.
Definition: ufs_device.hh:1062
gem5::UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord0
static const unsigned int UPIUHeaderDataIndWord0
Definition: ufs_device.hh:764
gem5::UFSHostDevice::HCIMem::HCHCPMID
uint32_t HCHCPMID
Definition: ufs_device.hh:199
gem5::UFSHostDevice::UTPTransferReqDesc::commandDescBaseAddrLo
uint32_t commandDescBaseAddrLo
Definition: ufs_device.hh:370
gem5::UFSHostDevice::generateInterrupt
void generateInterrupt()
set interrupt and sort out the doorbell register.
Definition: ufs_device.cc:1789
gem5::UFSHostDevice::clearInterrupt
void clearInterrupt()
Interrupt control functions.
Definition: ufs_device.cc:1812
gem5::UFSHostDevice::UFSSCSIDevice::SCSIReadBuffer
@ SCSIReadBuffer
Definition: ufs_device.hh:807
gem5::UFSHostDevice::regUFSVersion
@ regUFSVersion
Definition: ufs_device.hh:1209
serialize.hh
gem5::UFSHostDevice::garbage
std::deque< struct UTPTransferReqDesc * > garbage
garbage queue, ensure clearing of the allocated memory
Definition: ufs_device.hh:1144
gem5::UFSHostDevice::regUICErrorCodeTransportLayer
@ regUICErrorCodeTransportLayer
Definition: ufs_device.hh:1219
gem5::UFSHostDevice::UFSSCSIDevice::SCSIUnmap
@ SCSIUnmap
Definition: ufs_device.hh:805
gem5::UFSHostDevice::UFSSCSIDevice::SCSIReservationConflict
@ SCSIReservationConflict
Definition: ufs_device.hh:824
gem5::UFSHostDevice::UFSHostDeviceStats::totalWriteDiskTransactions
statistics::Scalar totalWriteDiskTransactions
Definition: ufs_device.hh:531
gem5::UFSHostDevice::pendingDoorbells
uint8_t pendingDoorbells
Definition: ufs_device.hh:1053
gem5::UFSHostDevice::UFSSCSIDevice::cachingPage
static const unsigned int cachingPage[5]
Definition: ufs_device.hh:776
gem5::UFSHostDevice::SCSIReply::reset
void reset()
Definition: ufs_device.hh:388
gem5::UFSHostDevice::UPIUMessage::dataOffset
uint32_t dataOffset
Definition: ufs_device.hh:336
gem5::UFSHostDevice::UFSSCSIDevice::SCSIWriteBuffer
@ SCSIWriteBuffer
Definition: ufs_device.hh:806
gem5::UFSHostDevice::taskStart::mask
uint32_t mask
Definition: ufs_device.hh:483
gem5::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:1123
gem5::UFSHostDevice::UTPTransferReqDesc::PRDTableOffset
uint16_t PRDTableOffset
Definition: ufs_device.hh:379
gem5::UFSHostDevice::drain
DrainState drain() override
Drain; needed to enable checkpoints.
Definition: ufs_device.cc:2302
gem5::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:657
gem5::UFSHostDevice::UFSHostDeviceStats::totalReadUFSTransactions
statistics::Scalar totalReadUFSTransactions
Definition: ufs_device.hh:532
gem5::UFSHostDevice::transferDoneInfo::destination
uint8_t * destination
Definition: ufs_device.hh:459
gem5::UFSHostDevice::UTPUPIURSP::residualTransferCount
uint32_t residualTransferCount
Definition: ufs_device.hh:278
gem5::UFSHostDevice::read
Tick read(PacketPtr pkt) override
register access functions
Definition: ufs_device.cc:916
gem5::UFSHostDevice::UFSSCSIDevice::amountOfWriteTransfers
uint32_t amountOfWriteTransfers
transaction progress tracking
Definition: ufs_device.hh:745
gem5::UFSHostDevice::LUNInfo::vendor1
uint32_t vendor1
Definition: ufs_device.hh:412
gem5::UFSHostDevice::transferDoneInfo::requestOut
struct UTPUPIURSP requestOut
Definition: ufs_device.hh:456
gem5::UFSHostDevice::UFSHostDeviceStats::averageReadSSDBW
statistics::Formula averageReadSSDBW
Average bandwidth for reads and writes.
Definition: ufs_device.hh:536
gem5::UFSHostDevice::writeToDiskBurst::size
uint32_t size
Definition: ufs_device.hh:511
gem5::CheckpointIn
Definition: serialize.hh:68
gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord1
uint32_t dWord1
Definition: ufs_device.hh:364
gem5::UFSHostDevice::dmaWriteInfo
std::deque< struct writeToDiskBurst > dmaWriteInfo
Information to get a DMA transaction.
Definition: ufs_device.hh:1129
gem5::UFSHostDevice::UFSHCDSGEntry::reserved
uint32_t reserved
Definition: ufs_device.hh:312
gem5::UFSHostDevice::SSDWriteinfo
std::deque< struct transferInfo > SSDWriteinfo
Information from DMA transaction to disk.
Definition: ufs_device.hh:1134
gem5::UFSHostDevice::UTPTransferReqDesc::header
struct gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader header
gem5::UFSHostDevice::SCSIResumeInfo::destination
std::vector< uint8_t > destination
Definition: ufs_device.hh:499
gem5::UFSHostDevice::HCIMem::ORHostControllerEnable
uint32_t ORHostControllerEnable
Definition: ufs_device.hh:207
gem5::UFSHostDevice::UFSSCSIDevice::totalRead
uint32_t totalRead
Total amount transactions that need to be made.
Definition: ufs_device.hh:739
base_gic.hh
gem5::UFSHostDevice::UFSHCIRegisters
UFSHCIRegisters
Definition: ufs_device.hh:1206
gem5::UFSHostDevice::UFSSCSIDevice::SCSIUnitAttention
@ SCSIUnitAttention
Definition: ufs_device.hh:843
gem5::UFSHostDevice::UFSSCSIDevice::SCSIIllegalRequest
@ SCSIIllegalRequest
Definition: ufs_device.hh:842
gem5::UFSHostDevice::transferDoneInfo::lunID
uint32_t lunID
Definition: ufs_device.hh:461
gem5::UFSHostDevice::LUNInfo
Logic unit information structure.
Definition: ufs_device.hh:407
disk_image.hh
gem5::UFSHostDevice::UFSSCSIDevice
device layer: This is your Logic unit This layer implements the SCSI functionality of the UFS Device ...
Definition: ufs_device.hh:559
gem5::UFSHostDevice::regUTPTaskREQListClear
@ regUTPTaskREQListClear
Definition: ufs_device.hh:1230
gem5::UFSHostDevice::regUICErrorCodeNetworkLayer
@ regUICErrorCodeNetworkLayer
Definition: ufs_device.hh:1218
gem5::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:2177
gem5::UFSHostDevice::getAddrRanges
AddrRangeList getAddrRanges() const override
Address range functions.
Definition: ufs_device.cc:903
gem5::UFSHostDevice::UFSHostDeviceStats::transactionLatency
statistics::Histogram transactionLatency
Histogram of latencies.
Definition: ufs_device.hh:550
gem5::UFSHostDevice::UTPUPIURSP::senseDataLen
uint16_t senseDataLen
Definition: ufs_device.hh:280
gem5::UFSHostDevice::UICCommandReady
static const unsigned int UICCommandReady
Definition: ufs_device.hh:1199
gem5::UFSHostDevice::UFSSCSIDevice::SCSIMediumError
@ SCSIMediumError
Definition: ufs_device.hh:840
gem5::UFSHostDevice::UTPTransferCMDDesc
struct UTPTransferCMDDesc - UFS Commad Descriptor structure commandUPIU: Command UPIU Frame address r...
Definition: ufs_device.hh:323
gem5::UFSHostDevice::transferInfo::offset
uint64_t offset
Definition: ufs_device.hh:443
gem5::UFSHostDevice::UFSSCSIDevice::SCSITestUnitReady
@ SCSITestUnitReady
Definition: ufs_device.hh:792
gem5::UFSHostDevice::SCSIReply::msgSize
uint32_t msgSize
Definition: ufs_device.hh:393
gem5::UFSHostDevice::regUTPTransferREQListRunStop
@ regUTPTransferREQListRunStop
Definition: ufs_device.hh:1226
gem5::UFSHostDevice::UTPUPIUHeader::dWord0
uint32_t dWord0
Definition: ufs_device.hh:262
gem5::UFSHostDevice::UFSSCSIDevice::clearReadSignal
void clearReadSignal()
Clear signal.
Definition: ufs_device.hh:620
gem5::statistics::Average
A stat that calculates the per tick average of a value.
Definition: statistics.hh:1955
gem5::UFSHostDevice::UFSSCSIDevice::SCSICommandSet
SCSICommandSet
Definition: ufs_device.hh:782
gem5::UFSHostDevice::UFSSCSIDevice::SCSIConditionGood
@ SCSIConditionGood
Definition: ufs_device.hh:820
gem5::UFSHostDevice::UFSHostDeviceStats
Statistics.
Definition: ufs_device.hh:518
gem5::UFSHostDevice::UFSHostDeviceStats::totalReadSSD
statistics::Scalar totalReadSSD
Amount of data read/written.
Definition: ufs_device.hh:528
gem5::UFSHostDevice::UFSSCSIDevice::SCSIStartStop
@ SCSIStartStop
Definition: ufs_device.hh:791
gem5::UFSHostDevice::SCSIResumeInfo
After a SCSI command has been identified, the SCSI resume function will handle it.
Definition: ufs_device.hh:493
gem5::UFSHostDevice::regInterruptEnable
@ regInterruptEnable
Definition: ufs_device.hh:1213
gem5::UFSHostDevice::HCIMem::HCCAP
uint32_t HCCAP
Specify the host capabilities.
Definition: ufs_device.hh:196
gem5::statistics::Formula
A formula for statistics that is calculated when printed.
Definition: statistics.hh:2536
std::vector< uint32_t >
gem5::UFSHostDevice::transferDoneInfo::responseStartAddr
Addr responseStartAddr
Definition: ufs_device.hh:454
gem5::UFSHostDevice::UFSSCSIDevice::deviceReadCallback
Callback deviceReadCallback
Definition: ufs_device.hh:752
gem5::UFSHostDevice::readPendingNum
int readPendingNum
Track number of DMA transactions in progress.
Definition: ufs_device.hh:1040
gem5::UFSHostDevice::UTPUPIURSP::senseData
uint8_t senseData[18]
Definition: ufs_device.hh:281
gem5::X86ISA::destination
destination
Definition: intmessage.hh:47
gem5::UFSHostDevice::UTPUPIUTaskReq::inputParam2
uint32_t inputParam2
Definition: ufs_device.hh:296
gem5::UFSHostDevice::UFSSCSIDevice::finishedRead
bool finishedRead() const
Finished read.
Definition: ufs_device.hh:614
gem5::UFSHostDevice::UTPTransferCMDDesc::PRDTable
struct UFSHCDSGEntry PRDTable[128]
Definition: ufs_device.hh:327
gem5::UFSHostDevice::UFSSCSIDevice::SCSICommandTerminated
@ SCSICommandTerminated
Definition: ufs_device.hh:825
gem5::UFSHostDevice::UFSSCSIDevice::SCSIFormatUnit
@ SCSIFormatUnit
Definition: ufs_device.hh:797
gem5::UFSHostDevice::UFSSCSIDevice::SCSIModeSelect10
@ SCSIModeSelect10
Definition: ufs_device.hh:801
gem5::UFSHostDevice::transferDoneInfo::address
Addr address
Definition: ufs_device.hh:458
gem5::UFSHostDevice::UFSHCIMem
HCIMem UFSHCIMem
Host controller memory.
Definition: ufs_device.hh:1035
gem5::UFSHostDevice::UFSSCSIDevice::SCSIInquiry
@ SCSIInquiry
Definition: ufs_device.hh:784
gem5::UFSHostDevice::LUNInfo::dWord1
uint32_t dWord1
Definition: ufs_device.hh:410
gem5::UFSHostDevice::regUICErrorCodePHYAdapterLayer
@ regUICErrorCodePHYAdapterLayer
Definition: ufs_device.hh:1216
gem5::UFSHostDevice::regControllerDEVID
@ regControllerDEVID
Definition: ufs_device.hh:1210
gem5::UFSHostDevice::SSDReadPending
std::deque< struct transferInfo > SSDReadPending
Information from the Disk, waiting to be pushed to the DMA.
Definition: ufs_device.hh:1139
gem5::UFSHostDevice::UFSSCSIDevice::SCSIIntermediatCGood
@ SCSIIntermediatCGood
Definition: ufs_device.hh:823
gem5::UFSHostDevice::SCSIReply::senseCode
uint8_t senseCode[19]
Definition: ufs_device.hh:399
gem5::UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord2
static const unsigned int UPIUHeaderDataIndWord2
Definition: ufs_device.hh:766
gem5::UFSHostDevice::UFSSCSIDevice::SCSITaskSetFull
@ SCSITaskSetFull
Definition: ufs_device.hh:826
gem5::UFSHostDevice::transferStart::mask
uint32_t mask
Definition: ufs_device.hh:470
gem5::UFSHostDevice::UFSHCDSGEntry
struct UFSHCDSGEntry - UFSHCI PRD Entry baseAddr: Lower 32bit physical address DW-0 upperAddr: Upper ...
Definition: ufs_device.hh:308
gem5::UFSHostDevice::UFSSCSIDevice::UPIUHeaderDataIndWord1
static const unsigned int UPIUHeaderDataIndWord1
Definition: ufs_device.hh:765
gem5::UFSHostDevice::SCSIResumeInfo::finalAddress
Addr finalAddress
Definition: ufs_device.hh:497
gem5::UFSHostDevice::UFSSCSIDevice::clearSignal
void clearSignal()
Clear signal.
Definition: ufs_device.hh:605
gem5::UFSHostDevice::HCIMem::TRUTRLCLR
uint32_t TRUTRLCLR
Definition: ufs_device.hh:226
gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord2
uint32_t dWord2
Definition: ufs_device.hh:365
packet.hh
gem5::UFSHostDevice::regUTPTransferREQListBaseH
@ regUTPTransferREQListBaseH
Definition: ufs_device.hh:1223
gem5::UFSHostDevice::UTPTransferReqDesc::responseUPIUOffset
uint16_t responseUPIUOffset
Definition: ufs_device.hh:375
gem5::UFSHostDevice::UFSSCSIDevice::SCSIMisCompare
@ SCSIMisCompare
Definition: ufs_device.hh:848
gem5::UFSHostDevice::UPIUMessage
UPIU tranfer message.
Definition: ufs_device.hh:333
gem5::DiskImage
Basic interface for accessing a disk image.
Definition: disk_image.hh:52
gem5::UFSHostDevice::UTPUPIUHeader::dWord2
uint32_t dWord2
Definition: ufs_device.hh:264
gem5::UFSHostDevice::stats
struct UFSHostDeviceStats stats
RequestHandler stats.
Definition: ufs_device.hh:1149
gem5::UFSHostDevice::regUTPTaskREQListBaseL
@ regUTPTaskREQListBaseL
Definition: ufs_device.hh:1227
gem5::UFSHostDevice::regUICCommandArg2
@ regUICCommandArg2
Definition: ufs_device.hh:1234
gem5::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:1160
gem5::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:78
gem5::UFSHostDevice::finalUTP
void finalUTP()
final UTP, sends the last acknowledge data structure to the system; prepares the clean up functions.
Definition: ufs_device.cc:1715
gem5::UFSHostDevice::UFSSCSIDevice::~UFSSCSIDevice
~UFSSCSIDevice()
Definition: ufs_device.cc:146
gem5::UFSHostDevice::HCIMem::CMDUCMDARG1
uint32_t CMDUCMDARG1
Definition: ufs_device.hh:242
stats.hh
gem5::UFSHostDevice::UFSHostDeviceStats::UFSHostDeviceStats
UFSHostDeviceStats(UFSHostDevice *parent)
Amount of data read/written.
Definition: ufs_device.cc:760
gem5::statistics::Histogram
A simple histogram stat.
Definition: statistics.hh:2123
gem5::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:1072
gem5::UFSHostDevice::HCIMem::ORUECDME
uint32_t ORUECDME
Definition: ufs_device.hh:212
gem5::UFSHostDevice::UFSSCSIDevice::SCSIRecoverdError
@ SCSIRecoverdError
Definition: ufs_device.hh:838
gem5::UFSHostDevice::LUNInfo::product1
uint32_t product1
Definition: ufs_device.hh:414
gem5::UFSHostDevice::HCIMem::ORUECPA
uint32_t ORUECPA
Definition: ufs_device.hh:208
gem5::UFSHostDevice::writeToDiskBurst::LUN
uint32_t LUN
Definition: ufs_device.hh:512
gem5::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:2156
gem5::UFSHostDevice::UFSHostDeviceStats::currentWriteSSDQueue
statistics::Scalar currentWriteSSDQueue
Definition: ufs_device.hh:525
gem5::DrainState
DrainState
Object drain/handover states.
Definition: drain.hh:74
gem5::UFSHostDevice::transferStart::size
uint32_t size
Definition: ufs_device.hh:472
gem5::UFSHostDevice::UTPTaskREQCOMPL
static const unsigned int UTPTaskREQCOMPL
Definition: ufs_device.hh:1197
gem5::UFSHostDevice::UFSSCSIDevice::SCSIMaintenanceIn
@ SCSIMaintenanceIn
Definition: ufs_device.hh:809
gem5::UFSHostDevice::UFSSCSIDevice::SCSIAbortedCommand
@ SCSIAbortedCommand
Definition: ufs_device.hh:846
dma_device.hh
gem5::BaseGic
Definition: base_gic.hh:72
gem5::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:665
gem5::UFSHostDevice::UFSSCSIDevice::SCSICheckCondition
@ SCSICheckCondition
Definition: ufs_device.hh:819
gem5::UFSHostDevice::pioAddr
const Addr pioAddr
Host controller information.
Definition: ufs_device.hh:1024
gem5::UFSHostDevice::UFSSCSIDevice::flashDevice
AbstractNVM * flashDevice
Definition: ufs_device.hh:710
gem5::UFSHostDevice::UFSSCSIDevice::SCSIStatusCodes
SCSIStatusCodes
Definition: ufs_device.hh:816
gem5::UFSHostDevice::taskStart
Task start information.
Definition: ufs_device.hh:480
bitfield.hh
gem5::UFSHostDevice::taskStart
void taskStart()
Task Start function.
Definition: ufs_device.cc:1320
gem5::UFSHostDevice::UFSHCDSGEntry::baseAddr
uint32_t baseAddr
Definition: ufs_device.hh:310
gem5::UFSHostDevice::UFSSCSIDevice::setTotalWrite
void setTotalWrite(uint32_t total_write)
Sets total amount of write transactions that needs to be made.
Definition: ufs_device.hh:635
gem5::UFSHostDevice::UFSSCSIDevice::SCSIVolumeOverflow
@ SCSIVolumeOverflow
Definition: ufs_device.hh:847
gem5::UFSHostDevice::UFSSCSIDevice::SCSIModeSense6
@ SCSIModeSense6
Definition: ufs_device.hh:802
gem5::UFSHostDevice::UFSHostDeviceStats::averageDoorbell
statistics::Average averageDoorbell
Definition: ufs_device.hh:547
gem5::Event
Definition: eventq.hh:251
gem5::UFSHostDevice::HCIMem::CMDUCMDARG3
uint32_t CMDUCMDARG3
Definition: ufs_device.hh:244
gem5::Packet
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Definition: packet.hh:283
gem5::UFSHostDevice::regInterruptStatus
@ regInterruptStatus
Definition: ufs_device.hh:1212
gem5::UFSHostDevice::UFSHostDeviceStats::curDoorbell
statistics::Formula curDoorbell
Number of doorbells rung.
Definition: ufs_device.hh:545
gem5::UFSHostDevice::readDone
void readDone()
Read done Started at the end of a transaction after the last read action.
Definition: ufs_device.cc:1761
gem5::UFSHostDevice::SCSIReply::message
struct UPIUMessage message
Definition: ufs_device.hh:395
abstract_nvm.hh
gem5::UFSHostDevice::activeDoorbells
uint8_t activeDoorbells
Statistics helper variables Active doorbells indicates how many doorbells are in teh process of being...
Definition: ufs_device.hh:1052
gem5::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
statistics.hh
gem5::UFSHostDevice::SCSIReply::status
uint8_t status
Definition: ufs_device.hh:392
gem5::Tick
uint64_t Tick
Tick count type.
Definition: types.hh:58
gem5::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:1190
gem5::UFSHostDevice::LUNInfo::productRevision
uint32_t productRevision
Definition: ufs_device.hh:417
gem5::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:1088
gem5::UFSHostDevice::writeToDiskBurst::SCSIDiskOffset
uint64_t SCSIDiskOffset
Definition: ufs_device.hh:510
gem5::UFSHostDevice::UFSSCSIDevice::lunInfo
struct LUNInfo lunInfo
Logic unit info; needed for SCSI Info messages and LU identification.
Definition: ufs_device.hh:725
gem5::UFSHostDevice::writePendingNum
int writePendingNum
Definition: ufs_device.hh:1041
gem5::UFSHostDevice::UTPUPIUTaskReq::inputParam3
uint32_t inputParam3
Definition: ufs_device.hh:297
gem5::UFSHostDevice::pioDelay
const Tick pioDelay
Definition: ufs_device.hh:1026
gem5::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:2256
gem5::UFSHostDevice::UICCommandCOMPL
static const unsigned int UICCommandCOMPL
Definition: ufs_device.hh:1198
gem5::UFSHostDevice::UFSSlots
const uint8_t UFSSlots
Definition: ufs_device.hh:1030
gem5::DmaDevice
Definition: dma_device.hh:203
gem5::UFSHostDevice::SCSIResumeInfo::reqPos
int reqPos
Definition: ufs_device.hh:496
gem5::UFSHostDevice::LUNInfo::product2
uint32_t product2
Definition: ufs_device.hh:415
gem5::UFSHostDevice::regControllerStatus
@ regControllerStatus
Definition: ufs_device.hh:1214
gem5::UFSHostDevice::readGarbageEventQueue
std::deque< EventFunctionWrapper > readGarbageEventQueue
Event after a read to clean up the UTP data structures.
Definition: ufs_device.hh:1183
gem5::UFSHostDevice::UTPTransferREQCOMPL
static const unsigned int UTPTransferREQCOMPL
Bits of interest within UFS data packages.
Definition: ufs_device.hh:1196
gem5::UFSHostDevice::UTPTransferReqDesc::responseUPIULength
uint16_t responseUPIULength
Definition: ufs_device.hh:374
gem5::UFSHostDevice
Host controller layer: This is your Host controller This layer handles the UFS functionality.
Definition: ufs_device.hh:172
gem5::UFSHostDevice::HCIMem::TMUTMRLBA
uint32_t TMUTMRLBA
Task control registers.
Definition: ufs_device.hh:232
gem5::UFSHostDevice::UTPUPIURSP::reserved
uint32_t reserved[4]
Definition: ufs_device.hh:279
gem5::UFSHostDevice::UTPUPIURSP
struct UTPUPIURSP - Response UPIU structure header: UPIU header DW-0 to DW-2 residualTransferCount: R...
Definition: ufs_device.hh:275
gem5::UFSHostDevice::HCIMem::TMUTMRLRSR
uint32_t TMUTMRLRSR
Definition: ufs_device.hh:236
gem5::ArmISA::offset
Bitfield< 23, 0 > offset
Definition: types.hh:144
gem5::UFSHostDevice::writeDone
void writeDone()
Write done After a DMA write with data intended for the disk, this function is called.
Definition: ufs_device.cc:1961
gem5::UFSHostDevice::transferStartInfo
std::deque< struct transferStart > transferStartInfo
Definition: ufs_device.hh:1124
gem5::UFSHostDevice::UTPUPIUTaskReq::reserved
uint32_t reserved[2]
Definition: ufs_device.hh:298
gem5::UFSHostDevice::UFSSCSIDevice::SCSIBusy
@ SCSIBusy
Definition: ufs_device.hh:821
gem5::UFSHostDevice::UFSSCSIDevice::SCSIWrite10
@ SCSIWrite10
Definition: ufs_device.hh:795
gem5::UFSHostDevice::SCSIReply::LUN
uint8_t LUN
Definition: ufs_device.hh:394
gem5::UFSHostDevice::taskHandler
void taskHandler(struct UTPUPIUTaskReq *request_in, uint32_t req_pos, Addr finaladdress, uint32_t finalsize)
Task handler function.
Definition: ufs_device.cc:1368
gem5::UFSHostDevice::UPIUMessage::dataCount
uint32_t dataCount
Definition: ufs_device.hh:337
gem5::SimObject
Abstract superclass for simulation objects.
Definition: sim_object.hh:146
gem5::UFSHostDevice::HCIMem::TRUTRLRSR
uint32_t TRUTRLRSR
Definition: ufs_device.hh:227
gem5::UFSHostDevice::UFSHostDeviceStats::maxDoorbell
statistics::Scalar maxDoorbell
Definition: ufs_device.hh:546
gem5::UFSHostDevice::UFSSCSIDevice::SCSISynchronizeCache
@ SCSISynchronizeCache
Definition: ufs_device.hh:799
gem5::UFSHostDevice::SCSIStart
void SCSIStart()
Transfer SCSI function.
Definition: ufs_device.cc:1447
gem5::UFSHostDevice::unserialize
void unserialize(CheckpointIn &cp) override
Unserialize; needed to restore from checkpoints.
Definition: ufs_device.cc:2285
gem5::UFSHostDevice::UFSSCSIDevice::amountOfReadTransfers
uint32_t amountOfReadTransfers
Definition: ufs_device.hh:746
gem5::UFSHostDevice::UFSSCSIDevice::SCSINoSense
@ SCSINoSense
Definition: ufs_device.hh:837
gem5::UFSHostDevice::UFSSCSIDevice::capacityUpper
const uint32_t capacityUpper
Definition: ufs_device.hh:719
gem5::UFSHostDevice::UFSHostDeviceStats::averageReadSSDQueue
statistics::Average averageReadSSDQueue
Definition: ufs_device.hh:541
gem5::UFSHostDevice::UFSSCSIDevice::controlPage
static const unsigned int controlPage[3]
These pages are SCSI specific.
Definition: ufs_device.hh:774
gem5::UFSHostDevice::transferInfo::lunID
uint32_t lunID
Definition: ufs_device.hh:445
gem5::UFSHostDevice::UFSSCSIDevice::SCSIReportLUNs
@ SCSIReportLUNs
Definition: ufs_device.hh:790
gem5::UFSHostDevice::UFSSCSIDevice::SCSIRead16
@ SCSIRead16
Definition: ufs_device.hh:787
gem5::UFSHostDevice::HCIMem::HCHCDDID
uint32_t HCHCDDID
Definition: ufs_device.hh:198
gem5::UFSHostDevice::UFSSCSIDevice::SCSIGood
@ SCSIGood
Definition: ufs_device.hh:818
gem5::UFSHostDevice::UFSSCSIDevice::memWriteCallback
Callback memWriteCallback
Definition: ufs_device.hh:758
gem5::UFSHostDevice::UFSSCSIDevice::readFlash
void readFlash(uint8_t *readaddr, uint64_t offset, uint32_t size)
Disk access functions.
Definition: ufs_device.cc:691
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::UFSHostDevice::UTPUPIURSP::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:277
gem5::UFSHostDevice::UFSHostDeviceStats::averageSCSIQueue
statistics::Average averageSCSIQueue
Average Queue lengths.
Definition: ufs_device.hh:540
gem5::UFSHostDevice::UFSSCSIDevice::statusCheck
void statusCheck(uint8_t status, uint8_t *sensecodelist)
Status of SCSI.
Definition: ufs_device.cc:674
gem5::UFSHostDevice::transferInfo::size
uint32_t size
Definition: ufs_device.hh:442
gem5::UFSHostDevice::gic
BaseGic * gic
Definition: ufs_device.hh:1028
gem5::UFSHostDevice::UFSSCSIDevice::SCSIRead6
@ SCSIRead6
Definition: ufs_device.hh:785
gem5::UFSHostDevice::lunAvail
const uint32_t lunAvail
Definition: ufs_device.hh:1029
gem5::UFSHostDevice::writeToDiskBurst::start
Addr start
Definition: ufs_device.hh:509
packet_access.hh
gem5::UFSHostDevice::transferDoneInfo
transfer completion info.
Definition: ufs_device.hh:452
gem5::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:1850
addr_range.hh
gem5::UFSHostDevice::UFSHostDeviceStats::averageWriteSSDQueue
statistics::Average averageWriteSSDQueue
Definition: ufs_device.hh:542
gem5::UFSHostDevice::LUNInfo::dWord0
uint32_t dWord0
Definition: ufs_device.hh:409
gem5::UFSHostDevice::UFSSCSIDevice::transferInfo
transferDoneInfo transferInfo
End of transfer information.
Definition: ufs_device.hh:635
gem5::UFSHostDevice::HCIMem::TRUTRLDBR
uint32_t TRUTRLDBR
Definition: ufs_device.hh:225
gem5::UFSHostDevice::SCSIInfo
struct SCSIResumeInfo SCSIInfo
SCSI resume info information structure for SCSI resume.
Definition: ufs_device.hh:1103
gem5::UFSHostDevice::HCIMem::TRUTRLBA
uint32_t TRUTRLBA
Transfer control registers.
Definition: ufs_device.hh:223
gem5::UFSHostDevice::taskStart::done
bool done
Definition: ufs_device.hh:486
gem5::UFSHostDevice::checkDrain
void checkDrain()
Checkdrain; needed to enable checkpoints.
Definition: ufs_device.cc:2318
gem5::EventFunctionWrapper
Definition: eventq.hh:1115
gem5::UFSHostDevice::UFSSCSIDevice::SCSIHardwareError
@ SCSIHardwareError
Definition: ufs_device.hh:841
gem5::UFSHostDevice::UPIUMessage::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:335
gem5::UFSHostDevice::UFSSCSIDevice::readCallback
void readCallback()
Functions to indicate that the action to the SSD has completed.
Definition: ufs_device.cc:2198
gem5::UFSHostDevice::transferEventQueue
std::deque< EventFunctionWrapper > transferEventQueue
Definition: ufs_device.hh:1191
gem5::UFSHostDevice::UFSHostDevice
UFSHostDevice(const UFSHostDeviceParams &p)
Constructor for the UFS Host device.
Definition: ufs_device.cc:718
gem5::UFSHostDevice::LUNInfo::product0
uint32_t product0
Definition: ufs_device.hh:413
gem5::UFSHostDevice::regUTPTaskREQDoorbell
@ regUTPTaskREQDoorbell
Definition: ufs_device.hh:1229
gem5::UFSHostDevice::UFSHostDeviceStats::idleTimes
statistics::Histogram idleTimes
Definition: ufs_device.hh:551
gem5::UFSHostDevice::UFSSCSIDevice::SCSIReadCapacity16
@ SCSIReadCapacity16
Definition: ufs_device.hh:789
gem5::UFSHostDevice::HCIMem::ORInterruptStatus
uint32_t ORInterruptStatus
Operation and runtime registers.
Definition: ufs_device.hh:204
gem5::UFSHostDevice::SCSIResumeInfo::RequestIn
struct UTPTransferReqDesc * RequestIn
Definition: ufs_device.hh:495
gem5::UFSHostDevice::UFSSCSIDevice::SCSIVerify10
@ SCSIVerify10
Definition: ufs_device.hh:793
gem5::UFSHostDevice::HCIMem::ORUTRIACR
uint32_t ORUTRIACR
Definition: ufs_device.hh:213
gem5::UFSHostDevice::UFSSCSIDevice::writeFlash
void writeFlash(uint8_t *writeaddr, uint64_t offset, uint32_t size)
Write flash.
Definition: ufs_device.cc:705
gem5::UFSHostDevice::regUTPTransferREQListClear
@ regUTPTransferREQListClear
Definition: ufs_device.hh:1225
gem5::UFSHostDevice::HCIMem::TMUTMRLBAU
uint32_t TMUTMRLBAU
Definition: ufs_device.hh:233
gem5::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:1902
gem5::UFSHostDevice::UFSSCSIDevice::Callback
std::function< void()> Callback
Definition: ufs_device.hh:562
gem5::UFSHostDevice::regUTPTaskREQListBaseH
@ regUTPTaskREQListBaseH
Definition: ufs_device.hh:1228
gem5::UFSHostDevice::transferDoneInfo::reqPos
uint32_t reqPos
Definition: ufs_device.hh:455
gem5::UFSHostDevice::HCIMem
Host Controller Interface This is a set of registers that allow the driver to control the transaction...
Definition: ufs_device.hh:191
gem5::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:1676
gem5::UFSHostDevice::SCSIReply::senseSize
uint8_t senseSize
Definition: ufs_device.hh:396
gem5::UFSHostDevice::HCIMem::CMDUCMDARG2
uint32_t CMDUCMDARG2
Definition: ufs_device.hh:243
gem5::UFSHostDevice::SCSIResumeInfo::done
uint32_t done
Definition: ufs_device.hh:500
gem5::UFSHostDevice::UFSSCSIDevice::lunID
const uint32_t lunID
Definition: ufs_device.hh:726
std::deque
STL deque class.
Definition: stl.hh:44
gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord3
uint32_t dWord3
Definition: ufs_device.hh:366
gem5::UFSHostDevice::regUTPTransferREQINTAGGControl
@ regUTPTransferREQINTAGGControl
Definition: ufs_device.hh:1221
gem5::UFSHostDevice::HCIMem::ORInterruptEnable
uint32_t ORInterruptEnable
Definition: ufs_device.hh:205
gem5::UFSHostDevice::UTPEvent
EventFunctionWrapper UTPEvent
Wait for the moment where we can send the last frame.
Definition: ufs_device.hh:1178
gem5::UFSHostDevice::serialize
void serialize(CheckpointOut &cp) const override
Serialize; needed to make checkpoints.
Definition: ufs_device.cc:2268
gem5::UFSHostDevice::transferStart::lun_id
uint32_t lun_id
Definition: ufs_device.hh:474
gem5::UFSHostDevice::HCIMem::ORUECDL
uint32_t ORUECDL
Definition: ufs_device.hh:209
gem5::UFSHostDevice::regUICErrorCodeDataLinkLayer
@ regUICErrorCodeDataLinkLayer
Definition: ufs_device.hh:1217
gem5::UFSHostDevice::transferInfo
Different events, and scenarios require different types of information.
Definition: ufs_device.hh:439
gem5::UFSHostDevice::regUTPTransferREQListBaseL
@ regUTPTransferREQListBaseL
Definition: ufs_device.hh:1222
gem5::statistics::Group
Statistics container.
Definition: group.hh:93
gem5::UFSHostDevice::UFSHCDSGEntry::size
uint32_t size
Definition: ufs_device.hh:313
gem5::UFSHostDevice::UFSSCSIDevice::SCSIDataProtect
@ SCSIDataProtect
Definition: ufs_device.hh:844
gem5::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:1404
gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader::dWord0
uint32_t dWord0
Definition: ufs_device.hh:363
gem5::UFSHostDevice::write
Tick write(PacketPtr pkt) override
UFSHCD write function.
Definition: ufs_device.cc:1054
gem5::UFSHostDevice::LUNSignal
void LUNSignal()
LU callback function to indicate that the action has completed.
Definition: ufs_device.cc:1644
gem5::CheckpointOut
std::ostream CheckpointOut
Definition: serialize.hh:66
gem5::UFSHostDevice::UFSSCSIDevice::SCSIRequestSense
@ SCSIRequestSense
Definition: ufs_device.hh:804
gem5::UFSHostDevice::UFSSCSIDevice::SCSIWrite16
@ SCSIWrite16
Definition: ufs_device.hh:796
gem5::UFSHostDevice::LUNInfo::product3
uint32_t product3
Definition: ufs_device.hh:416
gem5::UFSHostDevice::UFSHostDeviceStats::currentReadSSDQueue
statistics::Scalar currentReadSSDQueue
Definition: ufs_device.hh:524
gem5::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:260
gem5::UFSHostDevice::LUNInfo::vendor0
uint32_t vendor0
Definition: ufs_device.hh:411
gem5::UFSHostDevice::pioSize
const Addr pioSize
Definition: ufs_device.hh:1025
gem5::UFSHostDevice::UTPUPIUTaskReq::header
struct UTPUPIUHeader header
Definition: ufs_device.hh:294
gem5::UFSHostDevice::UTPTransferCMDDesc::commandUPIU
uint8_t commandUPIU[128]
Definition: ufs_device.hh:325
gem5::UFSHostDevice::transferStart::destination
struct UTPTransferReqDesc * destination
Definition: ufs_device.hh:469
gem5::UFSHostDevice::transferInfo::buffer
std::vector< uint8_t > buffer
Definition: ufs_device.hh:441
gem5::UFSHostDevice::regUICCommand
@ regUICCommand
Definition: ufs_device.hh:1232
gem5::UFSHostDevice::UFSSCSIDevice::capacityLower
const uint32_t capacityLower
Definition: ufs_device.hh:718
gem5::UFSHostDevice::SCSIResumeInfo::finalSize
uint32_t finalSize
Definition: ufs_device.hh:498
gem5::UFSHostDevice::SCSIReply::expectMore
uint8_t expectMore
Definition: ufs_device.hh:397
gem5::UFSHostDevice::UFSSCSIDevice::flashDisk
DiskImage * flashDisk
The objects this model links to.
Definition: ufs_device.hh:702
std::list< AddrRange >
gem5::UFSHostDevice::UTPUPIUTaskReq::inputParam1
uint32_t inputParam1
Definition: ufs_device.hh:295
gem5::UFSHostDevice::HCIMem::CMDUICCMDR
uint32_t CMDUICCMDR
Command registers.
Definition: ufs_device.hh:241
gem5::UFSHostDevice::transactionStart
Tick transactionStart[32]
Helper for latency stats These variables keep track of the latency for every doorbell.
Definition: ufs_device.hh:1080
gem5::UFSHostDevice::UTPTransferCMDDesc::responseUPIU
uint8_t responseUPIU[128]
Definition: ufs_device.hh:326
gem5::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:651
gem5::UFSHostDevice::UFSSCSIDevice::lunAvail
const uint32_t lunAvail
Definition: ufs_device.hh:716
gem5::UFSHostDevice::SCSIResumeEvent
EventFunctionWrapper SCSIResumeEvent
The events that control the functionality.
Definition: ufs_device.hh:1173
gem5::UFSHostDevice::writeDoneEvent
std::deque< EventFunctionWrapper > writeDoneEvent
Definition: ufs_device.hh:1161
gem5::UFSHostDevice::HCIMem::ORUECN
uint32_t ORUECN
Definition: ufs_device.hh:210
gem5::UFSHostDevice::transferDoneInfo::finished
bool finished
Definition: ufs_device.hh:460
gem5::UFSHostDevice::UFSSCSIDevice::SCSISendDiagnostic
@ SCSISendDiagnostic
Definition: ufs_device.hh:798
gem5::UFSHostDevice::HCIMem::ORUECT
uint32_t ORUECT
Definition: ufs_device.hh:211
gem5::UFSHostDevice::UTPTransferReqDesc::PRDTableLength
uint16_t PRDTableLength
Definition: ufs_device.hh:378
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::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:2056
gem5::UFSHostDevice::UFSSCSIDevice::totalWrite
uint32_t totalWrite
Definition: ufs_device.hh:740
gem5::UFSHostDevice::HCIMem::TRUTRLBAU
uint32_t TRUTRLBAU
Definition: ufs_device.hh:224
gem5::UFSHostDevice::UTPUPIUHeader::dWord1
uint32_t dWord1
Definition: ufs_device.hh:263
gem5::UFSHostDevice::UFSSCSIDevice::SCSIRead10
@ SCSIRead10
Definition: ufs_device.hh:786
gem5::UFSHostDevice::regControllerCapabilities
@ regControllerCapabilities
Definition: ufs_device.hh:1208
gem5::UFSHostDevice::UTPTransferReqDesc::commandDescBaseAddrHi
uint32_t commandDescBaseAddrHi
Definition: ufs_device.hh:371
gem5::UFSHostDevice::UFSSCSIDevice::SCSIACAActive
@ SCSIACAActive
Definition: ufs_device.hh:827
gem5::UFSHostDevice::HCIMem::TMUTMRLDBR
uint32_t TMUTMRLDBR
Definition: ufs_device.hh:234
gem5::UFSHostDevice::UFSSCSIDevice::SSDWriteDone
void SSDWriteDone()
SSD Write Done; This is the callback function for the memory model.
Definition: ufs_device.cc:2026
gem5::UFSHostDevice::UFSHostDeviceStats::totalWriteUFSTransactions
statistics::Scalar totalWriteUFSTransactions
Definition: ufs_device.hh:533
gem5::AbstractNVM
This is an interface between the disk interface (which will handle the disk data transactions) and th...
Definition: abstract_nvm.hh:56
gem5::UFSHostDevice::intNum
const int intNum
Definition: ufs_device.hh:1027
gem5::UFSHostDevice::regUTPTransferREQDoorbell
@ regUTPTransferREQDoorbell
Definition: ufs_device.hh:1224
gem5::UFSHostDevice::taskStart::size
uint32_t size
Definition: ufs_device.hh:485
gem5::UFSHostDevice::UFSSCSIDevice::SCSIWrite6
@ SCSIWrite6
Definition: ufs_device.hh:794
gem5::UFSHostDevice::UFSSCSIDevice::blkSize
const uint32_t blkSize
Logic unit dimensions.
Definition: ufs_device.hh:715
gem5::UFSHostDevice::UFSSCSIDevice::memReadCallback
Callback memReadCallback
Callbacks between Device and Memory.
Definition: ufs_device.hh:757
gem5::UFSHostDevice::transferEnd
std::deque< struct transferStart > transferEnd
To finish the transaction one needs information about the original message.
Definition: ufs_device.hh:1112
gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader
struct RequestDescHeader dword0: Descriptor Header DW0 dword1: Descriptor Header DW1 dword2: Descript...
Definition: ufs_device.hh:361
gem5::UFSHostDevice::taskStart::destination
struct UTPUPIUTaskReq destination
Definition: ufs_device.hh:482
gem5::UFSHostDevice::HCIMem::ORHostControllerStatus
uint32_t ORHostControllerStatus
Definition: ufs_device.hh:206
gem5::UFSHostDevice::UFSSCSIDevice::SCSIBlankCheck
@ SCSIBlankCheck
Definition: ufs_device.hh:845
gem5::UFSHostDevice::UFSSCSIDevice::setReadSignal
void setReadSignal()
set signal to indicate that the read action has been completed
Definition: ufs_device.hh:702
gem5::UFSHostDevice::UFSSCSIDevice::recoveryPage
static const unsigned int recoveryPage[3]
Definition: ufs_device.hh:775
gem5::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:2218
gem5::UFSHostDevice::UPIUMessage::dataMsg
std::vector< uint32_t > dataMsg
Definition: ufs_device.hh:338
gem5::UFSHostDevice::transferStart::done
uint32_t done
Definition: ufs_device.hh:473
gem5::UFSHostDevice::regControllerEnable
@ regControllerEnable
Definition: ufs_device.hh:1215
gem5::UFSHostDevice::regUICCommandArg3
@ regUICCommandArg3
Definition: ufs_device.hh:1235
gem5::UFSHostDevice::UFSSCSIDevice::readCompleted
bool readCompleted
Definition: ufs_device.hh:734
gem5::UFSHostDevice::UFSSCSIDevice::finishedCommand
bool finishedCommand() const
finished command.
Definition: ufs_device.hh:599
gem5::UFSHostDevice::regUTPTaskREQListRunStop
@ regUTPTaskREQListRunStop
Definition: ufs_device.hh:1231
gem5::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:2091
gem5::UFSHostDevice::UFSHostDeviceStats::totalWrittenSSD
statistics::Scalar totalWrittenSSD
Definition: ufs_device.hh:529
gem5::UFSHostDevice::taskStart::address
Addr address
Definition: ufs_device.hh:484
gem5::UFSHostDevice::transferInfo::filePointer
uint32_t filePointer
Definition: ufs_device.hh:444
gem5::UFSHostDevice::HCIMem::TMUTMRLCLR
uint32_t TMUTMRLCLR
Definition: ufs_device.hh:235
gem5::ArmISA::status
Bitfield< 5, 0 > status
Definition: misc_types.hh:422
gem5::UFSHostDevice::transferStart
Transfer start information.
Definition: ufs_device.hh:467
gem5::UFSHostDevice::transferDoneInfo::size
uint32_t size
Definition: ufs_device.hh:457
gem5::UFSHostDevice::UTPTransferReqDesc
struct UTPTransferReqDesc - UTRD structure header: UTRD header DW-0 to DW-3 commandDescBaseAddrLo: UC...
Definition: ufs_device.hh:351
gem5::UFSHostDevice::UFSSCSIDevice::SCSIModeSense10
@ SCSIModeSense10
Definition: ufs_device.hh:803
gem5::UFSHostDevice::UFSSCSIDevice::SSDWriteStart
void SSDWriteStart()
SSD write start.
Definition: ufs_device.cc:2007
gem5::UFSHostDevice::idlePhaseStart
Tick idlePhaseStart
Definition: ufs_device.hh:1081
gem5::UFSHostDevice::UFSHostDeviceStats::currentSCSIQueue
statistics::Scalar currentSCSIQueue
Queue lengths.
Definition: ufs_device.hh:523
gem5::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:160
gem5::UFSHostDevice::UFSSCSIDevice::SCSINotReady
@ SCSINotReady
Definition: ufs_device.hh:839

Generated on Tue Sep 21 2021 12:25:15 for gem5 by doxygen 1.8.17