diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-16 16:40:32 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-05-16 16:40:32 +0000 |
commit | da6e81c3a924fd0c4f59a3bdeafd415e60ddfe8a (patch) | |
tree | 5eb1c67a0f0e5dbcba602dffeac6af4f7812733c /sys/arch | |
parent | 38eef4a710b2a8308b1efa50b2d86e039d10dc3c (diff) |
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.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/mips64/mips64/arcbios.c | 16 |
1 files changed, 11 insertions, 5 deletions
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; } |