diff options
author | Tobias Weingartner <weingart@cvs.openbsd.org> | 1997-10-23 15:13:31 +0000 |
---|---|---|
committer | Tobias Weingartner <weingart@cvs.openbsd.org> | 1997-10-23 15:13:31 +0000 |
commit | f38cadc3de4222e909586f97b256ec25685f8fad (patch) | |
tree | e9b2ec92e49c3ab6a5981b746add1fbe539191df /sys/arch/i386/stand/libsa/memprobe.c | |
parent | 0d9bd07968d409a80abe35559697b1985274468c (diff) |
Better BIOS diskprobe. Cleanup and re-org by mickey.
Fix bug in BIOS memprobe. Cleanup and re-org by mickey.
Do checksum of HD devices.
Diffstat (limited to 'sys/arch/i386/stand/libsa/memprobe.c')
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 3632484ecf8..6ae13844fd1 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.23 1997/10/22 23:34:40 mickey Exp $ */ +/* $OpenBSD: memprobe.c,v 1.24 1997/10/23 15:13:30 weingart Exp $ */ /* * Copyright (c) 1997 Tobias Weingartner, Michael Shalayeff @@ -256,7 +256,6 @@ memprobe() { static bios_memmap_t bm[32]; /* This is easier */ bios_memmap_t *pm = bm, *im; - int total = 0; #ifdef DEBUG printf("Probing memory: "); #endif @@ -281,22 +280,17 @@ memprobe() memory_map = bm; /* XXX for 'machine mem' command only */ printf("mem0:"); - /* Get total free memory */ + /* XXX - Compatibility, remove later */ + extmem = cnvmem = 0; for(im = bm; im->type != BIOS_MAP_END; im++) { if (im->type == BIOS_MAP_FREE) { - total += im->size; printf(" %luK", (u_long)im->size); + + if(im->addr < 0x100000) + cnvmem += im->size; + else + extmem += im->size; } } printf("\n"); - - /* XXX - Compatibility, remove later */ - for(im = bm; im->type != BIOS_MAP_END; im++) - if ((im->addr & 0xFFFFF) == im->addr && - im->type == BIOS_MAP_FREE) { - cnvmem = im->size; - break; /* Take the first region */ - } - - extmem = total - cnvmem; } |