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:
@@ -28,8 +28,10 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from m5.params import *
|
||||
from m5.proxy import *
|
||||
from m5.objects.PciDevice import PciDevice
|
||||
from m5.objects.PciDevice import PciMemBar, PciMemUpperBar, PciLegacyIoBar
|
||||
from m5.objects.Device import DmaDevice
|
||||
|
||||
# PCI device model for an AMD Vega 10 based GPU. The PCI codes and BARs
|
||||
# correspond to a Vega Frontier Edition hardware device. None of the PCI
|
||||
@@ -71,3 +73,14 @@ class AMDGPUDevice(PciDevice):
|
||||
trace_file = Param.String("MMIO trace collected on hardware")
|
||||
checkpoint_before_mmios = Param.Bool(False, "Take a checkpoint before the"
|
||||
" device begins sending MMIOs")
|
||||
|
||||
# The cp is needed here to handle certain packets the device may receive.
|
||||
# The config script should not create a new cp here but rather assign the
|
||||
# same cp that is assigned to the Shader SimObject.
|
||||
cp = Param.GPUCommandProcessor(NULL, "Command Processor")
|
||||
device_ih = Param.AMDGPUInterruptHandler("GPU Interrupt handler")
|
||||
|
||||
class AMDGPUInterruptHandler(DmaDevice):
|
||||
type = 'AMDGPUInterruptHandler'
|
||||
cxx_header = "dev/amdgpu/interrupt_handler.hh"
|
||||
cxx_class = 'gem5::AMDGPUInterruptHandler'
|
||||
|
||||
Reference in New Issue
Block a user