Difference between Kernel Virtual Address and Kernel Logical Address?

后端 未结 4 965
孤城傲影
孤城傲影 2021-01-31 04:07

I am not able to exactly difference between kernel logical address and virtual address. In Linux device driver book it says that all logical address are kernel virtual address,

4条回答
  •  伪装坚强ぢ
    2021-01-31 04:43

    Simply speaking, virtual address would include "high memory", which doesn't do the 1:1 mapping for the physical address,if your RAM size is more than the address range of kernel(typically,For 1G/3G in X86,your RAM is 3G but your kernel addressing range is 1G) and also the address return from kmap() and vmalloc(), which requires the kernel to establish page table for the memory mapping. since logic address is always memory mapped by the kernel(1:1 mapping), you don't need to explicitly call kernel API,like set_pte to set up the page table entry for the particular page.

    so virtual address can't be logic address all the time.

提交回复
热议问题