Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 982aa7c5 authored by Kristina Martsenko's avatar Kristina Martsenko Committed by Catalin Marinas
Browse files

arm64: add kconfig symbol to configure physical address size



ARMv8.2 introduces support for 52-bit physical addresses. To prepare for
supporting this, add a new kconfig symbol to configure the physical
address space size. The symbols will be used in subsequent patches.
Currently the only choice is 48, a later patch will add the option of 52
once the required code is in place.

Tested-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
Tested-by: default avatarBob Picco <bob.picco@oracle.com>
Reviewed-by: default avatarBob Picco <bob.picco@oracle.com>
Acked-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarKristina Martsenko <kristina.martsenko@arm.com>
[catalin.marinas@arm.com: folded minor patches into this one]
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 50c4c4e2
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -646,6 +646,22 @@ config ARM64_VA_BITS
	default 47 if ARM64_VA_BITS_47
	default 48 if ARM64_VA_BITS_48

choice
	prompt "Physical address space size"
	default ARM64_PA_BITS_48
	help
	  Choose the maximum physical address range that the kernel will
	  support.

config ARM64_PA_BITS_48
	bool "48-bit"

endchoice

config ARM64_PA_BITS
	int
	default 48 if ARM64_PA_BITS_48

config CPU_BIG_ENDIAN
       bool "Build big-endian kernel"
       help
+1 −1
Original line number Diff line number Diff line
@@ -196,7 +196,7 @@
/*
 * Highest possible physical address supported.
 */
#define PHYS_MASK_SHIFT		(48)
#define PHYS_MASK_SHIFT		(CONFIG_ARM64_PA_BITS)
#define PHYS_MASK		((UL(1) << PHYS_MASK_SHIFT) - 1)

/*
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#define __ASM_SPARSEMEM_H

#ifdef CONFIG_SPARSEMEM
#define MAX_PHYSMEM_BITS	48
#define MAX_PHYSMEM_BITS	CONFIG_ARM64_PA_BITS
#define SECTION_SIZE_BITS	30
#endif