summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-04-17 14:50:17 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-04-17 14:50:17 +0000
commit42da8d8d95c51622ed09f06a2a5817f7dca3e730 (patch)
treed33f5b5e0446f198841a75b45aa852eb5e0508b4 /sys/arch
parent4f709f8516392684180adb6be007c527e8b7c2de (diff)
mem_clusters.size has page protection encoded in them.
Mask it away, otherwise the reservation of RAM will fail.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/alpha/pci/irongate_bus_mem.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/arch/alpha/pci/irongate_bus_mem.c b/sys/arch/alpha/pci/irongate_bus_mem.c
index aaaab4410a9..ed4141f7694 100644
--- a/sys/arch/alpha/pci/irongate_bus_mem.c
+++ b/sys/arch/alpha/pci/irongate_bus_mem.c
@@ -80,13 +80,16 @@ irongate_bus_mem_init2(bus_space_tag_t t, void *v)
* allocate RAM out of the extent map.
*/
for (i = 0; i < mem_cluster_cnt; i++) {
+ u_quad_t size;
+
+ size = mem_clusters[i].size & ~PAGE_MASK;
+
error = extent_alloc_region(CHIP_MEM_EXTENT(v),
- mem_clusters[i].start, mem_clusters[i].size,
+ mem_clusters[i].start, size,
EX_NOWAIT | (CHIP_EX_MALLOC_SAFE(v) ? EX_MALLOCOK : 0));
if (error) {
- printf("WARNING: unable reserve RAM at 0x%lx - 0x%lx\n",
- mem_clusters[i].start,
- mem_clusters[i].start + (mem_clusters[i].size - 1));
+ printf("WARNING: unable to reserve RAM at 0x%lx - 0x%lx (%d)\n",
+ mem_clusters[i].start, size, error);
}
}
}