[lkml]   [1996]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
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! */;
int86(0x15, &rg, &rg);
bios_mem =;
bios_mem += 64L * rg.x.bx;
if (!rg.x.cflag) {
printf(" BIOS reports: ext_mem=%sK Total mem: %ld
strrchr(pcm(bios_mem), ' '), (bios_mem + 1024)/1024);

From: on Tue, Oct 22, 1996 12:48 PM
Subject: z-Re: memory detection and bios 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
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. <,>

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