Close, but not perfect. Reading an address seem to work, but the
--vm-decode output is a bit confusing:
[VERBOSE]: PDE0=0x00000003fefff001, VA=0x000000000000,
PBA==0x0003fefff000, V=1, S=0, C=0, P=0
[VERBOSE]: \-> PDE1=0x00000003feffe001, VA=0x400000000000,
PBA==0x0003feffe000, V=1, S=0, C=0, P=0
[VERBOSE]: \-> PDE2=0x00000003feffd001, VA=0x000000000000,
PBA==0x0003feffd000, V=1, S=0, C=0, P=0
[VERBOSE]: \-> PDE3=0x0040000394c004f7, VA=0x000000200000,
PBA==0x000394c00000, V=1, S=1, C=1, P=1
[VERBOSE]: \-> PTE==0x0040000394c004f7, VA=0x000000018000,
PBA==0x000394c00000, V=1, S=1
PDE3 actually doesn't exists and instead it's the PTE pointing to the
resulting address.
Regards,
Christian.
Am 04.11.2017 um 00:54 schrieb Tom St Denis:
Signed-off-by: Tom St Denis <[email protected]>
---
src/lib/read_vram.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/lib/read_vram.c b/src/lib/read_vram.c
index 0df48dadec12..5d9523476e25 100644
--- a/src/lib/read_vram.c
+++ b/src/lib/read_vram.c
@@ -522,6 +522,11 @@ static int umr_access_vram_ai(struct umr_asic *asic,
uint32_t vmid,
(int)pde_fields.pte);
memcpy(&pde_array[pde_cnt++], &pde_fields,
sizeof pde_fields);
+ if (pde_fields.pte) {
+ pte_entry = pde_entry;
+ goto pde_is_pte;
+ }
+
if (!pde_fields.system)
pde_fields.pte_base_addr -=
vm_fb_offset;
@@ -539,6 +544,7 @@ static int umr_access_vram_ai(struct umr_asic *asic, uint32_t vmid,
return -1;
// decode PTE values
+pde_is_pte:
pte_fields.page_base_addr = pte_entry &
0xFFFFFFFFFF000ULL;
pte_fields.fragment = (pte_entry >> 7) & 0x1F;
pte_fields.system = (pte_entry >> 1) & 1;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx