vercas / Beelzebub

The Lord of Files - A hobby operating system

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

To do #9: Special cases for pages below and above 4-GiB

vercas opened this issue · comments

The pages above 4-GiB won't work with hardware that uses 32-bit addresses.
Therefore, it will be useful if generic pages are allocated above 4-GiB if available, to maximize the number of pages usable by such hardware.

On IA-32 with PAE (and AMD64 before switching to long mode), CR3 is 32 bits wide so the relevant table must be located under 4-GiB as well.

I'd rather build this into the generic page allocator because it is a situation that can happen on more than one architecture. Also, it will allow for slightly more compact storage.
I should also move the map and the stack at the end of the allocation space.

Note: VMWare seems to place most of the memory after the 4-GiB mark with my settings.
'Tis a rather handy feature.

The page allocator currently handles this task, and the general memory allocator will just forward the option.