gem5
v20.1.0.0
|
Perform a DMA read of the read_dispatch_id_field_base_byte_offset field, which follows directly after the read_dispatch_id (the read pointer) in the amd_hsa_queue_t struct (aka memory queue descriptor (MQD)), to find the base address of the MQD. More...
Public Member Functions | |
ReadDispIdOffsetDmaEvent (GPUCommandProcessor &gpu_cmd_proc, HSAQueueEntry *task) | |
void | process () override |
Callback function invoked on completion of all chunks. More... | |
Public Member Functions inherited from DmaCallback | |
virtual const std::string | name () const |
DrainState | drain () override |
DmaPort ensures that all oustanding DMA accesses have completed before it finishes draining. More... | |
Event * | getChunkEvent () |
Request a chunk event. More... | |
Public Member Functions inherited from 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 Attributes | |
uint32_t | readDispIdOffset |
Private Attributes | |
GPUCommandProcessor & | gpuCmdProc |
HSAQueueEntry * | _task |
Additional Inherited Members | |
Protected Member Functions inherited from DmaCallback | |
DmaCallback () | |
virtual | ~DmaCallback () |
Protected Member Functions inherited from 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 Attributes inherited from DmaCallback | |
int | count |
Perform a DMA read of the read_dispatch_id_field_base_byte_offset field, which follows directly after the read_dispatch_id (the read pointer) in the amd_hsa_queue_t struct (aka memory queue descriptor (MQD)), to find the base address of the MQD.
The MQD is the runtime's soft representation of a HW queue descriptor (HQD).
Any fields below the read dispatch ID in the amd_hsa_queue_t should not change according to the HSA standard, therefore we should be able to get them based on their known relative position to the read dispatch ID.
Definition at line 97 of file gpu_command_processor.hh.
|
inline |
Definition at line 100 of file gpu_command_processor.hh.
|
inlineoverridevirtual |
Callback function invoked on completion of all chunks.
Now that the read pointer's offset from the base of the MQD is known, we can use that to calculate the the address of the MQD itself, the dispatcher will DMA that into the HSAQueueEntry when a kernel is launched.
DMA a copy of the MQD into the task. Some fields of the MQD will be used to initialize register state.
Implements DmaCallback.
Definition at line 108 of file gpu_command_processor.hh.
References _task, HSAQueueEntry::amdQueue, HSADevice::dmaReadVirt(), HSAPacketProcessor::getQueueDesc(), gpuCmdProc, HSAQueueEntry::hostAMDQueueAddr, HSAQueueDescriptor::hostReadIndexPtr, HSADevice::hsaPP, HSAQueueEntry::queueId(), and readDispIdOffset.
|
private |
Definition at line 135 of file gpu_command_processor.hh.
Referenced by process().
|
private |
Definition at line 134 of file gpu_command_processor.hh.
Referenced by process().
uint32_t GPUCommandProcessor::ReadDispIdOffsetDmaEvent::readDispIdOffset |
Definition at line 131 of file gpu_command_processor.hh.
Referenced by process().