map the framebuffer as device memory in the kernel. Using mismatched
memory attributes like this is discouraged (and we should probably fix this
at some point) but this particular case is well-defined and the potential
side-effects should not matter for thus use-case.
ok patrick@
-/* $OpenBSD: simplefb.c,v 1.2 2017/08/27 12:42:22 kettenis Exp $ */
+/* $OpenBSD: simplefb.c,v 1.3 2017/12/18 10:13:45 kettenis Exp $ */
/*
* Copyright (c) 2016 Mark Kettenis
*
#include <sys/systm.h>
#include <sys/device.h>
+#include <uvm/uvm_extern.h>
+
#include <machine/bus.h>
#include <machine/fdt.h>
if (off < 0 || off >= sc->sc_psize)
return -1;
- return sc->sc_paddr + off;
+ return ((sc->sc_paddr + off) | PMAP_NOCACHE);
}
int