dev-amdgpu: Add GPU interrupt handler object
Add device interrupt handler for amdgpu device. The interrupt handler is primarily used to signal that fences in the kernel driver can be passed. Change-Id: I574fbfdef6e3bae310ec7f86058811e1e4886df6 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51849 Maintainer: Matthew Poremba <matthew.poremba@amd.com> Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <fstream>
|
||||
|
||||
#include "debug/AMDGPUDevice.hh"
|
||||
#include "dev/amdgpu/interrupt_handler.hh"
|
||||
#include "mem/packet.hh"
|
||||
#include "mem/packet_access.hh"
|
||||
#include "params/AMDGPUDevice.hh"
|
||||
@@ -196,8 +197,19 @@ AMDGPUDevice::writeDoorbell(PacketPtr pkt, Addr offset)
|
||||
void
|
||||
AMDGPUDevice::writeMMIO(PacketPtr pkt, Addr offset)
|
||||
{
|
||||
Addr aperture = getMmioAperture(offset);
|
||||
Addr aperture_offset = offset - aperture;
|
||||
|
||||
DPRINTF(AMDGPUDevice, "Wrote MMIO %#lx\n", offset);
|
||||
mmioReader.writeFromTrace(pkt, MMIO_BAR, offset);
|
||||
|
||||
switch (aperture) {
|
||||
case IH_BASE:
|
||||
deviceIH->writeMMIO(pkt, aperture_offset >> IH_OFFSET_SHIFT);
|
||||
break;
|
||||
default:
|
||||
DPRINTF(AMDGPUDevice, "Unknown MMIO aperture for %#x\n", offset);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Tick
|
||||
@@ -262,6 +274,19 @@ AMDGPUDevice::write(PacketPtr pkt)
|
||||
return pioDelay;
|
||||
}
|
||||
|
||||
void
|
||||
AMDGPUDevice::setDoorbellType(uint32_t offset, QueueType qt)
|
||||
{
|
||||
DPRINTF(AMDGPUDevice, "Setting doorbell type for %x\n", offset);
|
||||
doorbells[offset] = qt;
|
||||
}
|
||||
|
||||
void
|
||||
AMDGPUDevice::intrPost()
|
||||
{
|
||||
PciDevice::intrPost();
|
||||
}
|
||||
|
||||
void
|
||||
AMDGPUDevice::serialize(CheckpointOut &cp) const
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user