From ba1eaeccf6f8cc61295c424239079858352194e8 Mon Sep 17 00:00:00 2001 From: cliff Date: Tue, 11 Nov 2008 06:32:15 +0000 Subject: [PATCH] constrain MEMSIZE to avoid stepping out of smallest-case Gemini CPU Remap Control remapped-private memory size "bad" things can happen if the gzboot heap is in non-core-private memory. --- sys/arch/evbarm/stand/board/gemini_mem.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/arch/evbarm/stand/board/gemini_mem.c b/sys/arch/evbarm/stand/board/gemini_mem.c index c96ae2c4cada..1c1ae916cf84 100644 --- a/sys/arch/evbarm/stand/board/gemini_mem.c +++ b/sys/arch/evbarm/stand/board/gemini_mem.c @@ -1,4 +1,4 @@ -/* $NetBSD: gemini_mem.c,v 1.1 2008/10/30 06:23:13 cliff Exp $ */ +/* $NetBSD: gemini_mem.c,v 1.2 2008/11/11 06:32:15 cliff Exp $ */ /* adapted from: * NetBSD: integrator_mem.c,v 1.4 2006/01/16 19:34:53 he Exp @@ -49,14 +49,20 @@ #include "board.h" -#define MEMSIZE (128 * 1024 * 1024) /* XXX */ +/* + * constrain MEMSIZE to avoid stepping out of smallest-case + * Gemini CPU Remap Control remapped-private memory size + * "bad" things can happen if the gzboot heap is in + * non-core-private memory. + */ +#define MEMSIZE (32 * 1024 * 1024) /* 32MB */ void mem_init(void) { uint32_t heap, size; - size = MEMSIZE; /* XXX */ + size = MEMSIZE; /* Start is always 0. */ heap = size - BOARD_HEAP_SIZE;