shithub: riscv

Download patch

ref: 1a7c224b3e36342623d4050953ca0cf3cb8a8bd5
parent: eb4bd4aa3ec7308fd4dea9810c7d2de1f5977288
author: cinap_lenrek <[email protected]>
date: Fri May 3 18:53:09 EDT 2019

bcm: don't call nil on PADDR() in dmaaddr(), return busdram dummy address

--- a/sys/src/9/bcm/dma.c
+++ b/sys/src/9/bcm/dma.c
@@ -100,6 +100,8 @@
 uintptr
 dmaaddr(void *va)
 {
+	if(va == nil)
+		return soc.busdram;
 	return soc.busdram | (PADDR(va) - PHYSDRAM);
 }