diff options
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 7f2dba44310..ade44eccda6 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: memprobe.c,v 1.34 2000/03/05 18:40:59 niklas Exp $ */ +/* $OpenBSD: memprobe.c,v 1.35 2002/02/15 19:55:15 mickey Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -133,7 +133,7 @@ bios_E801(mp) mp++; mp->addr = (1024 * 1024) * 16; /* 16MB */ - mp->size = (m2 & 0xffff) * 64 * 1024; + mp->size = (m2 & 0xffff) * 64L * 1024; mp->type = BIOS_MAP_FREE; return ++mp; @@ -259,7 +259,7 @@ static __inline bios_memmap_t * badprobe(mp) register bios_memmap_t *mp; { - int ram; + u_int64_t ram; #ifdef DEBUG printf("scan "); #endif @@ -337,13 +337,12 @@ memprobe() * We drop "machine {cnvmem,extmem}" commands. */ if(im->addr < IOM_BEGIN) - cnvmem = max(cnvmem, im->addr + im->size); + cnvmem = max(cnvmem, + im->addr + im->size) / 1024; if(im->addr >= IOM_END) - extmem += im->size; + extmem += im->size / 1024; } } - cnvmem /= 1024; - extmem /= 1024; /* Check if gate A20 is on */ printf("a20=o%s] ", checkA20()? "n" : "ff!"); @@ -362,7 +361,7 @@ dump_biosmem(tm) for(p = tm; p->type != BIOS_MAP_END; p++) { printf("Region %d: type %u at 0x%x for %uKB\n", p - tm, - p->type, (u_int)p->addr, (u_int)p->size / 1024); + p->type, (u_int)p->addr, (u_int)(p->size / 1024)); if(p->type == BIOS_MAP_FREE) total += p->size / 1024; |