flat assembler
Message board for the users of flat assembler.

Index > OS Construction > Detecting Memory

Author
Thread Post new topic Reply to topic
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 02 Jun 2011, 10:41
Hi everyone!
Intel Manuals Volume 2A 3-207 Instruction Set says following about CPUID:


80000008H EAX Linear/Physical Address size
Bits 07-00: #Physical Address Bits*
Bits 15-8: #Linear Address Bits
Bits 31-16: Reserved = 0
EBX
ECX
EDX
Reserved = 0
Reserved = 0
Reserved = 0
NOTES:
* If CPUID.80000008H:EAX[7:0] is supported, the maximum physical
address number supported should come from this field.

how to get highest memory address using that?

_________________
_______________________________
NSOS
Post 02 Jun 2011, 10:41
View user's profile Send private message Reply with quote
cod3b453



Joined: 25 Aug 2004
Posts: 618
cod3b453 02 Jun 2011, 20:40
All that will tell you is the maximum physical address lines of the processor's memory controller. If you shift the value 1 left by this number it was give you the size.

There are a number of ways to find the actual physical memory, I would recommend the BIOS int 0x15 ax = 0xE820 function.
Post 02 Jun 2011, 20:40
View user's profile Send private message Reply with quote
BOTOKILLER



Joined: 07 Jan 2011
Posts: 154
Location: Ukraine
BOTOKILLER 03 Jun 2011, 10:54
THANKS!!!!
I got a perfect memory map with int 15h E820!
Also the main place to load aplications into memory after 100000h
Post 03 Jun 2011, 10:54
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.