ARM64 Linux kernel virtual address space

地址分布
虚拟地址都用64位无符号数表示。
用户虚拟地址从高位的63到低位的48都是0,内核虚拟地址则相反,63~48都是1. TTBR x(Translation table base register)的选择是通过虚拟地址的第63 bit位来确定的。swapper_pg_dir只包含内核地址映射,而用户

One good thing on ARM64 is that since we have enough virtual address bits, user space and kernel space can have their own 2^39 = 512GB virtual addresses!

All user virtual addresses have 25 leading zeros and kernel addresses have 25 leading ones. Address between user space and kernel space are not used and they are used to trap illegal accesses.

ARM64 Linux kernel virtual address space
ARM64 Linux virtual address space layout

reference:

http://thinkiii.blogspot.com/2014/02/arm64-linux-kernel-virtual-address-space.html