gem5  v22.0.0.2
Public Member Functions | Private Attributes | List of all members
gem5::PM4PacketProcessor Class Reference

#include <pm4_packet_processor.hh>

Inheritance diagram for gem5::PM4PacketProcessor:
gem5::DmaVirtDevice gem5::DmaDevice gem5::PioDevice gem5::ClockedObject gem5::SimObject gem5::Clocked gem5::EventManager gem5::Serializable gem5::Drainable gem5::statistics::Group gem5::Named

Public Member Functions

 PM4PacketProcessor (const PM4PacketProcessorParams &p)
 
void setGPUDevice (AMDGPUDevice *gpu_device)
 
Tick write (PacketPtr pkt) override
 Inherited methods. More...
 
Tick read (PacketPtr pkt) override
 Pure virtual function that the device must implement. More...
 
AddrRangeList getAddrRanges () const override
 Every PIO device is obliged to provide an implementation that returns the address ranges the device responds to. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
TranslationGenPtr translate (Addr vaddr, Addr size) override
 Method for functional translation. More...
 
uint32_t getKiqDoorbellOffset ()
 
uint32_t getPqDoorbellOffset ()
 
Addr getGARTAddr (Addr addr) const
 
PM4QueuegetQueue (Addr offset, bool gfx=false)
 Based on an offset communicated through doorbell write, the PM4PacketProcessor identifies which queue needs processing. More...
 
void mapPq (Addr offset)
 The first graphics queue, the Primary Queueu a.k.a. More...
 
void mapKiq (Addr offset)
 The first compute queue, the Kernel Interface Queueu a.k.a. More...
 
void newQueue (QueueDesc *q, Addr offset, PM4MapQueues *pkt=nullptr, int id=-1)
 This method creates a new PM4Queue based on a queue descriptor and an offset. More...
 
void process (PM4Queue *q, Addr wptrOffset)
 This method start processing a PM4Queue from the current read pointer to the newly communicated write pointer (i.e., wptrOffset). More...
 
void updateReadIndex (Addr offset, uint64_t rd_idx)
 Update read index on doorbell rings. More...
 
void decodeNext (PM4Queue *q)
 This method decodes the next packet in a PM4Queue. More...
 
void decodeHeader (PM4Queue *q, PM4Header header)
 This method calls other PM4 packet processing methods based on the header of a PM4 packet. More...
 
void writeData (PM4Queue *q, PM4WriteData *pkt)
 
void writeDataDone (PM4Queue *q, PM4WriteData *pkt, Addr addr)
 
void mapQueues (PM4Queue *q, PM4MapQueues *pkt)
 
void unmapQueues (PM4Queue *q, PM4UnmapQueues *pkt)
 
void doneMQDWrite (Addr mqdAddr, Addr addr)
 
void mapProcess (PM4Queue *q, PM4MapProcess *pkt)
 
void processMQD (PM4MapQueues *pkt, PM4Queue *q, Addr addr, QueueDesc *mqd, uint16_t vmid)
 
void processSDMAMQD (PM4MapQueues *pkt, PM4Queue *q, Addr addr, SDMAQueueDesc *mqd, uint16_t vmid)
 
void releaseMem (PM4Queue *q, PM4ReleaseMem *pkt)
 
void releaseMemDone (PM4Queue *q, PM4ReleaseMem *pkt, Addr addr)
 
void runList (PM4Queue *q, PM4RunList *pkt)
 
void indirectBuffer (PM4Queue *q, PM4IndirectBuf *pkt)
 
void switchBuffer (PM4Queue *q, PM4SwitchBuf *pkt)
 
void setUconfigReg (PM4Queue *q, PM4SetUconfigReg *pkt)
 
void waitRegMem (PM4Queue *q, PM4WaitRegMem *pkt)
 
void queryStatus (PM4Queue *q, PM4QueryStatus *pkt)
 
void queryStatusDone (PM4Queue *q, PM4QueryStatus *pkt)
 
void writeMMIO (PacketPtr pkt, Addr mmio_offset)
 
void setHqdVmid (uint32_t data)
 
void setHqdActive (uint32_t data)
 
void setHqdPqBase (uint32_t data)
 
void setHqdPqBaseHi (uint32_t data)
 
void setHqdPqDoorbellCtrl (uint32_t data)
 
void setHqdPqPtr (uint32_t data)
 
void setHqdPqWptrLo (uint32_t data)
 
void setHqdPqWptrHi (uint32_t data)
 
void setHqdPqRptrReportAddr (uint32_t data)
 
void setHqdPqRptrReportAddrHi (uint32_t data)
 
void setHqdPqWptrPollAddr (uint32_t data)
 
void setHqdPqWptrPollAddrHi (uint32_t data)
 
void setHqdIbCtrl (uint32_t data)
 
void setRbVmid (uint32_t data)
 
void setRbCntl (uint32_t data)
 
void setRbWptrLo (uint32_t data)
 
void setRbWptrHi (uint32_t data)
 
void setRbRptrAddrLo (uint32_t data)
 
void setRbRptrAddrHi (uint32_t data)
 
void setRbWptrPollAddrLo (uint32_t data)
 
void setRbWptrPollAddrHi (uint32_t data)
 
void setRbBaseLo (uint32_t data)
 
void setRbBaseHi (uint32_t data)
 
void setRbDoorbellCntrl (uint32_t data)
 
void setRbDoorbellRangeLo (uint32_t data)
 
void setRbDoorbellRangeHi (uint32_t data)
 
- Public Member Functions inherited from gem5::DmaVirtDevice
 DmaVirtDevice (const Params &p)
 
virtual ~DmaVirtDevice ()
 
void dmaReadVirt (Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
 Initiate a DMA read from virtual address host_addr. More...
 
void dmaWriteVirt (Addr host_addr, unsigned size, DmaCallback *b, void *data, Tick delay=0)
 Initiate a DMA write from virtual address host_addr. More...
 
void dmaVirt (DmaFnPtr dmaFn, Addr host_addr, unsigned size, DmaCallback *cb, void *data, Tick delay=0)
 Initiate a call to DmaDevice using DmaFnPtr do a DMA starting from virtual address host_addr for size number of bytes on the data. More...
 
- Public Member Functions inherited from gem5::DmaDevice
 DmaDevice (const Params &p)
 
virtual ~DmaDevice ()=default
 
void dmaWrite (Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
 
void dmaWrite (Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
 
void dmaRead (Addr addr, int size, Event *event, uint8_t *data, uint32_t sid, uint32_t ssid, Tick delay=0)
 
void dmaRead (Addr addr, int size, Event *event, uint8_t *data, Tick delay=0)
 
bool dmaPending () const
 
void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
unsigned int cacheBlockSize () const
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port with a given name and index. More...
 
- Public Member Functions inherited from gem5::PioDevice
 PioDevice (const Params &p)
 
virtual ~PioDevice ()
 
void init () override
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
PortgetPort (const std::string &if_name, PortID idx=InvalidPortID) override
 Get a port with a given name and index. More...
 
- Public Member Functions inherited from gem5::ClockedObject
 ClockedObject (const ClockedObjectParams &p)
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::SimObject
const Paramsparams () const
 
 SimObject (const Params &p)
 
virtual ~SimObject ()
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void regProbePoints ()
 Register probe points for this object. More...
 
virtual void regProbeListeners ()
 Register probe listeners for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from gem5::EventManager
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick) -1)
 This function is not needed by the usual gem5 event loop but may be necessary in derived EventQueues which host gem5 on other schedulers. More...
 
void setCurTick (Tick newVal)
 
 EventManager (EventManager &em)
 Event manger manages events in the event queue. More...
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from gem5::Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 
- Public Member Functions inherited from gem5::statistics::Group
 Group (Group *parent, const char *name=nullptr)
 Construct a new statistics group. More...
 
virtual ~Group ()
 
virtual void regStats ()
 Callback to set stat parameters. More...
 
virtual void resetStats ()
 Callback to reset stats. More...
 
virtual void preDumpStats ()
 Callback before stats are dumped. More...
 
void addStat (statistics::Info *info)
 Register a stat with this group. More...
 
const std::map< std::string, Group * > & getStatGroups () const
 Get all child groups associated with this object. More...
 
const std::vector< Info * > & getStats () const
 Get all stats associated with this object. More...
 
void addStatGroup (const char *name, Group *block)
 Add a stat block as a child of this block. More...
 
const InforesolveStat (std::string name) const
 Resolve a stat by its name within this group. More...
 
void mergeStatGroup (Group *block)
 Merge the contents (stats & children) of a block to this block. More...
 
 Group ()=delete
 
 Group (const Group &)=delete
 
Groupoperator= (const Group &)=delete
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 
- Public Member Functions inherited from gem5::Clocked
void updateClockPeriod ()
 Update the tick to the current tick. More...
 
Tick clockEdge (Cycles cycles=Cycles(0)) const
 Determine the tick when a cycle begins, by default the current one, but the argument also enables the caller to determine a future cycle. More...
 
Cycles curCycle () const
 Determine the current cycle, corresponding to a tick aligned to a clock edge. More...
 
Tick nextCycle () const
 Based on the clock of the object, determine the start tick of the first cycle that is at least one cycle in the future. More...
 
uint64_t frequency () const
 
Tick clockPeriod () const
 
double voltage () const
 
Cycles ticksToCycles (Tick t) const
 
Tick cyclesToTicks (Cycles c) const
 

Private Attributes

AMDGPUDevicegpuDevice
 
PrimaryQueue pq
 
QueueDesc kiq
 
std::unordered_map< uint16_t, PM4Queue * > queues
 
std::unordered_map< uint32_t, PM4Queue * > queuesMap
 

Additional Inherited Members

- Public Types inherited from gem5::DmaVirtDevice
typedef void(DmaDevice::* DmaFnPtr) (Addr, int, Event *, uint8_t *, Tick)
 
- Public Types inherited from gem5::DmaDevice
typedef DmaDeviceParams Params
 
- Public Types inherited from gem5::PioDevice
using Params = PioDeviceParams
 
- Public Types inherited from gem5::ClockedObject
using Params = ClockedObjectParams
 Parameters of ClockedObject. More...
 
- Public Types inherited from gem5::SimObject
typedef SimObjectParams Params
 
- Static Public Member Functions inherited from gem5::SimObject
static void serializeAll (const std::string &cpt_dir)
 Create a checkpoint by serializing all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
static void setSimObjectResolver (SimObjectResolver *resolver)
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
static SimObjectResolvergetSimObjectResolver ()
 There is a single object name resolver, and it is only set when simulation is restoring from checkpoints. More...
 
- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section. More...
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it. More...
 
- Public Attributes inherited from gem5::ClockedObject
PowerStatepowerState
 
- Protected Member Functions inherited from gem5::Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Member Functions inherited from gem5::Clocked
 Clocked (ClockDomain &clk_domain)
 Create a clocked object and set the clock domain based on the parameters. More...
 
 Clocked (Clocked &)=delete
 
Clockedoperator= (Clocked &)=delete
 
virtual ~Clocked ()
 Virtual destructor due to inheritance. More...
 
void resetClock () const
 Reset the object's clock using the current global tick value. More...
 
virtual void clockPeriodUpdated ()
 A hook subclasses can implement so they can do any extra work that's needed when the clock rate is changed. More...
 
- Protected Attributes inherited from gem5::DmaDevice
DmaPort dmaPort
 
- Protected Attributes inherited from gem5::PioDevice
Systemsys
 
PioPort< PioDevicepioPort
 The pioPort that handles the requests for us and provides us requests that it sees. More...
 
- Protected Attributes inherited from gem5::SimObject
const SimObjectParams & _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from gem5::EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Detailed Description

Definition at line 52 of file pm4_packet_processor.hh.

Constructor & Destructor Documentation

◆ PM4PacketProcessor()

gem5::PM4PacketProcessor::PM4PacketProcessor ( const PM4PacketProcessorParams &  p)

Definition at line 49 of file pm4_packet_processor.cc.

References kiq, and pq.

Member Function Documentation

◆ decodeHeader()

void gem5::PM4PacketProcessor::decodeHeader ( PM4Queue q,
PM4Header  header 
)

◆ decodeNext()

void gem5::PM4PacketProcessor::decodeNext ( PM4Queue q)

◆ doneMQDWrite()

void gem5::PM4PacketProcessor::doneMQDWrite ( Addr  mqdAddr,
Addr  addr 
)

Definition at line 602 of file pm4_packet_processor.cc.

References gem5::X86ISA::addr, and DPRINTF.

Referenced by unmapQueues().

◆ getAddrRanges()

AddrRangeList gem5::PM4PacketProcessor::getAddrRanges ( ) const
overridevirtual

Every PIO device is obliged to provide an implementation that returns the address ranges the device responds to.

Returns
a list of non-overlapping address ranges

Implements gem5::PioDevice.

Definition at line 77 of file pm4_packet_processor.cc.

◆ getGARTAddr()

Addr gem5::PM4PacketProcessor::getGARTAddr ( Addr  addr) const

◆ getKiqDoorbellOffset()

uint32_t gem5::PM4PacketProcessor::getKiqDoorbellOffset ( )
inline

Definition at line 83 of file pm4_packet_processor.hh.

References gem5::GEM5_PACKED::doorbell, and kiq.

Referenced by writeMMIO().

◆ getPqDoorbellOffset()

uint32_t gem5::PM4PacketProcessor::getPqDoorbellOffset ( )
inline

Definition at line 84 of file pm4_packet_processor.hh.

References gem5::PrimaryQueue::doorbellOffset, and pq.

Referenced by writeMMIO().

◆ getQueue()

PM4Queue * gem5::PM4PacketProcessor::getQueue ( Addr  offset,
bool  gfx = false 
)

Based on an offset communicated through doorbell write, the PM4PacketProcessor identifies which queue needs processing.

Definition at line 100 of file pm4_packet_processor.cc.

References mapKiq(), mapPq(), gem5::ArmISA::offset, and queuesMap.

Referenced by gem5::AMDGPUDevice::writeDoorbell().

◆ indirectBuffer()

void gem5::PM4PacketProcessor::indirectBuffer ( PM4Queue q,
PM4IndirectBuf pkt 
)

◆ mapKiq()

void gem5::PM4PacketProcessor::mapKiq ( Addr  offset)

The first compute queue, the Kernel Interface Queueu a.k.a.

KIQ, needs to be mapped since all queue details are communicated through MMIOs to special registers.

Definition at line 114 of file pm4_packet_processor.cc.

References DPRINTF, kiq, newQueue(), and gem5::ArmISA::offset.

Referenced by getQueue().

◆ mapPq()

void gem5::PM4PacketProcessor::mapPq ( Addr  offset)

The first graphics queue, the Primary Queueu a.k.a.

RB0, needs to be mapped since all queue details are communicated through MMIOs to special registers.

Definition at line 121 of file pm4_packet_processor.cc.

References DPRINTF, newQueue(), gem5::ArmISA::offset, and pq.

Referenced by getQueue().

◆ mapProcess()

void gem5::PM4PacketProcessor::mapProcess ( PM4Queue q,
PM4MapProcess pkt 
)

◆ mapQueues()

void gem5::PM4PacketProcessor::mapQueues ( PM4Queue q,
PM4MapQueues pkt 
)

◆ newQueue()

void gem5::PM4PacketProcessor::newQueue ( QueueDesc q,
Addr  offset,
PM4MapQueues pkt = nullptr,
int  id = -1 
)

◆ process()

void gem5::PM4PacketProcessor::process ( PM4Queue q,
Addr  wptrOffset 
)

This method start processing a PM4Queue from the current read pointer to the newly communicated write pointer (i.e., wptrOffset).

Definition at line 152 of file pm4_packet_processor.cc.

References decodeNext(), and gem5::ArmISA::q.

Referenced by gem5::AMDGPUDevice::writeDoorbell().

◆ processMQD()

void gem5::PM4PacketProcessor::processMQD ( PM4MapQueues pkt,
PM4Queue q,
Addr  addr,
QueueDesc mqd,
uint16_t  vmid 
)

◆ processSDMAMQD()

void gem5::PM4PacketProcessor::processSDMAMQD ( PM4MapQueues pkt,
PM4Queue q,
Addr  addr,
SDMAQueueDesc mqd,
uint16_t  vmid 
)

◆ queryStatus()

void gem5::PM4PacketProcessor::queryStatus ( PM4Queue q,
PM4QueryStatus pkt 
)

◆ queryStatusDone()

void gem5::PM4PacketProcessor::queryStatusDone ( PM4Queue q,
PM4QueryStatus pkt 
)

Definition at line 722 of file pm4_packet_processor.cc.

References decodeNext(), DPRINTF, and gem5::ArmISA::q.

Referenced by queryStatus().

◆ read()

Tick gem5::PM4PacketProcessor::read ( PacketPtr  pkt)
inlineoverridevirtual

Pure virtual function that the device must implement.

Called when a read command is recieved by the port.

Parameters
pktPacket describing this request
Returns
number of ticks it took to complete

Implements gem5::PioDevice.

Definition at line 73 of file pm4_packet_processor.hh.

◆ releaseMem()

void gem5::PM4PacketProcessor::releaseMem ( PM4Queue q,
PM4ReleaseMem pkt 
)

◆ releaseMemDone()

void gem5::PM4PacketProcessor::releaseMemDone ( PM4Queue q,
PM4ReleaseMem pkt,
Addr  addr 
)

◆ runList()

void gem5::PM4PacketProcessor::runList ( PM4Queue q,
PM4RunList pkt 
)

◆ serialize()

void gem5::PM4PacketProcessor::serialize ( CheckpointOut cp) const
overridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 979 of file pm4_packet_processor.cc.

References gem5::X86ISA::base, gem5::ArmISA::i, gem5::ArmISA::offset, gem5::ArmISA::q, queues, gem5::ClockedObject::serialize(), SERIALIZE_ARRAY, and SERIALIZE_SCALAR.

◆ setGPUDevice()

void gem5::PM4PacketProcessor::setGPUDevice ( AMDGPUDevice gpu_device)

Definition at line 84 of file pm4_packet_processor.cc.

References gpuDevice.

Referenced by gem5::AMDGPUDevice::AMDGPUDevice().

◆ setHqdActive()

void gem5::PM4PacketProcessor::setHqdActive ( uint32_t  data)

Definition at line 828 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_active, and kiq.

Referenced by writeMMIO().

◆ setHqdIbCtrl()

void gem5::PM4PacketProcessor::setHqdIbCtrl ( uint32_t  data)

Definition at line 894 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_ib_control, and kiq.

Referenced by writeMMIO().

◆ setHqdPqBase()

void gem5::PM4PacketProcessor::setHqdPqBase ( uint32_t  data)

Definition at line 834 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_base_lo, and kiq.

Referenced by writeMMIO().

◆ setHqdPqBaseHi()

void gem5::PM4PacketProcessor::setHqdPqBaseHi ( uint32_t  data)

Definition at line 840 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_base_hi, and kiq.

Referenced by writeMMIO().

◆ setHqdPqDoorbellCtrl()

void gem5::PM4PacketProcessor::setHqdPqDoorbellCtrl ( uint32_t  data)

Definition at line 846 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_doorbell_control, and kiq.

Referenced by writeMMIO().

◆ setHqdPqPtr()

void gem5::PM4PacketProcessor::setHqdPqPtr ( uint32_t  data)

Definition at line 852 of file pm4_packet_processor.cc.

References data, kiq, and gem5::GEM5_PACKED::rptr.

Referenced by writeMMIO().

◆ setHqdPqRptrReportAddr()

void gem5::PM4PacketProcessor::setHqdPqRptrReportAddr ( uint32_t  data)

Definition at line 870 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_rptr_report_addr_lo, and kiq.

Referenced by writeMMIO().

◆ setHqdPqRptrReportAddrHi()

void gem5::PM4PacketProcessor::setHqdPqRptrReportAddrHi ( uint32_t  data)

Definition at line 876 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_rptr_report_addr_hi, and kiq.

Referenced by writeMMIO().

◆ setHqdPqWptrHi()

void gem5::PM4PacketProcessor::setHqdPqWptrHi ( uint32_t  data)

Definition at line 864 of file pm4_packet_processor.cc.

Referenced by writeMMIO().

◆ setHqdPqWptrLo()

void gem5::PM4PacketProcessor::setHqdPqWptrLo ( uint32_t  data)

Definition at line 858 of file pm4_packet_processor.cc.

Referenced by writeMMIO().

◆ setHqdPqWptrPollAddr()

void gem5::PM4PacketProcessor::setHqdPqWptrPollAddr ( uint32_t  data)

Definition at line 882 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_wptr_poll_addr_lo, and kiq.

Referenced by writeMMIO().

◆ setHqdPqWptrPollAddrHi()

void gem5::PM4PacketProcessor::setHqdPqWptrPollAddrHi ( uint32_t  data)

Definition at line 888 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_wptr_poll_addr_hi, and kiq.

Referenced by writeMMIO().

◆ setHqdVmid()

void gem5::PM4PacketProcessor::setHqdVmid ( uint32_t  data)

Definition at line 822 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_vmid, and kiq.

Referenced by writeMMIO().

◆ setRbBaseHi()

void gem5::PM4PacketProcessor::setRbBaseHi ( uint32_t  data)

Definition at line 954 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_base_hi, and pq.

Referenced by writeMMIO().

◆ setRbBaseLo()

void gem5::PM4PacketProcessor::setRbBaseLo ( uint32_t  data)

Definition at line 948 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_base_lo, and pq.

Referenced by writeMMIO().

◆ setRbCntl()

void gem5::PM4PacketProcessor::setRbCntl ( uint32_t  data)

Definition at line 906 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_control, and pq.

Referenced by writeMMIO().

◆ setRbDoorbellCntrl()

void gem5::PM4PacketProcessor::setRbDoorbellCntrl ( uint32_t  data)

◆ setRbDoorbellRangeHi()

void gem5::PM4PacketProcessor::setRbDoorbellRangeHi ( uint32_t  data)

Definition at line 973 of file pm4_packet_processor.cc.

References data, gem5::PrimaryQueue::doorbellRangeHi, and pq.

Referenced by writeMMIO().

◆ setRbDoorbellRangeLo()

void gem5::PM4PacketProcessor::setRbDoorbellRangeLo ( uint32_t  data)

Definition at line 967 of file pm4_packet_processor.cc.

References data, gem5::PrimaryQueue::doorbellRangeLo, and pq.

Referenced by writeMMIO().

◆ setRbRptrAddrHi()

void gem5::PM4PacketProcessor::setRbRptrAddrHi ( uint32_t  data)

Definition at line 930 of file pm4_packet_processor.cc.

References data, pq, and gem5::PrimaryQueue::queueRptrAddrHi.

Referenced by writeMMIO().

◆ setRbRptrAddrLo()

void gem5::PM4PacketProcessor::setRbRptrAddrLo ( uint32_t  data)

Definition at line 924 of file pm4_packet_processor.cc.

References data, pq, and gem5::PrimaryQueue::queueRptrAddrLo.

Referenced by writeMMIO().

◆ setRbVmid()

void gem5::PM4PacketProcessor::setRbVmid ( uint32_t  data)

Definition at line 900 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_vmid, and pq.

Referenced by writeMMIO().

◆ setRbWptrHi()

void gem5::PM4PacketProcessor::setRbWptrHi ( uint32_t  data)

Definition at line 918 of file pm4_packet_processor.cc.

References data, pq, and gem5::PrimaryQueue::queueWptrHi.

Referenced by writeMMIO().

◆ setRbWptrLo()

void gem5::PM4PacketProcessor::setRbWptrLo ( uint32_t  data)

Definition at line 912 of file pm4_packet_processor.cc.

References data, pq, and gem5::PrimaryQueue::queueWptrLo.

Referenced by writeMMIO().

◆ setRbWptrPollAddrHi()

void gem5::PM4PacketProcessor::setRbWptrPollAddrHi ( uint32_t  data)

Definition at line 942 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_wptr_poll_addr_hi, and pq.

Referenced by writeMMIO().

◆ setRbWptrPollAddrLo()

void gem5::PM4PacketProcessor::setRbWptrPollAddrLo ( uint32_t  data)

Definition at line 936 of file pm4_packet_processor.cc.

References data, gem5::GEM5_PACKED::hqd_pq_wptr_poll_addr_lo, and pq.

Referenced by writeMMIO().

◆ setUconfigReg()

void gem5::PM4PacketProcessor::setUconfigReg ( PM4Queue q,
PM4SetUconfigReg pkt 
)

◆ switchBuffer()

void gem5::PM4PacketProcessor::switchBuffer ( PM4Queue q,
PM4SwitchBuf pkt 
)

Definition at line 656 of file pm4_packet_processor.cc.

References decodeNext(), DPRINTF, and gem5::ArmISA::q.

Referenced by decodeHeader().

◆ translate()

TranslationGenPtr gem5::PM4PacketProcessor::translate ( Addr  vaddr,
Addr  size 
)
overridevirtual

Method for functional translation.

AMDGPUDevice will perform DMA operations on VAs, and because page faults are not currently supported for Vega 10, we must be able to find the pages mapped for the process.

Implements gem5::DmaVirtDevice.

Definition at line 62 of file pm4_packet_processor.cc.

References gem5::AMDGPUDevice::getVM(), gpuDevice, gem5::AMDGPUVM::inAGP(), and gem5::MipsISA::vaddr.

◆ unmapQueues()

void gem5::PM4PacketProcessor::unmapQueues ( PM4Queue q,
PM4UnmapQueues pkt 
)

◆ unserialize()

void gem5::PM4PacketProcessor::unserialize ( CheckpointIn cp)
overridevirtual

◆ updateReadIndex()

void gem5::PM4PacketProcessor::updateReadIndex ( Addr  offset,
uint64_t  rd_idx 
)

Update read index on doorbell rings.

We use write index, however read index == write index when the queue is empty. This allows us to save previous read index when a queue is remapped. The remapped queue will read from the previous read index rather than reset to zero.

Definition at line 508 of file pm4_packet_processor.cc.

References gem5::ArmISA::offset, and queuesMap.

Referenced by gem5::AMDGPUDevice::writeDoorbell().

◆ waitRegMem()

void gem5::PM4PacketProcessor::waitRegMem ( PM4Queue q,
PM4WaitRegMem pkt 
)

◆ write()

Tick gem5::PM4PacketProcessor::write ( PacketPtr  pkt)
inlineoverridevirtual

Inherited methods.

Implements gem5::PioDevice.

Definition at line 72 of file pm4_packet_processor.hh.

◆ writeData()

void gem5::PM4PacketProcessor::writeData ( PM4Queue q,
PM4WriteData pkt 
)

◆ writeDataDone()

void gem5::PM4PacketProcessor::writeDataDone ( PM4Queue q,
PM4WriteData pkt,
Addr  addr 
)

◆ writeMMIO()

void gem5::PM4PacketProcessor::writeMMIO ( PacketPtr  pkt,
Addr  mmio_offset 
)

Member Data Documentation

◆ gpuDevice

AMDGPUDevice* gem5::PM4PacketProcessor::gpuDevice
private

◆ kiq

QueueDesc gem5::PM4PacketProcessor::kiq
private

◆ pq

PrimaryQueue gem5::PM4PacketProcessor::pq
private

◆ queues

std::unordered_map<uint16_t, PM4Queue *> gem5::PM4PacketProcessor::queues
private

Definition at line 61 of file pm4_packet_processor.hh.

Referenced by newQueue(), serialize(), unmapQueues(), and unserialize().

◆ queuesMap

std::unordered_map<uint32_t, PM4Queue *> gem5::PM4PacketProcessor::queuesMap
private

Definition at line 63 of file pm4_packet_processor.hh.

Referenced by getQueue(), newQueue(), processMQD(), and updateReadIndex().


The documentation for this class was generated from the following files:

Generated on Thu Jul 28 2022 13:33:10 for gem5 by doxygen 1.8.17