From 7081e52987567584683b1dc834c9bc8395a45199 Mon Sep 17 00:00:00 2001 From: Robert Drehmel Date: Mon, 15 Oct 2001 12:16:20 +0000 Subject: [PATCH] Make the ofw_reg structure and ofw_alloc_heap 64-bit save. --- sys/boot/ofw/libofw/libofw.h | 4 ++-- sys/boot/ofw/libofw/ofw_memory.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/boot/ofw/libofw/libofw.h b/sys/boot/ofw/libofw/libofw.h index b0275ecf8530..249aa097fa13 100644 --- a/sys/boot/ofw/libofw/libofw.h +++ b/sys/boot/ofw/libofw/libofw.h @@ -103,6 +103,6 @@ extern int main(int (*openfirm)(void *)); struct ofw_reg { - uint32_t base; - uint32_t size; + cell_t base; + cell_t size; }; diff --git a/sys/boot/ofw/libofw/ofw_memory.c b/sys/boot/ofw/libofw/ofw_memory.c index 132800a1a85f..a83b6fd028f8 100644 --- a/sys/boot/ofw/libofw/ofw_memory.c +++ b/sys/boot/ofw/libofw/ofw_memory.c @@ -88,9 +88,9 @@ ofw_alloc_heap(unsigned int size) memory = OF_instance_to_package(meminstance); OF_getprop(memory, "available", &available, sizeof(available)); - heap_base = OF_claim((void *)available.base, size, 4); + heap_base = OF_claim((void *)available.base, size, sizeof(register_t)); - if (heap_base != (void *)0xffffffff) { + if (heap_base != (void *)-1) { heap_size = size; }