From da6e81c3a924fd0c4f59a3bdeafd415e60ddfe8a Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 16 May 2009 16:40:32 +0000 Subject: Count LoadedProgram regions as free memory, since these are either the boot loader image (which we can safely overwrite) or the kernel image itself (in case of netboot) and there is already code to move the kernel image out of the free memory later on. --- sys/arch/mips64/mips64/arcbios.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/mips64/mips64/arcbios.c b/sys/arch/mips64/mips64/arcbios.c index a27fe8b7ba9..3a6830b6800 100644 --- a/sys/arch/mips64/mips64/arcbios.c +++ b/sys/arch/mips64/mips64/arcbios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arcbios.c,v 1.20 2009/05/15 22:56:08 miod Exp $ */ +/* $OpenBSD: arcbios.c,v 1.21 2009/05/16 16:40:31 miod Exp $ */ /*- * Copyright (c) 1996 M. Warner Losh. All rights reserved. * Copyright (c) 1996-2004 Opsycon AB. All rights reserved. @@ -300,6 +300,16 @@ bios_configure_memory() case BadMemory: /* Have no use for these */ break; + case LoadedProgram: + /* + * LoadedProgram areas are either the boot loader, + * if the kernel has not been directly loaded by + * ARCBios, or the kernel image itself. + * Since we will move the kernel image out of the + * memory segments later anyway, it makes sense to + * claim this memory as free. + */ + /* FALLTHROUGH */ case FreeMemory: case FreeContigous: physmem += count; @@ -333,10 +343,6 @@ bios_configure_memory() physmem += count; break; - case LoadedProgram: /* Count this into total memory */ - physmem += count; - break; - default: /* Unknown type, leave it alone... */ break; } -- cgit v1.2.3