Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/atari/atari When mapping non-cacheable memory with ...
details: https://anonhg.NetBSD.org/src/rev/5131a6725939
branches: trunk
changeset: 494016:5131a6725939
user: leo <leo%NetBSD.org@localhost>
date: Thu Jun 29 07:40:04 2000 +0000
description:
When mapping non-cacheable memory with bus_space_map, make sure we use the
precise (serialized) way.
diffstat:
sys/arch/atari/atari/bus.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 4159a6be1a17 -r 5131a6725939 sys/arch/atari/atari/bus.c
--- a/sys/arch/atari/atari/bus.c Thu Jun 29 07:37:53 2000 +0000
+++ b/sys/arch/atari/atari/bus.c Thu Jun 29 07:40:04 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.c,v 1.21 2000/06/26 14:20:39 mrg Exp $ */
+/* $NetBSD: bus.c,v 1.22 2000/06/29 07:40:04 leo Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -269,11 +269,22 @@
*bshp = (caddr_t)(va + (bpa & PGOFSET));
for(; pa < endpa; pa += NBPG, va += NBPG) {
+ u_int *ptep, npte;
+
pmap_enter(pmap_kernel(), (vaddr_t)va, pa,
VM_PROT_READ|VM_PROT_WRITE, PMAP_WIRED);
+
+ ptep = kvtopte(va);
+ npte = *ptep & ~PG_CMASK;
+
if (!(flags & BUS_SPACE_MAP_CACHEABLE))
- pmap_changebit(pa, PG_CI, TRUE);
+ npte |= PG_CI;
+ else if (mmutype == MMU_68040)
+ npte |= PG_CCB;
+
+ *ptep = npte;
}
+ TBIAS();
return (0);
}
Home |
Main Index |
Thread Index |
Old Index