Go to the documentation of this file.
40 #ifndef __GPU_COMPUTE_GPU_COMPUTE_DRIVER_HH__
41 #define __GPU_COMPUTE_GPU_COMPUTE_DRIVER_HH__
46 #include <unordered_map>
50 #include "enums/GfxVersion.hh"
57 struct GPUComputeDriverParams;
58 class GPUCommandProcessor;
65 typedef GPUComputeDriverParams
Params;
71 int prot,
int tgt_flags,
int tgt_fd, off_t
offset)
override;
89 case GfxVersion::gfx801:
90 case GfxVersion::gfx803:
91 case GfxVersion::gfx902:
93 case GfxVersion::gfx900:
97 fatal(
"Invalid GPU type\n");
107 :
driver(gpu_driver),
tc(thrd_cntxt) {}
159 std::unordered_map<uint32_t, ETEntry>
ETable;
208 std::unordered_map<ThreadContext *, EventList>
TCEvents;
256 #endif // __GPU_COMPUTE_GPU_COMPUTE_DRIVER_HH__
void registerUncacheableMemory(Addr start, Addr length)
Register a region of host memory as uncacheable from the perspective of the dGPU.
class EventTableEntry ETEntry
#define fatal(...)
This implements a cprintf based fatal() function.
std::unordered_map< ThreadContext *, EventList > TCEvents
virtual void signalWakeupEvent(uint32_t event_id)
AddrRangeMap< Request::CacheCoherenceFlags, 1 > gpuVmas
VMA structures for GPUVM memory.
void allocateQueue(PortProxy &mem_proxy, Addr ioc_buf_addr)
Forward relevant parameters to packet processor; queueId is used to link doorbell.
GfxVersion getGfxVersion() const
The AddrRangeMap uses an STL map to implement an interval tree for address decoding.
GPUComputeDriver * driver
Addr deallocateGpuVma(Addr start)
Addr gpuVmApeLimit(Addr apeBase) const
void allocateGpuVma(Request::CacheCoherenceFlags mtype, Addr start, Addr length)
Allocate/deallocate GPUVM VMAs for tracking virtual address allocations and properties on DGPUs.
void setMtype(RequestPtr req)
Called by the compute units right before a request is issued to ruby.
std::unordered_map< uint32_t, ETEntry > ETable
GPUComputeDriver * driver
void sleepCPU(ThreadContext *tc, uint32_t milliSecTimeout)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Request::CacheCoherenceFlags defaultMtype
uint64_t Tick
Tick count type.
std::shared_ptr< Request > RequestPtr
Addr ldsApeBaseV9() const
std::set< uint32_t > signalEvents
This object is a proxy for a port or other object which implements the functional response protocol,...
Addr scratchApeBase(int gpuNum) const
GPUComputeDriver(const Params &p)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int open(ThreadContext *tc, int mode, int flags) override
Create an FD entry for the KFD inside of the owning process.
Addr scratchApeBaseV9() const
void deschedule(Event &event)
EmulatedDriver is an abstract base class for fake SE-mode device drivers.
MtypeFlags
Mtype bits {Cached, Read Write, Shared} for caches.
int ioctl(ThreadContext *tc, unsigned req, Addr ioc_buf) override
Abstract method, invoked when the user program calls ioctl() on the file descriptor returned by a pre...
void scheduleWakeup(Tick wakeup_delay)
GPUCommandProcessor * device
GPU that is controlled by this driver.
Addr mmap(ThreadContext *tc, Addr start, uint64_t length, int prot, int tgt_flags, int tgt_fd, off_t offset) override
Currently, mmap() will simply setup a mapping for the associated device's packet processor's doorbell...
GPUComputeDriverParams Params
DriverWakeupEvent timerEvent
Addr ldsApeLimit(Addr apeBase) const
const char * description() const override
Return a C string describing the event.
EventList(GPUComputeDriver *gpu_driver, ThreadContext *thrd_cntxt)
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Addr gpuVmApeBase(int gpuNum) const
The aperture (APE) base/limit pairs are set statically at startup by the real KFD.
Addr scratchApeLimit(Addr apeBase) const
Addr ldsApeBase(int gpuNum) const
DriverWakeupEvent(GPUComputeDriver *gpu_driver, ThreadContext *thrd_cntxt)
bool scheduled() const
Determine if the current event is scheduled.
Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17