diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-11-13 13:18:59 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-11-13 13:18:59 +0000 |
commit | dbbac792bda50d6f4f7a0a2cc2049ebc84ddbc38 (patch) | |
tree | be21304120ef179d868a27a8c6df53ddd9bb960e /sys/arch/i386 | |
parent | 08a300f8ea3923509e7599236fd8c92d4ff80f5f (diff) |
Do not use PG_N on "real" 386es as it does not exist there; from NetBSD
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index 849b7bc3a6f..4ef337d6693 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.137 2000/10/27 00:16:14 mickey Exp $ */ +/* $OpenBSD: machdep.c,v 1.138 2000/11/13 13:18:58 niklas Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -2516,10 +2516,18 @@ bus_mem_add_mapping(bpa, size, cacheable, bshp) pmap_enter(pmap_kernel(), va, pa, VM_PROT_READ | VM_PROT_WRITE, TRUE, VM_PROT_READ | VM_PROT_WRITE); - if (!cacheable) - pmap_changebit(pa, PG_N, ~0); - else - pmap_changebit(pa, 0, ~PG_N); + + /* + * PG_N doesn't exist on 386's, so we assume that + * the mainboard has wired up device space non-cacheable + * on those machines. + */ + if (cpu_class != CPUCLASS_386) { + if (!cacheable) + pmap_changebit(pa, PG_N, ~0); + else + pmap_changebit(pa, 0, ~PG_N); + } } return 0; |