the PMM on init first checks all e820 entrys to find the highest address of usable memory,
it uses that to calculate the total number of pages.
it calculates the number of bytes the bitmap needs to store each page as a bit.
it uses the kernel end address as the start of the bitmap memory,
and gets the end of bitmap memory by adding the page count of the bitmap to kernel end
it clears the bitmaps memory to be all reserved (NOT FREE!)
it then loops through all e820 entrys to set the "usable" sections to free in the bitmap
it finally loops through all pages from address 0 to the end of the bitmap to USED since thats where kernel code and the bitmap is
loops through the bitmap to find a section of free pages that is equal to what was requested.
returns the base address of the section if found,
otherwise returns zero
Note: returns physical address, not page index.
takes a physical page address and number of pages,
loops through the bitmap setting the sections pages to FREE.
bitmap_set: takes page index and sets it to USED.
bitmap_clear: takes page index and sets it to FREE.
bitmap_test: takes page index, returns true if USED, false if FREE.