dev-amdgpu: Check for SDMA copies to GART range

The SDMA engine can potentially be used to write to the GART address
range. Since gem5 has a shadow copy of the GART table to avoid sending
functional reads to device memory, the GART table must be updated when
copying to the GART range.

This changeset adds a check in the VM for GART range and implements the
SDMA copy packet writing to the GART range. A fatal is added to write
and ptePde, which are the only other two ways to write to memory, as
using these packets to update the GART table has not been observed.

Change-Id: I1e62dfd9179cc9e987659e68414209fd77bba2bd
This commit is contained in:
Matthew Poremba
2024-02-07 13:29:44 -06:00
parent 998709d4fc
commit 009cec56e0
2 changed files with 36 additions and 7 deletions

View File

@@ -172,6 +172,12 @@ class AMDGPUVM : public Serializable
*/
Addr gartSize();
bool
inGARTRange(Addr paddr)
{
return ((paddr >= gartBase()) && (paddr <= (gartBase() + gartSize())));
}
/**
* Copy of GART table. Typically resides in device memory, however we use
* a copy in gem5 to simplify the interface.