Page 1 of 1
How to display Ram size, processor name, etc
Posted: Sat Feb 18, 2012 10:04 pm
by avesh
I am new to osDEV, the query is how to display amount of ram, processor name, in ASM and would that be in second stage bootloader or kernel. --THANKS
Re: How to display Ram size, processor name, etc
Posted: Sat Feb 18, 2012 10:48 pm
by Brendan
Hi,
avesh wrote:I am new to osDEV, the query is how to display amount of ram, processor name, in ASM and would that be in second stage bootloader or kernel. --THANKS
First you need to be able to
display characters. Once you can display one character it's not hard to display strings, etc. Converting hex or decimal into characters shouldn't be hard either.
Detecting the total amount of RAM means
detecting how many areas of RAM there are and adding up the size of each area of RAM.
For "CPU name":
- Start with the brand string from "CPUID, eax = 0x80000002 to 0x80000004"
- If that isn't supported, use the "vendor string" (CPUID, eax = 0x0000000) and the "brand ID" (CPUID, eax = 0x0000001) and a lookup table for each CPU vendor.
- If that isn't supported, use "vendor string" and the CPU's signature (family, model, stepping) and another set of lookup tables.
- If that isn't supported, there's a bunch of different methods for detecting the differences between various ancient CPUs (but it gets very messy, and most of the information you need to do it right is so old that it's not online anymore)
Cheers,
Brendan
Re: How to display Ram size, processor name, etc
Posted: Sat Feb 18, 2012 10:55 pm
by avesh
You just cleared my confusion,,, %thanks%
Re: How to display Ram size, processor name, etc
Posted: Sun Feb 19, 2012 2:40 am
by CrypticalCode0
Well actually you could try the memory of the people on the Vintage-computer forums about that old info.
I can tell you one thing they have info that goes back all the way to the IBM 5150.
here is the url
http://www.vintage-computer.com/vcforum/content.php