lkml.org 
[lkml]   [1996]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRE: z-Re: memory detection and bios
There is another BIOS call which you can use to get memory size which is 
>64MB. It's only in newer bios's, though. Here's a code chunk:
/* Check bios reports, for huge memory! */
rg.x.ax=0xe801;
int86(0x15, &rg, &rg);
bios_mem = rg.x.ax;
bios_mem += 64L * rg.x.bx;
if (!rg.x.cflag) {
printf(" BIOS reports: ext_mem=%sK Total mem: %ld
MB\n",
strrchr(pcm(bios_mem), ' '), (bios_mem + 1024)/1024);
}

________________________________________________________
To: rdm@tad.micro.umn.edu@INTERNET
Cc: linux-kernel@vger.rutgers.edu@INTERNET
From: jon@gte.esi.us.es@INTERNET on Tue, Oct 22, 1996 12:48 PM
Subject: z-Re: memory detection and bios

rdm@tad.micro.umn.edu said:
>
> bios can only report 64Meg. Is there a reason the kernel can't do
> a search for the memory boundary if 64Meg is available? [e.g. check
> at 128M, 256M, ... then binary search for boundary when get a miss --
> maybe do something quick and simple to check for a proper boundary like
> check the location immediately past the last known good location.]
>
> If this causes problems on some machines it could be made a config option.
>
> For people whose bioses report the wrong value, this could be made
> "always on" instead of "only if 64M reported".

What if you have a memory mapped device or frame buffer at 128MB. Memory
probes
can be quite dangerous with some hardware (the probe tells your
memory mapped scsi controler to format the drive..)

Just add mem=XXXM to the kernel boot options (e.g. append option in
lilo.conf) and all will be well.

Jon.

--
Jon. <jon@gte.esi.us.es, http://www.esi.us.es/~jon>


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.024 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site