I am writing a small hobby OS as a learning experience. It's aimed at a 32-bit x86 architecture.
I am at the point where I need to create an initial page_directory so I can enable paging. At this point paging (and thus VM) is not enabled.
I have a function that reserves 4kb of unused memory and returns the starting address of this memory block.
I want to create an array, page_dir
(consisting of 1024 int), at the memory location returned by the function described above.
I understand the basic on pointers (I think), but I can't figure out how to do this.
How can I define the array page_table
at the physical address returned during runtime?