Where to place the BMP for PMM

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
HitmanYesman
Member
Member
Posts: 47
Joined: Fri Apr 23, 2010 8:27 am

Where to place the BMP for PMM

Post by HitmanYesman »

I'm still creating a PMM after I realized I had no clue what I was doing. So I have gathered some information from various places and brought it all together. I'm ready to begin, but I have no idea where to place my BMP. My OS will only be designed for 32 bit CPUs. So I found out that (without PAE which I'm not worried about at the moment) the max size of RAM a 32 bit CPU can handle is around 4 GB. I did the math of getting the amount of frames, then simplifying that down into KB. 128 KB is what I got. I just don't know where to put the 128 KB. I've read some articles and informational text and they just place it in random spots not explaining why they chose that address. Any ideas on where I should put the BMP? And (for now) I'm going to be using the BMP just for 16 MB for contiguous memory and use a stack for the rest of the memory.

Thanks for helping
montrom
Member
Member
Posts: 86
Joined: Thu May 13, 2010 1:45 pm

Re: Where to place the BMP for PMM

Post by montrom »

Place it somewhere after your kernel in memory and before the portion of free memory you have to manage. Reserve that whole area.

Code: Select all

[R E S E R V E D]
[kernel]-[bitmap]-[free memory]
Visit the Montrom user page for more info.
HitmanYesman
Member
Member
Posts: 47
Joined: Fri Apr 23, 2010 8:27 am

Re: Where to place the BMP for PMM

Post by HitmanYesman »

Thanks
TylerH
Member
Member
Posts: 285
Joined: Tue Apr 13, 2010 8:00 pm
Contact:

Re: Where to place the BMP for PMM

Post by TylerH »

Thanks, I was wondering the same thing. I was going to use some complex method involving using the memory map to find a free place big enough, but that idea's better, I'll let grub do the finding for me.
User avatar
xenos
Member
Member
Posts: 1121
Joined: Thu Aug 11, 2005 11:00 pm
Libera.chat IRC: xenos1984
Location: Tartu, Estonia
Contact:

Re: Where to place the BMP for PMM

Post by xenos »

In general, you don't even need the whole 128k that would be needed for managing 4 GB of physical RAM. The bitmap is needed only for RAM that is actually present.
Programmers' Hardware Database // GitHub user: xenos1984; OS project: NOS
Post Reply