}
static void
-pandecode_read_memory(const char *base, const char *name, mali_ptr gpu_va)
+pandecode_read_memory(const char *base, const char *name, uint64_t gpu_va)
{
FILE *fp = pandecode_read_filename(base, name);
{
assert(strlen(line) < 500);
- mali_ptr addr;
+ uint64_t addr;
char name[512];
sscanf(line, "MMAP %" PRIx64 " %s", &addr, name);
static void
pandecode_read_job_submit(const char *base, const char *line)
{
- mali_ptr addr;
+ uint64_t addr;
unsigned core_req;
unsigned is_bifrost;
static struct pandecode_mapped_memory mmaps;
struct pandecode_mapped_memory *
-pandecode_find_mapped_gpu_mem_containing(mali_ptr addr)
+pandecode_find_mapped_gpu_mem_containing(uint64_t addr)
{
list_for_each_entry(struct pandecode_mapped_memory, pos, &mmaps.node, node) {
if (addr >= pos->gpu_va && addr < pos->gpu_va + pos->length)
}
void
-pandecode_inject_mmap(mali_ptr gpu_va, void *cpu, unsigned sz, const char *name)
+pandecode_inject_mmap(uint64_t gpu_va, void *cpu, unsigned sz, const char *name)
{
struct pandecode_mapped_memory *mapped_mem = NULL;
}
char *
-pointer_as_memory_reference(mali_ptr ptr)
+pointer_as_memory_reference(uint64_t ptr)
{
struct pandecode_mapped_memory *mapped;
char *out = malloc(128);
/* Just use the raw address if other options are exhausted */
- snprintf(out, 128, MALI_PTR_FMT, ptr);
+ snprintf(out, 128, "0x%" PRIx64, ptr);
return out;
}
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
-#include <panfrost-job.h>
+#include <inttypes.h>
#include "util/list.h"
struct pandecode_mapped_memory {
size_t length;
void *addr;
- mali_ptr gpu_va;
+ uint64_t gpu_va;
char name[32];
};
void pandecode_initialize(void);
-char *pointer_as_memory_reference(mali_ptr ptr);
+char *pointer_as_memory_reference(uint64_t ptr);
-struct pandecode_mapped_memory *pandecode_find_mapped_gpu_mem_containing(mali_ptr addr);
+struct pandecode_mapped_memory *pandecode_find_mapped_gpu_mem_containing(uint64_t addr);
void
-pandecode_inject_mmap(mali_ptr gpu_va, void *cpu, unsigned sz, const char *name);
+pandecode_inject_mmap(uint64_t gpu_va, void *cpu, unsigned sz, const char *name);
static inline void *
__pandecode_fetch_gpu_mem(const struct pandecode_mapped_memory *mem,
- mali_ptr gpu_va, size_t size,
+ uint64_t gpu_va, size_t size,
int line, const char *filename)
{
if (!mem)
__LINE__, __FILE__)
/* Common entrypoint */
-int pandecode_jc(mali_ptr jc_gpu_va, bool bifrost);
+int pandecode_jc(uint64_t jc_gpu_va, bool bifrost);
#endif /* __MMAP_TRACE_H__ */