Paging & Memory Mapped I/O
Posted: Sat Jun 19, 2010 12:52 pm
Hello,
I have ran into this problem today when trying to think about how my VGA driver would work.
Assuming a given device uses memory mapped i/o, the driver for the device would need to use identity-mapped memory.
For example, the device uses memory mapped i/o at address 0xD0000000, then when the driver tries to access (virtual) address
0xD0000000 - it should be translated to physical address 0xD0000000.
In this case, how would driver identity-map the specific memory area for the device? would it have to directly manipulate the
paging structures!? the sole thought of this makes me sick.
And, if the kernel was to identity-map it, how would it know in advance which addresses have to be identity-mapped?
I have ran into this problem today when trying to think about how my VGA driver would work.
Assuming a given device uses memory mapped i/o, the driver for the device would need to use identity-mapped memory.
For example, the device uses memory mapped i/o at address 0xD0000000, then when the driver tries to access (virtual) address
0xD0000000 - it should be translated to physical address 0xD0000000.
In this case, how would driver identity-map the specific memory area for the device? would it have to directly manipulate the
paging structures!? the sole thought of this makes me sick.
And, if the kernel was to identity-map it, how would it know in advance which addresses have to be identity-mapped?