changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/9/bcm/mmu.c

revision 7310: 55d93e47a2de
parent 7234: fc141b91ed8a
child 7337: dd9cc1ad7c71
     1.1--- a/sys/src/9/bcm/mmu.c
     1.2+++ b/sys/src/9/bcm/mmu.c
     1.3@@ -49,8 +49,8 @@ mmuinit(void *a)
     1.4 	/*
     1.5 	 * map i/o registers 
     1.6 	 */
     1.7-	va = VIRTIO;
     1.8-	for(pa = soc.physio; pa < soc.physio+IOSIZE; pa += MiB){
     1.9+	va = soc.virtio;
    1.10+	for(pa = soc.physio; pa < soc.physio+soc.iosize; pa += MiB){
    1.11 		l1[L1X(va)] = pa|Dom0|L1AP(Krw)|Section;
    1.12 		va += MiB;
    1.13 	}
    1.14@@ -305,7 +305,7 @@ uintptr
    1.15 cankaddr(uintptr pa)
    1.16 {
    1.17 	if(pa < PHYSDRAM+soc.dramsize)
    1.18-		return PHYSDRAM+soc.dramsize - pa;
    1.19+		return ((uintptr)PHYSDRAM+soc.dramsize) - pa;
    1.20 	return 0;
    1.21 }
    1.22