On 4/16/07, srinivas bakki <srinivas.bakki@xxxxxxxxx> wrote:
On 4/16/07, Prasad Joshi <prasadjoshi124@xxxxxxxxx > wrote:Hi All,
I am going through LDD3 book and got confussed with the different Address Types mentioned in the Chapter 15 of the book.
It mentions following list of address types
- User Virtual Addresses
- Physical Addresses
- Bus Addresses
- Kernel logical addresses
- Kernel virtual addresses
I do know that
User Virtual addresses: are the addresses seen by the user space programs.
Physical Addresses: Physical memory addresses.
Bus Addresses: Generally same as Physical addresses but, presence of IOMMU will change the Bus address to Physical address.
But, I am not understanding the difference bet Kernel logical addresses and Kernel virtual addresses.
Please clarify.
Thanks in advance.
Thanks and Ragards,
Prasad.
lets take the case of 3 gb to 1gb virtual address split between the kernel and user mode. Here the last 1 gb addresses used by kernel are from 0xC0000000 to 0xFFFFFFFF .Of this, first 896 MB is mapped to the physical memory with only an offset added to it. In this case the physical address 0x0 is mapped to 0xC0000000 and likewise 0x100 is 0xC0000100 and so on with offset being 0xC0000000.These addresses are kernel logical addresses.
So that means the Zone DMA (on x86 upto 16MB) is mapped first i.e. to 0xC0000000?
Furthermore the virtual field in the page structure coresponds to this kernel logical address and it never changes if the page belongs to ZONE_NORMAL?
However the last 128 MB is not mapped with just an offset which means you cannot get the physical address corresponding to the virtual address just by subtracting 0xC0000000. This is a dynamic mapping wherein the kernel maps(extends page tables) the physical memory as and when requested.These addresses are kernel virtual adsresses.RegardsSrinivas Bakki
Regards,
Adil Mujeeb