I was working on my physical memory manager; more specifically I was working on getting a few memory bitmaps in place. I noticed some very strange performance behavior, and after a ton of debugging, came to realize that my bitmap was actually bring printed as pixels across the top of my screen, and it looks like the performance issues occurred whenever the screen was bring printed too.
The memory area I was in was nowhere near the graphics buffer. Very long story short, my system was allocating the first available large enough space in "free" memory (according to UEFI's getMemoryMap) to store my bitmap. I put the memory map in another post a couple days ago, here it is:
Code: Select all
Type Start Addr Num Pages
7 0 160
7 1048576 768
2 4194304 2
7 4202496 7172
4 33579008 1
7 33583104 25
4 33685504 2272
7 42991616 9984
2 83886080 1
7 83890176 389055
1 1677459456 10
7 1677500416 491574
4 3690987520 32
7 3691118592 11827
2 3739561984 3
7 3739574272 775
4 3742748672 202
7 3743576064 27
4 3743686656 2836
7 3755302912 18
3 3755376640 366
5 3756875776 48
6 3757072384 36
0 3757219840 4
9 3757236224 8
10 3757268992 4
4 3757285376 134
6 3757834240 32
7 3757965312 16
7 4294967296 1179648
I had assumed (silly me) that if UEFI told me that the first 160 pages of memory were "conventional memory" (Type 7, free to use how you want), that I could use it. I thought those low memory addresses just weren't reserved if you were using UEFI. Clearly that's not correct, so what memory addresses should I "black out"? Everything below 1mb? Why doesn't UEFI mark these important sections as reserved anyway? Is it a quirk of using VirtualBox? Are there other important parts of memory I should be marking as reserved?
Thanks ahead of time!