diff options
| author | ryo <ryo@NetBSD.org> | 2018-04-01 04:35:01 +0000 |
|---|---|---|
| committer | ryo <ryo@NetBSD.org> | 2018-04-01 04:35:01 +0000 |
| commit | 8694f07cb89f3a801ec613d6aa02b684826abe7e (patch) | |
| tree | e92b6114357cf6e2edadaaa72159a89012cd5a80 /sys/dev | |
| parent | ec462995c03cdebd26f79e319ecfe5b86cdd0796 (diff) | |
Add initial support for ARMv8 (AARCH64) (by nisimura@ and ryo@)
- sys/arch/evbarm64 is gone and integrated into sys/arch/evbarm. (by skrll@)
- add support fdt. evbarm/conf/GENERIC64 fdt (bcm2837,sunxi,tegra) based generic 64bit kernel config. (by skrll@, jmcneill@)
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/fdt/simplefb.c | 9 | ||||
| -rw-r--r-- | sys/dev/usb/udl.c | 8 |
2 files changed, 10 insertions, 7 deletions
diff --git a/sys/dev/fdt/simplefb.c b/sys/dev/fdt/simplefb.c index 41cf105a696..347a699266c 100644 --- a/sys/dev/fdt/simplefb.c +++ b/sys/dev/fdt/simplefb.c @@ -1,4 +1,4 @@ -/* $NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $ */ +/* $NetBSD: simplefb.c,v 1.4 2018/04/01 04:35:05 ryo Exp $ */ /*- * Copyright (c) 2017 Jared McNeill <jmcneill@invisible.ca> @@ -29,7 +29,7 @@ #include "opt_wsdisplay_compat.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.3 2017/12/18 19:06:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: simplefb.c,v 1.4 2018/04/01 04:35:05 ryo Exp $"); #include <sys/param.h> #include <sys/bus.h> @@ -146,7 +146,8 @@ simplefb_attach_genfb(struct simplefb_softc *sc) return ENXIO; } - if (bus_space_map(sc->sc_bst, addr, size, BUS_SPACE_MAP_LINEAR, + if (bus_space_map(sc->sc_bst, addr, size, + BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE, &sc->sc_bsh) != 0) { aprint_error(": failed to map fb\n"); return ENXIO; @@ -159,7 +160,7 @@ simplefb_attach_genfb(struct simplefb_softc *sc) prop_dictionary_set_uint8(dict, "depth", depth); prop_dictionary_set_uint16(dict, "linebytes", stride); prop_dictionary_set_uint32(dict, "address", addr); - prop_dictionary_set_uint32(dict, "virtual_address", + prop_dictionary_set_uint64(dict, "virtual_address", (uintptr_t)bus_space_vaddr(sc->sc_bst, sc->sc_bsh)); genfb_init(&sc->sc_gen); diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c index 6f8a7d3eba2..f9b29db6f8d 100644 --- a/sys/dev/usb/udl.c +++ b/sys/dev/usb/udl.c @@ -1,4 +1,4 @@ -/* $NetBSD: udl.c,v 1.20 2017/06/01 02:45:12 chs Exp $ */ +/* $NetBSD: udl.c,v 1.21 2018/04/01 04:35:05 ryo Exp $ */ /*- * Copyright (c) 2009 FUKAUMI Naoki. @@ -53,7 +53,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.20 2017/06/01 02:45:12 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udl.c,v 1.21 2018/04/01 04:35:05 ryo Exp $"); #ifdef _KERNEL_OPT #include "opt_usb.h" @@ -673,7 +673,9 @@ udl_mmap(void *v, void *vs, off_t off, int prot) paddr += vaddr & PGOFSET; /* XXX we need MI paddr_t -> mmap cookie API */ -#if defined(__alpha__) +#if defined(__aarch64__) +#define PTOMMAP(paddr) aarch64_btop((char *)paddr) +#elif defined(__alpha__) #define PTOMMAP(paddr) alpha_btop((char *)paddr) #elif defined(__arm__) #define PTOMMAP(paddr) arm_btop((u_long)paddr) |
