From fb2fed6963a07ab7d0e6fc89060a95b47aebb2a2 Mon Sep 17 00:00:00 2001 From: Ole Algoritme Date: Sun, 24 Mar 2024 13:20:18 +0100 Subject: [PATCH] chore: fix --- lib/include/gddr6.h | 2 +- lib/src/gddr6.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/include/gddr6.h b/lib/include/gddr6.h index ee59de0..957d71b 100644 --- a/lib/include/gddr6.h +++ b/lib/include/gddr6.h @@ -14,7 +14,7 @@ struct device const char *arch; const char *name; void *mapped_addr; - void *phys_addr; + uint32_t phys_addr; uint32_t base_offset; }; diff --git a/lib/src/gddr6.c b/lib/src/gddr6.c index 71a3d05..60e31a5 100644 --- a/lib/src/gddr6.c +++ b/lib/src/gddr6.c @@ -102,7 +102,7 @@ void gddr6_memory_map(void) { for (uint32_t i = 0; i < ctx.num_devices; i++) { - ctx.devices[i].phys_addr = (void *) (ctx.devices[i].bar0 + ctx.devices[i].offset); + ctx.devices[i].phys_addr = (ctx.devices[i].bar0 + ctx.devices[i].offset); ctx.devices[i].base_offset = ctx.devices[i].phys_addr & ~(PG_SZ - 1); ctx.devices[i].mapped_addr = mmap(0, PG_SZ, PROT_READ, MAP_SHARED, ctx.fd, ctx.devices[i].base_offset);