diff --git a/sys/src/cmd/aux/vga/i81x.c b/sys/src/cmd/aux/vga/i81x.c index 243512e2e..232c5a715 100644 --- a/sys/src/cmd/aux/vga/i81x.c +++ b/sys/src/cmd/aux/vga/i81x.c @@ -403,10 +403,10 @@ dump(Vga* vga, Ctlr* ctlr) p = i81x->pci; printitem(name, "mem[0]"); - Bprint(&stdout, "base %llux size %d\n", p->mem[0].bar & ~0x0F, p->mem[0].size); + Bprint(&stdout, "base %llux size %lld\n", p->mem[0].bar & ~0x0F, p->mem[0].size); printitem(name, "mem[1]"); - Bprint(&stdout, "base %llux size %d\n", p->mem[1].bar & ~0x0F, p->mem[1].size); + Bprint(&stdout, "base %llux size %lld\n", p->mem[1].bar & ~0x0F, p->mem[1].size); } diff --git a/sys/src/cmd/aux/vga/nvidia.c b/sys/src/cmd/aux/vga/nvidia.c index 7e30332c3..ef4eda89b 100644 --- a/sys/src/cmd/aux/vga/nvidia.c +++ b/sys/src/cmd/aux/vga/nvidia.c @@ -151,7 +151,7 @@ snarf(Vga* vga, Ctlr* ctlr) mmio = segattach(0, "nvidiammio", 0, p->mem[0].size); if(mmio == (void*)-1) - error("%s: segattach nvidiammio, size %d: %r\n", + error("%s: segattach nvidiammio, size %lld: %r\n", ctlr->name, p->mem[0].size); nv->pci = p; diff --git a/sys/src/cmd/aux/vga/pci.c b/sys/src/cmd/aux/vga/pci.c index 2b4c57e0c..25194d570 100644 --- a/sys/src/cmd/aux/vga/pci.c +++ b/sys/src/cmd/aux/vga/pci.c @@ -71,8 +71,8 @@ pcicfginit(void) if(j < 0 || j >= nelem(p->mem)) break; p->mem[j].bar = strtoull(s+1, &s, 16); - p->mem[j].size = strtoul(s+1, &s, 10); - trace("\tmem[%d] = %llux %d\n", j, p->mem[j].bar, p->mem[j].size); + p->mem[j].size = strtoll(s+1, &s, 10); + trace("\tmem[%d] = %llux %lld\n", j, p->mem[j].bar, p->mem[j].size); } if(pcilist != nil) diff --git a/sys/src/cmd/aux/vga/pci.h b/sys/src/cmd/aux/vga/pci.h index f0f886aed..be14a2cfa 100644 --- a/sys/src/cmd/aux/vga/pci.h +++ b/sys/src/cmd/aux/vga/pci.h @@ -93,7 +93,7 @@ typedef struct Pcidev { struct { uvlong bar; /* base address */ - int size; + vlong size; } mem[6]; uchar intl; /* interrupt line */ diff --git a/sys/src/cmd/aux/vga/radeon.c b/sys/src/cmd/aux/vga/radeon.c index c479c86cd..931974878 100644 --- a/sys/src/cmd/aux/vga/radeon.c +++ b/sys/src/cmd/aux/vga/radeon.c @@ -247,7 +247,7 @@ snarf(Vga *vga, Ctlr *ctlr) if (mmio == ~0) error("%s: can't attach mmio segment\n", ctlr->name); - DBGPRINT("radeon: mmio address: %08#p [size=%#x]\n", + DBGPRINT("radeon: mmio address: %08#p [size=%lld]\n", (void *)mmio, p->mem[2].size); radeon->pci = p;