Re: memory detection and bios

Michel LESPINASSE (walken@via.ecp.fr)
Tue, 22 Oct 1996 20:15:34 +0200 (MET DST)


On 22 Oct 1996 rdm@tad.micro.umn.edu wrote:

> 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.]

Most modern bios'es can report >64M : check at
http://www.uruk.org/grub/mem64mb.html... I think that we shouldn't try a
"manual" detection (there is too much compatibility issues....)

The Ralf Brown's Interrupt List (http://ctyme.com/rbrown.htm) states that
this new bios interfaces are supported by all vendors since 8/94.

The clean way to detect the memory size should be to first check this new
extensions, then if they fail (old bios) to read the info in the CMOS and
display a warning if this doesn't match the classical int 15h interface.
(the CMOS memory standards are at
http://irb.cs.uni-magdeburg.de/~zbrog/asm/cmos.html)

In case of a conflict between the int 15h/ah=88h interface and the CMOS
information, we should probably thrust the CMOS, because some bios returs
wrong values when there is more than 16M installed. That's the behaviour
that is implemented in FreeBSD and in WinNT.

This extensions aren't as trivial as they seem, because we have no
guarantee that the physical memory map should be continuous : most modern
chipsets can configure some memory holes, and the new bios interfaces are
able to report this holes. We need to consider this in Linux's memory
management.

With this patch, we would get :
1) auto-detection of the memory size when it's >64M
2) no more problems with some 16M-limited bioses
3) the memory hole support (I saw several persons having problems on their
Linux installation, because they had a memory hole configured at 16M)

> 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".
> Or should I send a patch instead of a description?

If you send a clean patch, I guess it should be able to fit in the
development kernel series. If you don't, I plan to make this patch one day
or another (soon !).

Michel "Walken" LESPINASSE - Student at Ecole Centrale Paris (France)
www Email : walken@via.ecp.fr
(o o) Http : www.via.ecp.fr/~walken/
------oOO--(_)--OOo--------------------------------------------------