summaryrefslogtreecommitdiff
path: root/sys/src/9/pc/etheryuk.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-06-06 16:04:24 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-06-06 16:04:24 +0200
commit8243b6600f4c8d60e520aa1b20368ae9575aabf9 (patch)
tree0652c55ab7f685afc378ea94bf9187606fd5c1c6 /sys/src/9/pc/etheryuk.c
parent3bebd3f5e278d77b1eb526cd9f924b0777043d2b (diff)
pc/ether*: use 64-bit physical addresses and check pci membar types and sizes
Diffstat (limited to 'sys/src/9/pc/etheryuk.c')
-rw-r--r--sys/src/9/pc/etheryuk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/src/9/pc/etheryuk.c b/sys/src/9/pc/etheryuk.c
index a14bf6b5f..b856a3465 100644
--- a/sys/src/9/pc/etheryuk.c
+++ b/sys/src/9/pc/etheryuk.c
@@ -680,7 +680,7 @@ struct Ctlr {
uchar rev;
uchar nports;
uchar portno;
- uintptr io;
+ uvlong io;
uchar *reg8;
ushort *reg16;
uint *reg;
@@ -2129,10 +2129,12 @@ setup(Ctlr *c)
Pcidev *p;
p = c->p;
+ if(p->mem[0].bar & 1)
+ return -1;
c->io = p->mem[0].bar&~0xf;
mem = vmap(c->io, p->mem[0].size);
if(mem == nil){
- print("yuk: cant map %#p\n", c->io);
+ print("yuk: cant map %llux\n", c->io);
return -1;
}
pcienable(p);