Skip to contentSkip to conversation

Collect all page_base_address bits for pte-further addresses (v2)

PATCH New StDenis, Tom 1 participant 1 message Jul 18, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Collect all page_base_address bits for pte-further addresses (v2)

The specification says to treat a PTE with the F bit set "like a PDE" which means that all but the lower 6 bits are part of the page base address. Indeed, in the wild a comment came back indicating that we were stripping off bits needed to properly fetch the next PTE.

(v2): Only capture excess bits if it is a PTE-FURTHER entry

---
 src/lib/read_vram.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/lib/read_vram.c +1 -1
index cba8f6b..e83a85c 100644
@@ -676,7 +676,7 @@ pde_is_pte:
 				pte_idx = (address >> 12) & ((1ULL << pde_fields.frag_size) - 1);
 
 				// grab PTE base address from the PTE that has the F bit set.
-				pde_fields.pte_base_addr = pte_fields.page_base_addr;
+				pde_fields.pte_base_addr = pte_entry & 0xFFFFFFFFFFC0ULL;
 				goto pte_further;
 			}
 
Signature · 6 lines
2.21.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx