diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-03-31 23:06:34 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-03-31 23:06:34 +0000 |
commit | d56519762d6c1899f2baa3dbbc461af05cd168a6 (patch) | |
tree | 3d68308130e343610f48c1c66982d81dd56a226e /sys/arch/i386/stand/libsa/memprobe.c | |
parent | 10a04de1b4af9903e9146ad801619b45a42583c6 (diff) |
commit all my mods to the last imported libsa stuff....
including:
- disklabel support;
- better boot cmd line
- smaller size (using some compilation switches ;)
- no more relocations in /boot, it's loaded in the place;
- better disk performance (maybe were already in there)
- installboot -n does not require write perms for device
- more debugs
- missing parts in libsa (such as cd9660 and so)
- i don't like 2 files for exec_i386 (sorry, toby, let's discuss maybe?)
tricks and tails:
- joined .text and .data (saves you a page)
- prot mode switching still in biosboot (it's freezed for awhile)
- biosdisk internals changed
- biosdev is not passed propery to the kernel (i'll fix it soon)
- sure i missed smth here to note (use the source, Luke!)
Diffstat (limited to 'sys/arch/i386/stand/libsa/memprobe.c')
-rw-r--r-- | sys/arch/i386/stand/libsa/memprobe.c | 47 |
1 files changed, 27 insertions, 20 deletions
diff --git a/sys/arch/i386/stand/libsa/memprobe.c b/sys/arch/i386/stand/libsa/memprobe.c index 1a67eafb84d..a50cac42932 100644 --- a/sys/arch/i386/stand/libsa/memprobe.c +++ b/sys/arch/i386/stand/libsa/memprobe.c @@ -1,8 +1,33 @@ -/* $OpenBSD: memprobe.c,v 1.1 1997/03/31 03:12:14 weingart Exp $ */ +/* $OpenBSD: memprobe.c,v 1.2 1997/03/31 23:06:30 mickey Exp $ */ #include <sys/param.h> -#include <libsa.h> +#include "libsa.h" +#include "biosdev.h" +static int addrprobe __P((int)); + +void +memprobe() +{ + int ram; + + cnvmem = biosmem(0); + extmem = biosmem(1); + + /* probe extended memory + * + * There is no need to do this in assembly language. This are + * much easier to debug in C anyways. + */ + for(ram = 1024; ram < 512*1024; ram += 4){ + + printf("Probing memory: %d KB\r", ram-1024); + if(addrprobe(ram)) break; + } + + printf("\n"); + extmem = ram - 1024; +} /* addrprobe(kloc): Probe memory at address kloc * 1024. * @@ -30,21 +55,3 @@ static int addrprobe(int kloc){ } -/* memprobe(): return probed memory size in KB for extended memory - * - * There is no need to do this in assembly language. This are - * much easier to debug in C anyways. - */ -int memprobe(void){ - int ram; - - for(ram = 1024; ram < 512*1024; ram += 4){ - - printf("Probing memory: %d KB\r", ram-1024); - if(addrprobe(ram)) break; - } - - printf("\n"); - return(ram-1024); -} - |