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
Where to place the BMP for PMM
Re: Where to place the BMP for PMM
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.
-
- Member
- Posts: 47
- Joined: Fri Apr 23, 2010 8:27 am
Re: Where to place the BMP for PMM
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.
- xenos
- 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
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.