I'm trying to make a small 64-bit kernel (x86), and i recently found out about memory holes, but even after googling for a while i couldn't find all the answers i wanted.
If i understand it correctly, some parts of the RAM are unavailable for use because they are used by something else (BIOS, memory mapped devices, etc.) these are so called "memory holes".
I have a few questions about them:
- do i have to worry about memory holes after switching to long mode (64-bit mode)? for example i can reclaim the BIOS memory areas, since i won't be needing the BIOS anymore, but what about the other memory holes?
- if i still have to worry about memory holes, is there a safe area above which there definetly won't be any memory holes? That is, can i simply not use any the first, say, 16 MiB or memory and be sure that there are no memory holes above 16 MiB? (i don't mind sacrificing 16 MiB when i still have another 8 GB or so more)
I know there exist some BIOS functions that allow you to go through the memory map as a list, but i would rather not have to deal with having to sort that list aswell as dealing with overlapping regions.