Page Frame Bitmap - Reserved Areas
Posted: Wed Oct 17, 2007 8:48 am
Hi,
I implemented my page allocation system ages ago and it all works very nicely. I just had a bit of a worry about PCI configuration spaces etc... which I haven't really dealt with yet.
At the moment, I build my RAM bitmap from the system memory map provided by GRUB / the BIOS. Every area marked as 'available' is added to the physical memory bitmap as free (this happens in my boot loader which later builds a stack-based system for the kernel.
Supposing I am later using PCI memory mapped devices. Will the system RAM map take this in to account, or do I have to scan the PCI bus and manually ensure that memory mapped areas are not assigned as RAM?
Also, supposing VESA resides at 0xE0000000 and I had a system with 4GB RAM, will this area already have been marked as unavailable by the BIOS? At present, My system only has 2GB, so it doesn't really matter as VESA space is outside the physical RAM space.
The main reason for my concern is that I prefer the stack allocation method. Obviously this makes it difficult to remove pages later on if they are found to be within some device's configuration space.
Cheers,
Adam
I implemented my page allocation system ages ago and it all works very nicely. I just had a bit of a worry about PCI configuration spaces etc... which I haven't really dealt with yet.
At the moment, I build my RAM bitmap from the system memory map provided by GRUB / the BIOS. Every area marked as 'available' is added to the physical memory bitmap as free (this happens in my boot loader which later builds a stack-based system for the kernel.
Supposing I am later using PCI memory mapped devices. Will the system RAM map take this in to account, or do I have to scan the PCI bus and manually ensure that memory mapped areas are not assigned as RAM?
Also, supposing VESA resides at 0xE0000000 and I had a system with 4GB RAM, will this area already have been marked as unavailable by the BIOS? At present, My system only has 2GB, so it doesn't really matter as VESA space is outside the physical RAM space.
The main reason for my concern is that I prefer the stack allocation method. Obviously this makes it difficult to remove pages later on if they are found to be within some device's configuration space.
Cheers,
Adam