Do the page tables alter the addresses of memory mapped hardware, can I leave them unmapped?
Do I need to ensure my page tables map the same virtual addresses to reserved/unusable RAM regions?
Paging, Memory-Mapped Hardware, and Reserved RAM.
Re: Paging, Memory-Mapped Hardware, and Reserved RAM.
they would excactly beheave just like generic memory locations
Operating system for SUBLEQ cpu architecture:
http://users.atw.hu/gerigeri/DawnOS/download.html
http://users.atw.hu/gerigeri/DawnOS/download.html
Re: Paging, Memory-Mapped Hardware, and Reserved RAM.
What I did is even re-mapping all my devices to a special address so I can make use of the whole memory linear without any used blocks in between.
So yes, it behaves exactly like normal memory too.
So yes, it behaves exactly like normal memory too.
Re: Paging, Memory-Mapped Hardware, and Reserved RAM.
@Ch4ozz, so I'm assuming you remapped reserved regions too? And your computer didn't get mad at you?
Re: Paging, Memory-Mapped Hardware, and Reserved RAM.
Hi,
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
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 the page tables alter the addresses of memory mapped hardware, can I leave them unmapped?
You need to ensure that you 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?
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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.