Detection of memory > 64M in 2.0.36: How do they do it???

Detection of memory > 64M in 2.0.36: How do they do it???

Post by Jeremy Mathe » Mon, 07 Dec 1998 04:00:00



I note that in 2.0.36, you no longer need the append mem= trick.
In fact, I just tested this, booting the latest version of Tom's RTBT
on a 128M machine, and voila!

Now, 'twas my understanding that detection of memory beyond 64M was
chip dependent, and that in order to do it, required intimate
knowledge of and cooperation from specific chip sets.  That is,
Microsoft can do it in NT, because they are willing to "work with" (in
the MS sense of the phrase (*)) the chip manufacturers to make it
work, but that it just isn't worth it in Linux.

My question is: How did they do it, in 2.0.36?  Was there some
heretofore undiscovered BIOS call or something, or did they
essentially do the same thing as NT does?  I'm looking for an
explanation in "semi-layman's terms" - I'm not a layman, but not
exactly a kernel hacker either.  Also, is there any particular reason
why you couldn't just probe memory (write a byte, read a byte) until
it fails?

(*) One is reminded of the line from the book "The Microsoft Files" -
"Doing business with Bill Gates is like having a date with Mike Tyson
- you expect to get*d."

 
 
 

Detection of memory > 64M in 2.0.36: How do they do it???

Post by Byron A Je » Mon, 07 Dec 1998 04:00:00



-I note that in 2.0.36, you no longer need the append mem= trick.
-In fact, I just tested this, booting the latest version of Tom's RTBT
-on a 128M machine, and voila!
-
-Now, 'twas my understanding that detection of memory beyond 64M was
-chip dependent, and that in order to do it, required intimate
-knowledge of and cooperation from specific chip sets.  That is,
-Microsoft can do it in NT, because they are willing to "work with" (in
-the MS sense of the phrase (*)) the chip manufacturers to make it
-work, but that it just isn't worth it in Linux.
-

Nothing really to do with chipsets. The memory detection is done in the BIOS.
Linux originally used the existing BIOS call to get the amount of memory.
That BIOS call was limited to returning 64MB.

-My question is: How did they do it, in 2.0.36?  Was there some
-heretofore undiscovered BIOS call or something, or did they
-essentially do the same thing as NT does?

Not undiscovered, but new. And NT simply incorporated that new call earlier
than Linux did.

Frankly while it was mildly annoying, this memory detection thing simply
wasn't enough of a showstopper to add new development to the 1.3 development
tree after the freeze. That's why the call to the new BIOS call didn't make it
into the 2.0 kernels. It'll be standard in 2.2, as it is in all late model 2.1
kernels now.

-  I'm looking for an
-explanation in "semi-layman's terms" - I'm not a layman, but not
-exactly a kernel hacker either.  Also, is there any particular reason
-why you couldn't just probe memory (write a byte, read a byte) until
-it fails?

Because it's unnecessary. The BIOS probes for you. The original BIOS call
was limited. That 2.0.36 kernel patch doesn't work on old BIOS BTW. Just try it
on an old 486 with 80MB of RAM.

It was a minor nuisance. It had a quick, simple, and permanent fix by
adding the "mem=" kernel parameter. The autodetection method only works with
up to date BIOSes. Take your pick.

BAJ
--
Another random extraction from the mental bit stream of...
Byron A. Jeff - PhD student operating in parallel - And Using Linux!


 
 
 

Detection of memory > 64M in 2.0.36: How do they do it???

Post by david parso » Wed, 09 Dec 1998 04:00:00




>I note that in 2.0.36, you no longer need the append mem= trick.
>In fact, I just tested this, booting the latest version of Tom's RTBT
>on a 128M machine, and voila!

>Now, 'twas my understanding that detection of memory beyond 64M was
>chip dependent, and that in order to do it, required intimate
>knowledge of and cooperation from specific chip sets.  That is,
>Microsoft can do it in NT, because they are willing to "work with" (in
>the MS sense of the phrase (*)) the chip manufacturers to make it
>work, but that it just isn't worth it in Linux.

   There are several bios extensions that are used to get memory sizes
   >64/16mb, and all you have to do is try them.   Linux has had support
   for them since 1.2.13 (with appropriate patches, courtesy of Network
   Associates) and they've only recently found their way into the baseline
   kernel.

Quote:>My question is: How did they do it, in 2.0.36?

   int15, ax=0e801h
   ax:  memory < 1mb
   bx:  memory > 1mb, in 64k chunks.

   do the interrupt, and if it works set memsize to
   eax + (ebx*64)
   but if it doesn't work fall back to
   int15, ax=088h
   which only returns up to 64mb.

   It's not a perfect solution;  certain EISA machines (Compaqs in
   particular) will NOT return the amount of memory on the machine
   to any of the simple bios calls, and certain other machines
   (like some HP portables) won't do it either.  But most of the
   machines out there will cheerfully either return the numbers
   that you want or will just as cheerfully fail the call.

                 ____
   david parsons \bi/ Too familiar with memory detection.
                  \/

 
 
 

1. HELP: Connectivity between DOS/DOS and DOS/Linux

HI there,

In about march we should be getting a second PC in our house. I was
concidering trying to network the two machines. One of the machines
is going to be a DOS/Windows affair while the other one is hoping
to become a DOS and Linux setup. I have a few questions that I hope
that someone out there can answer. (The kind of network I'm concid-
ering is peer-to-peer, I think)

1) Using Novell Netware light on the DOS/Windows machine, could it
connect to the Linux machine using standard networking stuff? Would
I be able to have netware on my DOS partition of my Linux/DOS machine
so that when I boot it up using DOS I'm still connected?

2) If I were using the Linux front end for DOOM, could I still play
a multiplayer game across the network? Or would I have to go back to
DOS?

3) Just out of curiosity, could anyone give me info on cost. I've
got a home made estimate (made from various sources) of :



Cabling (roughly)                               :20
                                                ----
Total                                           136

This is a rough estimate, if anyone can confirm or deny this value
please set me straight.

Answers would be much appersiated as it will influence my decision
as to weather to get the network and/or to get Linux.

TTFN and TC, Michael Dales

-'Damn you and your networking problems Q!'-Picard

2. How to come up with dot clocks?

3. QIC-36 tape drive with an Emulex QIC-36-> SCSI board

4. Portable Netware on RS/6000: PServer crashes

5. TeX -> dvips -> gs -> DOS -> dj500: printer hangs

6. kernel panic "killing interrupt handler" and kernel BUG at sched.c:468

7. AIX 1.2, DOS-Merge, & > 32MB DOS Partition ??

8. what is this? xl0: tx underrun, increasing tx start threshold to 120 Content-Type: text/plain; charset=us-ascii

9. SCSI-DAT s/w like tar for DOS to exchange files LINUX <--> DOS?

10. AIX 1.2, DOS-Merge, & > 32MB DOS Partition ??

11. OS/2 and DOS -> OS/2, Linux and DOS

12. HELP - How to tell Linux it has >64M memory

13. Tyan S1833D - Need help accessing memory > 64M