When CPU is in protected mode it expects all addresses to be virtual. Kernel resides in physical memory and uses physical addresses for its internal purposes. When developing a driver driver framework routines must access some memory locations with specific physical address (regarding to memory mapping addresses for that device). So what mechanism allows to use physical address in protected mode?
Asked
Active
Viewed 281 times
0
-
I asked not right a little bit. I meant hardware aspect of this question with no regard to specifics of some driver framework. CPU can't use physical addresses in protected mode, so does it send commands to DMA controller to do the data transfer? If DMA uses physical addresses it acquits its existence (with fact that CPU can perform some computations while DMA manages RAM and port access). Is there any documentation about using DMA except Linux kernel source? – igntec Oct 28 '13 at 14:34
1 Answers
0
The driver framework or API will tell these to you. I've been using windriver (http://www.jungo.com/) to write a PCI driver. When you allocate memory using this API, it will give you two addresses, one the virtual one which is valid for the application, and a physical one which you give to the device. Other frameworks/apis will most likely do it similarly.

PMF
- 14,535
- 3
- 23
- 49