72#include "params/UFSHostDevice.hh"
81 uint32_t lun_id,
const Callback &transfer_cb,
113 uint32_t temp_id = ((lun_id | 0x30) << 24) | 0x3A4449;
122 lunInfo.productRevision = 0x01000000;
138 {0x01400A0A, 0x00000000,
141 {0x03800A01, 0x00000000,
144 {0x00011208, 0x00000000,
145 0x00000000, 0x00000020,
183 switch (SCSI_msg[4] & 0xFF) {
204 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
210 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(tempptr);
211 uint64_t read_offset =
betoh(tmp) & 0x1FFFFF;
213 uint32_t read_size = tempptr[4];
219 if ((read_offset + read_size) >
diskSize)
223 read_offset, read_size);
239 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
242 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
243 uint64_t read_offset =
betoh(tmp);
245 uint16_t tmpsize = *
reinterpret_cast<uint16_t*
>(&tempptr[7]);
246 uint32_t read_size =
betoh(tmpsize);
251 if ((read_offset + read_size) >
diskSize)
255 read_offset, read_size);
271 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
274 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
275 uint64_t read_offset =
betoh(tmp);
277 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[6]);
278 read_offset = (read_offset << 32) |
betoh(tmp);
280 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[10]);
281 uint32_t read_size =
betoh(tmp);
286 if ((read_offset + read_size) >
diskSize)
290 read_offset, read_size);
365 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
368 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
369 uint64_t read_offset =
betoh(tmp);
371 uint16_t tmpsize = *
reinterpret_cast<uint16_t*
>(&tempptr[7]);
372 uint32_t read_size =
betoh(tmpsize);
374 if ((read_offset + read_size) >
diskSize)
392 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
398 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(tempptr);
399 uint64_t write_offset =
betoh(tmp) & 0x1FFFFF;
401 uint32_t write_size = tempptr[4];
407 if ((write_offset + write_size) >
diskSize)
411 write_offset, write_size);
424 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
427 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
428 uint64_t write_offset =
betoh(tmp);
430 uint16_t tmpsize = *
reinterpret_cast<uint16_t*
>(&tempptr[7]);
431 uint32_t write_size =
betoh(tmpsize);
437 if ((write_offset + write_size) >
diskSize)
441 write_offset, write_size);
454 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
457 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
458 uint64_t write_offset =
betoh(tmp);
460 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[6]);
461 write_offset = (write_offset << 32) |
betoh(tmp);
463 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[10]);
464 uint32_t write_size =
betoh(tmp);
470 if ((write_offset + write_size) >
diskSize)
474 write_offset, write_size);
516 if ((SCSI_msg[4] & 0x3F0000) >> 16 == 0x0A) {
527 }
else if ((SCSI_msg[4] & 0x3F0000) >> 16 == 0x01) {
540 }
else if ((SCSI_msg[4] & 0x3F0000) >> 16 == 0x08) {
552 }
else if ((SCSI_msg[4] & 0x3F0000) >> 16 == 0x3F) {
573 }
else inform(
"Wrong mode page requested\n");
588 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
591 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
592 uint64_t write_offset =
betoh(tmp) & 0xFFFFFF;
594 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[5]);
595 uint32_t write_size =
betoh(tmp) & 0xFFFFFF;
598 scsi_out.
offset = write_offset;
610 uint8_t* tempptr =
reinterpret_cast<uint8_t*
>(&SCSI_msg[4]);
613 uint32_t tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[2]);
614 uint64_t read_offset =
betoh(tmp) & 0xFFFFFF;
616 tmp = *
reinterpret_cast<uint32_t*
>(&tempptr[5]);
617 uint32_t read_size =
betoh(tmp) & 0xFFFFFF;
620 scsi_out.
offset = read_offset;
657 inform(
"Unsupported scsi message type: %2x\n", SCSI_msg[4] & 0xFF);
658 inform(
"0x%8x\n", SCSI_msg[0]);
659 inform(
"0x%8x\n", SCSI_msg[1]);
660 inform(
"0x%8x\n", SCSI_msg[2]);
661 inform(
"0x%8x\n", SCSI_msg[3]);
662 inform(
"0x%8x\n", SCSI_msg[4]);
677 uint8_t* sensecodelist)
680 sensecodelist[
count] = 0;
682 sensecodelist[0] = 18;
683 sensecodelist[1] = 0x70;
684 sensecodelist[3] =
status & 0xF;
685 sensecodelist[8] = 0x1F;
739 UTPEvent([
this]{ finalUTP(); },
name())
741 DPRINTF(UFSHostDevice,
"The hostcontroller hosts %d Logic units\n",
743 UFSDevice.resize(lunAvail);
747 [
this]() { LUNSignal(); },
748 [
this]() { readCallback(); });
752 warn(
"UFSSlots = %d, this will results in %d command slots",
753 UFSSlots, (UFSSlots & 0x1F));
755 if ((UFSSlots & 0x1F) == 0)
756 fatal(
"Number of UFS command slots should be between 1 and 32.");
765 "Most up to date length of the command queue"),
767 "Most up to date length of the read SSD queue"),
769 "Most up to date length of the write SSD queue"),
772 "Number of bytes read from SSD"),
774 "Number of bytes written to SSD"),
776 "Number of transactions from disk"),
778 "Number of transactions to disk"),
780 "Number of transactions from device"),
782 "Number of transactions to device"),
786 "Average read bandwidth",
790 "Average write bandwidth",
794 "Average command queue length"),
797 "Average read queue length"),
800 "Average write queue length"),
803 "Most up to date number of doorbells used",
806 "Maximum number of doorbells utilized"),
809 "Average number of Doorbells used"),
812 "Histogram of transaction times"),
1060 const uint32_t
data = pkt->
getUintX(ByteOrder::little);
1062 switch (pkt->
getAddr() & 0xFF)
1205 Addr address = 0x00;
1211 transferstart_info.
done = 0;
1243 address = (
count * size) + (address << 32) +
1247 inform(
"UFSmodel received a task from the system; this might"
1248 " lead to untested behaviour.\n");
1252 task_info.
size = size;
1258 reinterpret_cast<uint8_t*
>
1259 (&
taskInfo.back().destination), 0, 0);
1276 " 0x%8x completion info: 0x%8x\n",
UFSHCIMem.TRUTRLDBR,
1286 stats.averageDoorbell =
stats.maxDoorbell.value();
1294 transferstart_info.
address = address;
1295 transferstart_info.
size = size;
1303 transferstart_info.
done);
1309 address, size,
reinterpret_cast<uint8_t*
>
1359 UFSHCIMem.ORHostControllerStatus |= 0x0F;
1371 uint32_t req_pos,
Addr finaladdress, uint32_t
1389 readDevice(
true, finaladdress, finalsize,
reinterpret_cast<uint8_t*
>
1390 (request_in),
true, NULL);
1407 int req_pos,
Addr finaladdress, uint32_t
1408 finalsize, uint32_t done)
1411 Addr cmd_desc_addr = 0x00;
1419 SCSIInfo.finalAddress = finaladdress;
1430 cmd_desc_addr = (cmd_desc_addr << 32) |
1452 uint32_t LUN =
SCSIInfo.destination[2];
1459 if (
UFSDevice[LUN]->SCSIInfoQueue.size() < 2)
1462 else if (
UFSDevice[LUN]->SCSIInfoQueue.size() > 32)
1464 SCSIInfoQueue.size());
1497 if (
UFSDevice[lun_id]->SCSIInfoQueue.empty())
1498 panic(
"No SCSI message scheduled lun:%d Doorbell: 0x%8x", lun_id,
1503 SCSIInfoQueue.front().RequestIn;
1505 uint32_t req_pos =
UFSDevice[lun_id]->SCSIInfoQueue.front().reqPos;
1507 Addr finaladdress =
UFSDevice[lun_id]->SCSIInfoQueue.front().
1510 uint32_t finalsize =
UFSDevice[lun_id]->SCSIInfoQueue.front().finalSize;
1512 uint32_t* transfercommand =
reinterpret_cast<uint32_t*
>
1518 SCSICMDHandle(transfercommand);
1528 UFSDevice[lun_id]->transferInfo.requestOut.header.dWord0 =
1530 | (transfercommand[0] & 0xFF000000);
1532 UFSDevice[lun_id]->transferInfo.requestOut.header.dWord1 = 0x00000000 |
1535 UFSDevice[lun_id]->transferInfo.requestOut.header.dWord2 = 0x00000000 |
1538 UFSDevice[lun_id]->transferInfo.requestOut.senseDataLen =
1559 response_addr = (response_addr << 32) |
1564 UFSDevice[lun_id]->transferInfo.responseStartAddr = response_addr;
1565 UFSDevice[lun_id]->transferInfo.reqPos = req_pos;
1566 UFSDevice[lun_id]->transferInfo.size = finalsize;
1567 UFSDevice[lun_id]->transferInfo.address = finaladdress;
1568 UFSDevice[lun_id]->transferInfo.destination =
reinterpret_cast<uint8_t*
>
1569 (
UFSDevice[lun_id]->SCSIInfoQueue.front().RequestIn);
1570 UFSDevice[lun_id]->transferInfo.finished =
true;
1591 uint32_t size_accum = 0;
1596 while ((length >
count) && size_accum
1600 SCSI_start = (SCSI_start << 32) |
1601 (sglist[
count].baseAddr & 0xFFFFFFFF);
1604 (sglist[
count].size + 1));
1612 uint32_t size_to_send = sglist[
count].
size + 1;
1618 reinterpret_cast<uint8_t*
>
1622 size_accum += size_to_send;
1634 reinterpret_cast<uint8_t*
>(request_in),
true, lun_id);
1648 uint8_t this_lun = 0;
1659 UFSDevice[this_lun]->transferInfo.reqPos,
1660 UFSDevice[this_lun]->transferInfo.requestOut,
1662 UFSDevice[this_lun]->transferInfo.address,
1663 UFSDevice[this_lun]->transferInfo.destination,
1664 UFSDevice[this_lun]->transferInfo.finished,
1665 UFSDevice[this_lun]->transferInfo.lunID);
1679 struct UTPUPIURSP request_out, uint32_t size,
1681 bool finished, uint32_t lun_id)
1684 if (
UFSDevice[lun_id]->SCSIInfoQueue.empty())
1685 panic(
"No SCSI message scheduled lun:%d Doorbell: 0x%8x", lun_id,
1689 responseStartAddr,
sizeof(request_out));
1692 lastinfo.
mask = req_pos;
1693 lastinfo.
done = finished;
1695 lastinfo.
size = size;
1698 lastinfo.
lun_id = lun_id;
1704 readDevice(
false, responseStartAddr,
sizeof(request_out),
1705 reinterpret_cast<uint8_t*
>
1721 UFSDevice[lun_id]->SCSIInfoQueue.pop_front();
1723 UFSDevice[lun_id]->SCSIInfoQueue.size(), lun_id);
1736 transferEnd.front().size,
reinterpret_cast<uint8_t*
>
1748 stats.averageDoorbell =
stats.maxDoorbell.value();
1755 if (!
UFSDevice[lun_id]->SCSIInfoQueue.empty())
1775 if (!(
UFSHCIMem.ORInterruptStatus & 0x01)) {
1854 SCSIDiskOffset, uint32_t lun_id)
1874 new_transfer.
offset = SCSIDiskOffset;
1875 new_transfer.
size = size;
1876 new_transfer.
lunID = lun_id;
1891 assert(!additional_action->
scheduled());
1912 UFSDevice[LUN]->setTotalWrite(sg_table_length);
1920 next_packet.
start = (next_packet.
start << 32) |
1921 (sglist[
count].baseAddr & 0xFFFFFFFF);
1922 next_packet.
LUN = LUN;
1926 (sglist[
count].size + 1));
1927 assert(sglist[
count].size > 0);
1954 ++
stats.totalWriteUFSTransactions;
1973 UFSDevice[lun]->SSDWriteDoneInfo.size());
1992 stats.currentWriteSSDQueue =
UFSDevice[lun]->SSDWriteDoneInfo.size();
1993 stats.averageWriteSSDQueue =
UFSDevice[lun]->SSDWriteDoneInfo.size();
1994 ++
stats.totalWriteDiskTransactions;
2063 start, size, (
reinterpret_cast<uint32_t *
>(
destination))[0]);
2077 if (additional_action != NULL)
2078 assert(!additional_action->
scheduled());
2094 offset, uint32_t sg_table_length,
2097 uint32_t size_accum = 0;
2109 (sglist[
count].baseAddr & 0xFFFFFFFF);
2112 new_transfer.
lunID = LUN;
2117 UFSDevice[LUN]->SSDReadInfo.push_back(new_transfer);
2118 UFSDevice[LUN]->SSDReadInfo.back().buffer.resize(sglist[
count].size
2127 SSDReadInfo.back().buffer[0],
2134 " 0x%8x\n", (
count + 1), (size-size_accum), size_accum);
2142 UFSDevice[LUN]->SSDReadStart(sg_table_length);
2145 ++
stats.totalReadUFSTransactions;
2161 for (uint32_t number_handled = 0; number_handled <
SSDReadInfo.size();
2223 uint8_t this_lun = 0;
2236 UFSDevice[this_lun]->SSDReadInfo.pop_front();
2247 ++
stats.totalReadDiskTransactions;
2274 const uint8_t* temp_HCI_mem =
reinterpret_cast<const uint8_t*
>(&
UFSHCIMem);
2290 uint8_t* temp_HCI_mem =
reinterpret_cast<uint8_t*
>(&
UFSHCIMem);
void serialize(CheckpointOut &cp) const override
Serialize an object.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
DmaDevice(const Params &p)
void setLE(T v)
Set the value in the data pointer to v as little endian.
void makeResponse()
Take a request packet and modify it in place to be suitable for returning as a response to that reque...
uint64_t getUintX(ByteOrder endian) const
Get the data in the packet byte swapped from the specified endianness and zero-extended to 64 bits.
static const unsigned int cachingPage[5]
void SSDWriteStart()
SSD write start.
Callback memWriteCallback
void SSDReadDone()
SSD Read done; Determines if the final callback of the transaction should be made at the end of a rea...
static const unsigned int controlPage[3]
These pages are SCSI specific.
std::function< void()> Callback
const uint32_t capacityLower
void setSignal()
set signal to indicate that the transaction has been completed.
UFSSCSIDevice(const UFSHostDeviceParams &p, uint32_t lun_id, const Callback &transfer_cb, const Callback &read_cb)
Constructor and destructor.
bool transferCompleted
Signals to Host layer 1: signal for transaction completion 2: signal for read action completion.
void writeFlash(uint8_t *writeaddr, uint64_t offset, uint32_t size)
Write flash.
static const unsigned int UPIUHeaderDataIndWord0
std::deque< struct transferInfo > SSDWriteDoneInfo
SSDWriteDoneInfo: Structure from dma to disk, that contains data, and helper info to get it to the ri...
void readFlash(uint8_t *readaddr, uint64_t offset, uint32_t size)
Disk access functions.
void statusCheck(uint8_t status, uint8_t *sensecodelist)
Status of SCSI.
Callback deviceReadCallback
const uint32_t blkSize
Logic unit dimensions.
void setReadSignal()
set signal to indicate that the read action has been completed
uint32_t amountOfReadTransfers
Callback signalDone
Callbacks between Host and Device.
std::deque< struct transferInfo > SSDReadInfo
SSDReadInfo: Structure from disk to dma, that contains data, and helper info to get it to the right p...
Callback memReadCallback
Callbacks between Device and Memory.
static const unsigned int recoveryPage[3]
DiskImage * flashDisk
The objects this model links to.
struct SCSIReply SCSICMDHandle(uint32_t *SCSI_msg)
SCSI command handle function; determines what the command is and returns a reply structure that allow...
AbstractNVM * flashDevice
struct LUNInfo lunInfo
Logic unit info; needed for SCSI Info messages and LU identification.
static const unsigned int UPIUHeaderDataIndWord2
void readCallback()
Functions to indicate that the action to the SSD has completed.
static const unsigned int UPIUHeaderDataIndWord1
uint32_t totalRead
Total amount transactions that need to be made.
const uint32_t capacityUpper
void SSDReadStart(uint32_t total_read)
Start the transactions to (and from) the disk The host will queue all the transactions.
uint32_t amountOfWriteTransfers
transaction progress tracking
void SSDWriteDone()
SSD Write Done; This is the callback function for the memory model.
int readPendingNum
Track number of DMA transactions in progress.
void taskHandler(struct UTPUPIUTaskReq *request_in, uint32_t req_pos, Addr finaladdress, uint32_t finalsize)
Task handler function.
std::deque< EventFunctionWrapper > taskEventQueue
Multiple tasks transfers can be scheduled at once for the device, the only thing we know for sure abo...
@ regUICErrorCodePHYAdapterLayer
@ regUTPTransferREQListBaseH
@ regUTPTaskREQListRunStop
@ regControllerCapabilities
@ regUICErrorCodeDataLinkLayer
@ regUICErrorCodeNetworkLayer
@ regUTPTransferREQListBaseL
@ regUTPTransferREQListClear
@ regUICErrorCodeTransportLayer
@ regUTPTransferREQListRunStop
@ regUTPTransferREQINTAGGControl
@ regUTPTransferREQDoorbell
void generateInterrupt()
set interrupt and sort out the doorbell register.
void writeDone()
Write done After a DMA write with data intended for the disk, this function is called.
std::deque< struct taskStart > taskInfo
When a task/transfer is started it needs information about the task/transfer it is about to perform.
std::deque< struct transferInfo > SSDWriteinfo
Information from DMA transaction to disk.
static const unsigned int UICCommandReady
std::deque< EventFunctionWrapper > transferEventQueue
EventFunctionWrapper SCSIResumeEvent
The events that control the functionality.
void serialize(CheckpointOut &cp) const override
Serialize; needed to make checkpoints.
void transferHandler(struct UTPTransferReqDesc *request_in, int req_pos, Addr finaladdress, uint32_t finalsize, uint32_t done)
Transfer handler function.
Tick transactionStart[32]
Helper for latency stats These variables keep track of the latency for every doorbell.
const Addr pioAddr
Host controller information.
void commandHandler()
Command handler function.
HCIMem UFSHCIMem
Host controller memory.
struct SCSIReply request_out_datain
SCSI reply structure, used for direct answering.
static const unsigned int UTPTaskREQCOMPL
void clearInterrupt()
Interrupt control functions.
static const unsigned int UTPTransferREQCOMPL
Bits of interest within UFS data packages.
static const unsigned int UICCommandCOMPL
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...
void finalUTP()
final UTP, sends the last acknowledge data structure to the system; prepares the clean up functions.
std::deque< struct writeToDiskBurst > dmaWriteInfo
Information to get a DMA transaction.
uint32_t transferTrack
Track the transfer This is allows the driver to "group" certain transfers together by using a tag in ...
DrainState drain() override
Drain; needed to enable checkpoints.
void setValues()
Initialization function.
void requestHandler()
Handler functions.
void unserialize(CheckpointIn &cp) override
Unserialize; needed to restore from checkpoints.
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...
struct SCSIResumeInfo SCSIInfo
SCSI resume info information structure for SCSI resume.
Tick read(PacketPtr pkt) override
register access functions
struct UFSHostDeviceStats stats
RequestHandler stats.
void readGarbage()
Read garbage A read from disk data structure can vary in size and is therefor allocated on creation.
std::deque< struct transferStart > transferEnd
To finish the transaction one needs information about the original message.
std::deque< EventFunctionWrapper > readDoneEvent
Transfer flow events Basically these events form two queues, one from memory to UFS device (DMA) and ...
uint32_t countInt
interrupt verification This keeps track of the number of interrupts generated.
std::deque< struct UTPTransferReqDesc * > garbage
garbage queue, ensure clearing of the allocated memory
uint8_t activeDoorbells
Statistics helper variables Active doorbells indicates how many doorbells are in teh process of being...
void manageReadTransfer(uint32_t size, uint32_t LUN, uint64_t offset, uint32_t sg_table_length, struct UFSHCDSGEntry *sglist)
Manage read transfer.
std::vector< UFSSCSIDevice * > UFSDevice
logic units connected to the UFS Host device Note again that the "device" as such is represented by o...
std::deque< struct transferInfo > SSDReadPending
Information from the Disk, waiting to be pushed to the DMA.
void SCSIResume(uint32_t lun_id)
Starts the scsi handling function in the apropriate Logic unit, prepares the right data transfer sche...
std::deque< EventFunctionWrapper > writeDoneEvent
Tick write(PacketPtr pkt) override
UFSHCD write function.
std::deque< struct transferStart > transferStartInfo
AddrRangeList getAddrRanges() const override
Address range functions.
std::deque< EventFunctionWrapper > readGarbageEventQueue
Event after a read to clean up the UTP data structures.
EventFunctionWrapper UTPEvent
Wait for the moment where we can send the last frame.
void readCallback()
Read callback Call back function for the logic units to indicate the completion of a read action.
UFSHostDevice(const UFSHostDeviceParams &p)
Constructor for the UFS Host device.
void transferStart()
Transfer Start function.
void taskStart()
Task Start function.
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.
void LUNSignal()
LU callback function to indicate that the action has completed.
void readDone()
Read done Started at the end of a transaction after the last read action.
void readDevice(bool lastTransfer, Addr SCSIStart, uint32_t SCSISize, uint8_t *SCSIDestination, bool no_cache, Event *additional_action)
Dma transaction function: read device.
void checkDrain()
Checkdrain; needed to enable checkpoints.
void SCSIStart()
Transfer SCSI function.
uint32_t taskCommandTrack
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
AddrRange RangeSize(Addr start, Addr size)
std::list< AddrRange > AddrRangeList
Convenience typedef for a collection of address ranges.
constexpr int findLsbSet(uint64_t val)
Returns the bit position of the LSB that is set in the input That function will either use a builtin ...
void signalDrainDone() const
Signal that an object is drained.
DrainState drainState() const
Return the current drain state of an object.
DrainState
Object drain/handover states.
@ Draining
Draining buffers pending serialization/handover.
@ Drained
Buffers drained, ready for serialization/handover.
bool scheduled() const
Determine if the current event is scheduled.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
#define UNSERIALIZE_ARRAY(member, size)
#define SERIALIZE_ARRAY(member, size)
SimObject(const Params &p)
const FlagsType pdf
Print the percent of the total that this entry represents.
const FlagsType nozero
Don't print if this is zero.
const FlagsType none
Nothing extra to print.
Copyright (c) 2024 Arm Limited All rights reserved.
Tick curTick()
The universal simulation clock.
std::ostream CheckpointOut
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
uint64_t Tick
Tick count type.
statistics::Formula & simSeconds
#define UNSERIALIZE_SCALAR(scalar)
#define SERIALIZE_SCALAR(scalar)
Host Controller Interface This is a set of registers that allow the driver to control the transaction...
struct UPIUMessage message
struct UFSHCDSGEntry - UFSHCI PRD Entry baseAddr: Lower 32bit physical address DW-0 upperAddr: Upper ...
statistics::Scalar maxDoorbell
statistics::Formula averageWriteSSDBW
statistics::Average averageSCSIQueue
Average Queue lengths.
statistics::Scalar currentReadSSDQueue
statistics::Scalar totalWriteUFSTransactions
statistics::Formula averageReadSSDBW
Average bandwidth for reads and writes.
statistics::Average averageReadSSDQueue
statistics::Scalar totalReadDiskTransactions
statistics::Scalar totalWriteDiskTransactions
UFSHostDeviceStats(UFSHostDevice *parent)
Amount of data read/written.
statistics::Average averageDoorbell
statistics::Average averageWriteSSDQueue
statistics::Histogram transactionLatency
Histogram of latencies.
statistics::Scalar totalWrittenSSD
statistics::Scalar totalReadSSD
Amount of data read/written.
statistics::Formula curDoorbell
Number of doorbells rung.
statistics::Scalar currentSCSIQueue
Queue lengths.
statistics::Scalar totalReadUFSTransactions
statistics::Scalar currentWriteSSDQueue
statistics::Histogram idleTimes
std::vector< uint32_t > dataMsg
struct UTPUPIUHeader header
struct UTPTransferReqDesc - UTRD structure header: UTRD header DW-0 to DW-3 commandDescBaseAddrLo: UC...
struct gem5::UFSHostDevice::UTPTransferReqDesc::RequestDescHeader header
uint32_t commandDescBaseAddrLo
uint32_t commandDescBaseAddrHi
uint16_t responseUPIULength
struct UTPUPIURSP - Response UPIU structure header: UPIU header DW-0 to DW-2 residualTransferCount: R...
struct UTPUPIUTaskReq - Task request UPIU structure header - UPIU header structure DW0 to DW-2 inputP...
struct UTPUPIUHeader header
Different events, and scenarios require different types of information.
Transfer start information.
struct UTPTransferReqDesc * destination
Disk transfer burst information.
const std::string & name()
This is a base class for UFS devices The UFS interface consists out of one host controller which conn...