aux/vga: use vlong for pci bar size

This commit is contained in:
cinap_lenrek 2021-11-26 20:55:58 +00:00
parent 20ea113790
commit 2a531d444c
5 changed files with 7 additions and 7 deletions

View file

@ -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);
}

View file

@ -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;

View file

@ -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)

View file

@ -93,7 +93,7 @@ typedef struct Pcidev {
struct {
uvlong bar; /* base address */
int size;
vlong size;
} mem[6];
uchar intl; /* interrupt line */

View file

@ -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;