gem5  v20.1.0.0
Public Member Functions | Public Attributes | Private Attributes | List of all members
GPUCommandProcessor::ReadDispIdOffsetDmaEvent Class Reference

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...

Inheritance diagram for GPUCommandProcessor::ReadDispIdOffsetDmaEvent:
DmaCallback Drainable

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...
 
EventgetChunkEvent ()
 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

GPUCommandProcessorgpuCmdProc
 
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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ReadDispIdOffsetDmaEvent()

GPUCommandProcessor::ReadDispIdOffsetDmaEvent::ReadDispIdOffsetDmaEvent ( GPUCommandProcessor gpu_cmd_proc,
HSAQueueEntry task 
)
inline

Definition at line 100 of file gpu_command_processor.hh.

Member Function Documentation

◆ process()

void GPUCommandProcessor::ReadDispIdOffsetDmaEvent::process ( )
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.

Member Data Documentation

◆ _task

HSAQueueEntry* GPUCommandProcessor::ReadDispIdOffsetDmaEvent::_task
private

Definition at line 135 of file gpu_command_processor.hh.

Referenced by process().

◆ gpuCmdProc

GPUCommandProcessor& GPUCommandProcessor::ReadDispIdOffsetDmaEvent::gpuCmdProc
private

Definition at line 134 of file gpu_command_processor.hh.

Referenced by process().

◆ readDispIdOffset

uint32_t GPUCommandProcessor::ReadDispIdOffsetDmaEvent::readDispIdOffset

Definition at line 131 of file gpu_command_processor.hh.

Referenced by process().


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

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