shithub: riscv

Download patch

ref: 6aff58df7502dfb8b8ab9f981ec89fecd0d7e358
parent: 9ae99fb5ad34f5b587129f5acddf77cbaa6fba17
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 11 13:12:20 EDT 2019

bcm: don't use PADDR() to convert bus address to physical in vcore

--- a/sys/src/9/bcm/vcore.c
+++ b/sys/src/9/bcm/vcore.c
@@ -211,7 +211,7 @@
 	vcwrite(ChanFb, dmaaddr(fi));
 	if(vcread(ChanFb) != 0)
 		return 0;
-	va = mmukmap(FRAMEBUFFER, PADDR(fi->base), fi->screensize);
+	va = mmukmap(FRAMEBUFFER, (fi->base&~0xC0000000)|PHYSDRAM, fi->screensize);
 	if(va)
 		memset((char*)va, 0x7F, fi->screensize);
 	return (void*)va;