arm64: Direct access to Mckernel memory from Linux.
Change-Id: I1a096aa5232c56382ae19d8c4e4f41d4e3e9f660
This commit is contained in:
committed by
Dominique Martinet
parent
20d5900c35
commit
aa3c5e91db
@@ -55,13 +55,14 @@ uintptr_t virt_to_phys(uintptr_t va)
|
||||
{
|
||||
extern uintptr_t kernel_base;
|
||||
|
||||
if (va >= MAP_ST) {
|
||||
return (va - MAP_ST);
|
||||
}
|
||||
|
||||
if (va >= MAP_KERNEL) {
|
||||
return (va - MAP_KERNEL + kernel_base);
|
||||
}
|
||||
|
||||
if (va >= MAP_ST) {
|
||||
return (va - MAP_ST);
|
||||
}
|
||||
return NOPHYS;
|
||||
} /* virt_to_phys() */
|
||||
#endif /* POSTK_DEBUG_ARCH_DEP_34 */
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
#
|
||||
# if (CONFIG_ARM64_VA_BITS == 42)
|
||||
# /* VA_BITS=42, 64K_PAGE address */
|
||||
# define MAP_KERNEL 0xffffffffe0000000
|
||||
# define MAP_KERNEL 0xfffffc0007800000
|
||||
# define MAP_ST 0xfffffe0000000000
|
||||
# define MAP_KERNEL_TEXT "0xffffffffe0000000"
|
||||
# define MAP_KERNEL_TEXT "0xfffffc0007800000"
|
||||
#
|
||||
# elif (CONFIG_ARM64_VA_BITS == 48)
|
||||
# /* VA_BITS=48, 64K_PAGE address */
|
||||
# define MAP_KERNEL 0xffffffffe0000000
|
||||
# define MAP_KERNEL 0xffff000007800000
|
||||
# define MAP_ST 0xffff800000000000
|
||||
# define MAP_KERNEL_TEXT "0xffffffffe0000000"
|
||||
# define MAP_KERNEL_TEXT "0xffff000007800000"
|
||||
#
|
||||
# else
|
||||
#
|
||||
@@ -26,15 +26,15 @@
|
||||
#
|
||||
# if (CONFIG_ARM64_VA_BITS == 39)
|
||||
# /* VA_BITS=39, 4K_PAGE address */
|
||||
# define MAP_KERNEL 0xffffffffff800000
|
||||
# define MAP_KERNEL 0xffffff8007800000
|
||||
# define MAP_ST 0xffffffc000000000
|
||||
# define MAP_KERNEL_TEXT "0xffffffffff800000"
|
||||
# define MAP_KERNEL_TEXT "0xffffff8007800000"
|
||||
#
|
||||
# elif (CONFIG_ARM64_VA_BITS == 48)
|
||||
# /* VA_BITS=48, 4K_PAGE address */
|
||||
# define MAP_KERNEL 0xffffffffff800000
|
||||
# define MAP_KERNEL 0xffff000007800000
|
||||
# define MAP_ST 0xffff800000000000
|
||||
# define MAP_KERNEL_TEXT "0xffffffffff800000"
|
||||
# define MAP_KERNEL_TEXT "0xffff000007800000"
|
||||
#
|
||||
# else
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user