Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

> 3 GB of RAM (hypothetical), CWSDPMI (Developers)

posted by Rugxulo(R) Homepage, Usono, 19.12.2009, 03:33

(quoting Charles Sandmann):

---------------------------------------------------
"If I am to deal with more than around 3GB of memory, I need to deal with the physical memory map. This site contains a good summary and some example code:
http://wiki.osdev.org/How_Do_I_Determine_The_Amount_Of_RAM

I typically build a little TC/BCC/TASM image to check things first before I build them into new code. CWSDPMI currently uses:
Int 15, AH=0x88 first. Then it tries Int 15, AX=E801, and only uses the results if it shows no memory hole before the 16MB mark. It then truncates the memory at a little less than 2GB to stop from overruning an array fixed at 64KB in size (but that's another story, to be fixed...). For systems with memory holes I have always suggested using HIMEM.SYS, and let them deal with it (these were fairly rare anyway, when shifting from the ISA bus).

The recommendation to check for mega-memory systems is to use Int 15, AX=E820 (sample assembler provided in link above). So I need some test code to see if it works, then prints the map to the screen. Then I need to hack that to provide just a 32-bit version by 4KB page start, count. I am hoping the current code is fine for everything up to 3GB of memory, so maybe the new routine would only display 4KB page start, count pairs for memory that isn't currently "found" by the previous calls.

So this is two mini-projects. One is for me to hack cwsdpmi to handle at least 3.5GB of memory (messing with a new 4MB page bitmap for more than 256MB of memory). When that works, the 4MB page bitmap will only be around 128 bytes, so could easily be expanded to whatever size is needed, supporting up to 64GB of memory (of which you could map any 4GB into your address space at a time). But to know what physical memory is mapped, to put into the 4MB page bitmap, I need the second mini-project, the little test program above.

I will also move the base address from 0x10000000 to just 4MB, so you can use 4GB-4MB."

Thread locked
 

Complete thread:

Back to the forum
Board view  Mix view
15191 Postings in 1365 Threads, 250 registered users, 11 users online (0 registered, 11 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum