Hi,
Izzette wrote:
Do the page tables alter the addresses of memory mapped hardware, can I leave them unmapped?
Paging is a "virtual address to physical address" conversion. It doesn't alter the physical addresses of anything (but allows you to map whatever you like at whatever virtual addresses you like).
Izzette wrote:
Do I need to ensure my page tables map the same virtual addresses to reserved/unusable RAM regions?
You need to ensure that you map whatever you like at whatever virtual addresses you like.
For example, for a device with memory mapped registers, a micro-kernel would probably create a new virtual address space when starting the device driver, and that device driver might tell the micro-kernel where it wants its device's registers to be mapped in its virtual address space, and the device's memory mapped registers
shouldn't/wouldn't be mapped anywhere else.
Also note that this applies to normal RAM too. For example, my OS is currently doing something I call "physical address space randomisation" (to reduce the risk of various security problems, like
this) where it's extremely impractical to pre-determine which physical page of RAM the OS will use for any virtual page of RAM (starting from extremely early during boot, such that it's impossible for me to determine which physical pages will be used by my own kernel's code).
Cheers,
Brendan