aux/vga: use vlong for pci bar size
This commit is contained in:
parent
20ea113790
commit
2a531d444c
5 changed files with 7 additions and 7 deletions
|
@ -403,10 +403,10 @@ dump(Vga* vga, Ctlr* ctlr)
|
||||||
|
|
||||||
p = i81x->pci;
|
p = i81x->pci;
|
||||||
printitem(name, "mem[0]");
|
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]");
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -151,7 +151,7 @@ snarf(Vga* vga, Ctlr* ctlr)
|
||||||
|
|
||||||
mmio = segattach(0, "nvidiammio", 0, p->mem[0].size);
|
mmio = segattach(0, "nvidiammio", 0, p->mem[0].size);
|
||||||
if(mmio == (void*)-1)
|
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);
|
ctlr->name, p->mem[0].size);
|
||||||
|
|
||||||
nv->pci = p;
|
nv->pci = p;
|
||||||
|
|
|
@ -71,8 +71,8 @@ pcicfginit(void)
|
||||||
if(j < 0 || j >= nelem(p->mem))
|
if(j < 0 || j >= nelem(p->mem))
|
||||||
break;
|
break;
|
||||||
p->mem[j].bar = strtoull(s+1, &s, 16);
|
p->mem[j].bar = strtoull(s+1, &s, 16);
|
||||||
p->mem[j].size = strtoul(s+1, &s, 10);
|
p->mem[j].size = strtoll(s+1, &s, 10);
|
||||||
trace("\tmem[%d] = %llux %d\n", j, p->mem[j].bar, p->mem[j].size);
|
trace("\tmem[%d] = %llux %lld\n", j, p->mem[j].bar, p->mem[j].size);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(pcilist != nil)
|
if(pcilist != nil)
|
||||||
|
|
|
@ -93,7 +93,7 @@ typedef struct Pcidev {
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
uvlong bar; /* base address */
|
uvlong bar; /* base address */
|
||||||
int size;
|
vlong size;
|
||||||
} mem[6];
|
} mem[6];
|
||||||
|
|
||||||
uchar intl; /* interrupt line */
|
uchar intl; /* interrupt line */
|
||||||
|
|
|
@ -247,7 +247,7 @@ snarf(Vga *vga, Ctlr *ctlr)
|
||||||
if (mmio == ~0)
|
if (mmio == ~0)
|
||||||
error("%s: can't attach mmio segment\n", ctlr->name);
|
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);
|
(void *)mmio, p->mem[2].size);
|
||||||
|
|
||||||
radeon->pci = p;
|
radeon->pci = p;
|
||||||
|
|
Loading…
Reference in a new issue