From 20ea113790c22e5fc8dd0051baa359e4fa083425 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Fri, 26 Nov 2021 20:51:45 +0000 Subject: kernel: support large 64-bit pci membars, increase pc64 VMAPSIZE to 1TB This makes vmap()/vunmap() take a vlong size argument, and change the type of Pci.mem[].size to vlong as well. Even if vmap() wont support large mappings, it is nice to get the original unruncated value for error checking. pc64 needs a bigger VMAP window, as system76 pangolin puts the framebuffer at a physical address > 512GB. --- sys/src/9/port/devpnp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/src/9/port/devpnp.c') diff --git a/sys/src/9/port/devpnp.c b/sys/src/9/port/devpnp.c index 7402a71d6..cb8a01fb1 100644 --- a/sys/src/9/port/devpnp.c +++ b/sys/src/9/port/devpnp.c @@ -545,7 +545,8 @@ pnpread(Chan *c, void *va, long n, vlong offset) for(i=0; imem); i++){ if(p->mem[i].size == 0) continue; - w = seprint(w, ebuf, " %d:%.8llux %d", i, (uvlong)p->mem[i].bar, p->mem[i].size); + w = seprint(w, ebuf, " %d:%.8llux %lld", i, + p->mem[i].bar, p->mem[i].size); } *w++ = '\n'; *w = '\0'; -- cgit v1.2.3