Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Pass PMAP_WRITE_COMBINE as appropriate...
details: https://anonhg.NetBSD.org/src/rev/9b63b05fee3d
branches: trunk
changeset: 358917:9b63b05fee3d
user: skrll <skrll%NetBSD.org@localhost>
date: Mon Jan 22 13:23:56 2018 +0000
description:
Pass PMAP_WRITE_COMBINE as appropriate in bcm283x_bs_map.
RPI2 FB console now updates properly again
diffstat:
sys/arch/arm/broadcom/bcm2835_space.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 3b1b42785878 -r 9b63b05fee3d sys/arch/arm/broadcom/bcm2835_space.c
--- a/sys/arch/arm/broadcom/bcm2835_space.c Mon Jan 22 13:22:40 2018 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_space.c Mon Jan 22 13:23:56 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_space.c,v 1.14 2017/12/10 21:38:26 skrll Exp $ */
+/* $NetBSD: bcm2835_space.c,v 1.15 2018/01/22 13:23:56 skrll Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.14 2017/12/10 21:38:26 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_space.c,v 1.15 2018/01/22 13:23:56 skrll Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -533,6 +533,7 @@
bus_space_handle_t *bshp)
{
u_long startpa, endpa, pa;
+ int pmapflags;
vaddr_t va;
/* Convert BA to PA */
@@ -550,10 +551,13 @@
*bshp = (bus_space_handle_t)(va + (pa - startpa));
- const int pmapflags =
- (flag & (BUS_SPACE_MAP_CACHEABLE|BUS_SPACE_MAP_PREFETCHABLE))
- ? 0
- : PMAP_NOCACHE;
+ if (flag & BUS_SPACE_MAP_PREFETCHABLE)
+ pmapflags = PMAP_WRITE_COMBINE;
+ else if (flag & BUS_SPACE_MAP_CACHEABLE)
+ pmapflags = 0;
+ else
+ pmapflags = PMAP_NOCACHE;
+
for (pa = startpa; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
pmap_kenter_pa(va, pa, VM_PROT_READ | VM_PROT_WRITE, pmapflags);
}
Home |
Main Index |
Thread Index |
Old Index