dev-amdgpu: Set PASID in interrupt cookie

The driver uses the pasid to look up events that need to be set in
kfd_signal_event_interrupt (amdkfd/kfd_events.c). Currently this is
uninitialized which causes the function in the driver to return without
doing anything useful.

This changeset initializes the cookie PASID to 0x8000. 0x8000 is always
the first PASID assigned by the driver. This works since gem5 only
supports one GPU process in FS mode. This would have to be changed for
multi-process support, so a comment is added as a reminder.

Change-Id: I7074b581f2f2f346bd910eef15d5f9253ce17e2c
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/61653
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matthew Poremba
2022-07-07 17:24:55 -07:00
parent 923d6c4081
commit f2949f3d03

View File

@@ -88,6 +88,14 @@ AMDGPUInterruptHandler::prepareInterruptCookie(ContextID cntxt_id,
*/
AMDGPUInterruptCookie *cookie = new AMDGPUInterruptCookie();
memset(cookie, 0, sizeof(AMDGPUInterruptCookie));
// Currently only one process is supported and the first pasid from driver
// is always 0x8000. In the future this can be obtained from the PM4
// MAP_PROCESS packet and may need to be passed to this function.
//
// On a related note, leave vmid fields alone as they are only used for
// memory exceptions. Memory exceptions are not supported on gfx900.
cookie->pasid = 0x8000;
cookie->timestamp_Lo = 0x40;
cookie->clientId = client_id;
cookie->sourceId = source_id;