How to display Ram size, processor name, etc

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
avesh
Posts: 2
Joined: Fri Feb 17, 2012 1:39 am

How to display Ram size, processor name, etc

Post 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
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: How to display Ram size, processor name, etc

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
avesh
Posts: 2
Joined: Fri Feb 17, 2012 1:39 am

Re: How to display Ram size, processor name, etc

Post by avesh »

You just cleared my confusion,,, %thanks%
CrypticalCode0
Member
Member
Posts: 81
Joined: Wed Nov 09, 2011 2:21 am
Location: Behind a keyboard located in The Netherlands

Re: How to display Ram size, processor name, etc

Post 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
Post Reply