Re: difference between Kernel Logical Addresses and Kernel virtual addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/10/9 Dev Null <devnullfin@xxxxxxxxx>:
> Hello Folks,
> I would like to know the core differences between Kernel logical
> address(KLA) and kernel virtual address(KVA).
> I know few differences about them like:
> 1. KLA is somewhat similar to Physical address but it has some logical base
> address and offset such that it is not pointing to physical address.
> 2. KLA --> kmalloc , KVA --> vmalloc
> 3. Sometimes, all KLA are KVA, but many KVA are not KLA.
> In Linux, how can you point to actual physical address? Does that mean there
> is one more layer of MMU between KLA and physical address?
> Please feel free to comment on my questions and help me to get the clear
> understanding of MMU of Linux.

http://www.linuxdriver.co.il/ldd3/chp-15-sect-1.shtml
Kernel logical addresses
These make up the normal address space of the kernel. These addresses
map some portion (perhaps all) of main memory and are often treated as
if they were physical addresses. On most architectures, logical
addresses and their associated physical addresses differ only by a
constant offset. Logical addresses use the hardware's native pointer
size and, therefore, may be unable to address all of physical memory
on heavily equipped 32-bit systems. Logical addresses are usually
stored in variables of type unsigned long or void *. Memory returned
from kmalloc has a kernel logical address.

Kernel virtual addresses
Kernel virtual addresses are similar to logical addresses in that they
are a mapping from a kernel-space address to a physical address.
Kernel virtual addresses do not necessarily have the linear,
one-to-one mapping to physical addresses that characterize the logical
address space, however. All logical addresses are kernel virtual
addresses, but many kernel virtual addresses are not logical
addresses. For example, memory allocated by vmalloc has a virtual
address (but no direct physical mapping). The kmap function (described
later in this chapter) also returns virtual addresses. Virtual
addresses are usually stored in pointer variables.

> Thanks,
> Dev Null



-- 
Best Regards
Lin

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux