Define MAP_KERNEL_START by resolving MODULES_END at cmake time

Change-Id: Ib88fc045b64c4ad2dad6a4b13cb0372a735a26ab
This commit is contained in:
Balazs Gerofi
2020-04-02 14:53:43 +09:00
committed by Masamichi Takagi
parent 33eef71133
commit 04d17dd3e9
15 changed files with 85 additions and 45 deletions

View File

@ -56,7 +56,8 @@ extern char _end[];
#endif /* !__ASSEMBLY__ */
/*
* MAP_KERNEL_START is HOST MODULES_END - 8MiB
* MAP_KERNEL_START is HOST MODULES_END - 8MiB.
* It's defined by cmake.
*/
#if (VA_BITS == 39 && GRANULE_SIZE == _SZ4KB) /* ARM64_MEMORY_LAYOUT=1 */
#
@ -67,7 +68,6 @@ extern char _end[];
# define MAP_VMAP_SIZE UL(0x0000000100000000)
# define MAP_FIXED_START UL(0xffffffbffbdfd000)
# define MAP_ST_START UL(0xffffffc000000000)
# define MAP_KERNEL_START UL(0xffffff8007800000)
#
#elif (VA_BITS == 42 && GRANULE_SIZE == _SZ64KB) /* ARM64_MEMORY_LAYOUT=3 */
#
@ -78,7 +78,6 @@ extern char _end[];
# define MAP_VMAP_SIZE UL(0x0000000100000000)
# define MAP_FIXED_START UL(0xfffffdfffbdd0000)
# define MAP_ST_START UL(0xfffffe0000000000)
# define MAP_KERNEL_START UL(0xfffffc0007800000)
#
#elif (VA_BITS == 48 && GRANULE_SIZE == _SZ4KB) /* ARM64_MEMORY_LAYOUT=2 */
#
@ -89,7 +88,6 @@ extern char _end[];
# define MAP_VMAP_SIZE UL(0x0000000100000000)
# define MAP_FIXED_START UL(0xffff7ffffbdfd000)
# define MAP_ST_START UL(0xffff800000000000)
# define MAP_KERNEL_START UL(0xffff000007800000)
#
#elif (VA_BITS == 48 && GRANULE_SIZE == _SZ64KB) /* ARM64_MEMORY_LAYOUT=4 */
#
@ -100,7 +98,6 @@ extern char _end[];
# define MAP_VMAP_SIZE UL(0x0000000100000000)
# define MAP_FIXED_START UL(0xffff7ffffbdd0000)
# define MAP_ST_START UL(0xffff800000000000)
# define MAP_KERNEL_START UL(0xffff000007800000)
#
#else
# error address space is not defined.