svn commit: r298631 - head/sys/kern
Ruslan Bukin
br at FreeBSD.org
Tue Apr 26 12:29:48 UTC 2016
Author: br
Date: Tue Apr 26 12:29:47 2016
New Revision: 298631
URL: https://svnweb.freebsd.org/changeset/base/298631
Log:
Add support for RISC-V.
Modified:
head/sys/kern/subr_devmap.c
Modified: head/sys/kern/subr_devmap.c
==============================================================================
--- head/sys/kern/subr_devmap.c Tue Apr 26 12:02:36 2016 (r298630)
+++ head/sys/kern/subr_devmap.c Tue Apr 26 12:29:47 2016 (r298631)
@@ -56,7 +56,7 @@ static struct devmap_entry akva_devmap_e
static u_int akva_devmap_idx;
static vm_offset_t akva_devmap_vaddr = DEVMAP_MAX_VADDR;
-#ifdef __aarch64__
+#if defined(__aarch64__) || defined(__riscv__)
extern int early_boot;
#endif
@@ -200,7 +200,7 @@ devmap_bootstrap(vm_offset_t l1pt, const
pmap_map_chunk(l1pt, pd->pd_va, pd->pd_pa, pd->pd_size,
VM_PROT_READ | VM_PROT_WRITE, PTE_DEVICE);
#endif
-#elif defined(__aarch64__)
+#elif defined(__aarch64__) || defined(__riscv__)
pmap_kenter_device(pd->pd_va, pd->pd_size, pd->pd_pa);
#endif
}
@@ -273,7 +273,7 @@ pmap_mapdev(vm_offset_t pa, vm_size_t si
pa = trunc_page(pa);
size = round_page(size + offset);
-#ifdef __aarch64__
+#if defined(__aarch64__) || defined(__riscv__)
if (early_boot) {
akva_devmap_vaddr = trunc_page(akva_devmap_vaddr - size);
va = akva_devmap_vaddr;
More information about the svn-src-all
mailing list