arm64: fix phys_to_virt() calculation to be the same as Linux.
Change-Id: Ibbe17d33fd80eacff990b053fa17d8d320c227f1
This commit is contained in:
@ -56,7 +56,7 @@ uintptr_t virt_to_phys(uintptr_t va)
|
||||
extern uintptr_t kernel_base;
|
||||
|
||||
if (va >= MAP_ST) {
|
||||
return (va - MAP_ST);
|
||||
return (va - MAP_ST + PHYS_OFFSET);
|
||||
}
|
||||
|
||||
if (va >= MAP_KERNEL) {
|
||||
|
||||
@ -2,6 +2,9 @@
|
||||
#ifndef HEADER_USER_ARM64_ECLAIR_H
|
||||
#define HEADER_USER_ARM64_ECLAIR_H
|
||||
|
||||
/* PHYS_OFFSET needs to be changed according to the environment. */
|
||||
#define PHYS_OFFSET 0x40000000
|
||||
|
||||
#ifdef CONFIG_ARM64_64K_PAGES
|
||||
#
|
||||
# if (CONFIG_ARM64_VA_BITS == 42)
|
||||
|
||||
Reference in New Issue
Block a user