summaryrefslogtreecommitdiff
path: root/sys/dev/wsfb
diff options
context:
space:
mode:
authormsaitoh <msaitoh@NetBSD.org>2020-04-13 15:26:57 +0000
committermsaitoh <msaitoh@NetBSD.org>2020-04-13 15:26:57 +0000
commitd5fe9fce1500bd774ab2ab8abe42e3954b18bb5e (patch)
tree9dfe7286d60d57a955fb98e6a017f9b3d063c749 /sys/dev/wsfb
parentf878f405807af922a85daec88f3c4e348053c886 (diff)
Get genfb's address offset correctly when the vaule >= 4G. OK's by jmcneill.
Tested on Intel BXNUC10I3FNK (Comet Lake U).
Diffstat (limited to 'sys/dev/wsfb')
-rw-r--r--sys/dev/wsfb/genfb.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/wsfb/genfb.c b/sys/dev/wsfb/genfb.c
index 043247eec51..3f03706f075 100644
--- a/sys/dev/wsfb/genfb.c
+++ b/sys/dev/wsfb/genfb.c
@@ -1,4 +1,4 @@
-/* $NetBSD: genfb.c,v 1.71 2020/02/23 14:44:23 martin Exp $ */
+/* $NetBSD: genfb.c,v 1.72 2020/04/13 15:26:57 msaitoh Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.71 2020/02/23 14:44:23 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.72 2020/04/13 15:26:57 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -102,7 +102,7 @@ genfb_init(struct genfb_softc *sc)
{
prop_dictionary_t dict;
uint64_t cmap_cb, pmf_cb, mode_cb, bl_cb, br_cb, fbaddr;
- uint32_t fboffset;
+ uint64_t fboffset;
bool console;
dict = device_properties(sc->sc_dev);
@@ -124,13 +124,12 @@ genfb_init(struct genfb_softc *sc)
return;
}
- /* XXX should be a 64bit value */
- if (!prop_dictionary_get_uint32(dict, "address", &fboffset)) {
+ if (!prop_dictionary_get_uint64(dict, "address", &fboffset)) {
GPRINTF("no address property\n");
return;
}
- sc->sc_fboffset = fboffset;
+ sc->sc_fboffset = (bus_addr_t)fboffset;
sc->sc_fbaddr = NULL;
if (prop_dictionary_get_uint64(dict, "virtual_address", &fbaddr)) {