From 0c120cf141844cc4cf7131b9b6da3d1a1bd530bd Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Sun, 3 Apr 2022 10:24:50 -0400 Subject: [PATCH] asahi: Decode resource allocation responses We already know much of this structure, let's pretty print to simplify our traces. Signed-off-by: Alyssa Rosenzweig Part-of: --- src/asahi/lib/io.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/asahi/lib/io.h b/src/asahi/lib/io.h index 582b69eab5d..8a4d058dc1d 100644 --- a/src/asahi/lib/io.h +++ b/src/asahi/lib/io.h @@ -187,6 +187,27 @@ agx_memory_type_name(uint32_t type) } } +struct agx_allocate_resource_resp { + /* Returned GPU virtual address */ + uint64_t gpu_va; + + /* Returned CPU virtual address */ + uint64_t cpu; + + uint32_t unk4[3]; + + /* Handle used to identify the resource in the segment list */ + uint32_t handle; + + /* Size of the allocated resource */ + uint64_t size; + + /* Globally unique identifier for the resource, shown in Instruments */ + uint32_t guid; + + uint32_t unk11[10]; +} __attribute__((packed)); + struct agx_notification_queue { #ifdef __APPLE__ mach_port_t port;