summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorDale Rahn <drahn@cvs.openbsd.org>2001-09-15 21:23:53 +0000
committerDale Rahn <drahn@cvs.openbsd.org>2001-09-15 21:23:53 +0000
commit4b641cc89ec35c9acf6d74eea6218bc4e4686ee5 (patch)
tree8593318c9689d1318b2a3cb142e451676663091f /sys/arch
parent1b74d91209f02f8f5f0280a7a1d1fbd8a7df1afb (diff)
Two changes here.
Verify that regions which were allocated by stealing are not returned to phys_map, perhaps before phys_map is initialized. Not seen to be a problem, but is potentially. Also, the system can deal with not having the devices mapped with BATs. In fact after some testing the systems seem more stable when BATs are not used for devices. Stop using them, at least for now.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/macppc/macppc/machdep.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/arch/macppc/macppc/machdep.c b/sys/arch/macppc/macppc/machdep.c
index b41cfd7e0ee..5a9ada1f655 100644
--- a/sys/arch/macppc/macppc/machdep.c
+++ b/sys/arch/macppc/macppc/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.4 2001/09/12 05:28:42 pvalchev Exp $ */
+/* $OpenBSD: machdep.c,v 1.5 2001/09/15 21:23:52 drahn Exp $ */
/* $NetBSD: machdep.c,v 1.4 1996/10/16 19:33:11 ws Exp $ */
/*
@@ -231,6 +231,7 @@ where = 3;
battable[0].batl = BATL(0x00000000, BAT_M);
battable[0].batu = BATU(0x00000000);
+#if 0
battable[0x8].batl = BATL(0x80000000, BAT_I);
battable[0x8].batu = BATU(0x80000000);
battable[0x9].batl = BATL(0x90000000, BAT_I);
@@ -238,6 +239,7 @@ where = 3;
battable[0xa].batl = BATL(0xa0000000, BAT_I);
battable[0xa].batu = BATU(0xa0000000);
segment8_a_mapped = 1;
+#endif
/*
* Now setup fixed bat registers
@@ -1164,7 +1166,12 @@ bus_space_unmap(t, bsh, size)
off = bsh - sva;
len = size+off;
- uvm_km_free_wakeup(phys_map, sva, len);
+ if (ppc_malloc_ok &&
+ ((sva >= VM_MIN_KERNEL_ADDRESS) && (sva < VM_MAX_KERNEL_ADDRESS)) )
+ {
+ /* do not free memory which was stolen from the vm system */
+ uvm_km_free(phys_map, sva, len);
+ }
#if 0
pmap_extract(pmap_kernel(), sva, &bpa);
if (extent_free(devio_ex, bpa, size, EX_NOWAIT |