[PATCH] kexec/arm64: Add support for ARMv8.2 (large space addressing) 52-bit VA extensions

Simon Horman horms at verge.net.au
Fri Sep 25 02:07:17 EDT 2020


Hi Bhupesh,

thanks for your patch.

...

> +static int get_vabits_actual_from_id_aa64mmfr2_el1(void)
> +{
> +	int l_vabits_actual;
> +	unsigned long val;
> +
> +	/* Check if ID_AA64MMFR2_EL1 CPU-ID register indicates
> +	 * ARMv8.2/LVA support:
> +	 * VARange, bits [19:16]
> +	 *   From ARMv8.2:
> +	 *   Indicates support for a larger virtual address.
> +	 *   Defined values are:
> +	 *     0b0000 VMSAv8-64 supports 48-bit VAs.
> +	 *     0b0001 VMSAv8-64 supports 52-bit VAs when using the 64KB
> +	 *            page size. The other translation granules support
> +	 *            48-bit VAs.
> +	 *
> +	 * See ARMv8 ARM for more details.
> +	 */
> +	if (!(getauxval(AT_HWCAP) & HWCAP_CPUID)) {

Likely my build environment wants updating, but the above does not seem
to build in my (aged) environment.

$ aarch64-linux-gnu-gcc --version
aarch64-linux-gnu-gcc (Linaro GCC 7.2-2017.11) 7.2.1 20171011
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$ aarch64-linux-gnu-gcc -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wformat -O2 -fomit-frame-pointer -pipe -fno-strict-aliasing -Wall -Wstrict-prototypes -I/home/horms/local/opt/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-linux-gnu/include -I./include -I./util_lib/include -Iinclude/ -I ./kexec/ -I./kexec/libfdt -I./kexec/arch/arm64/include  -c -MD -o kexec/arch/arm64/kexec-uImage-arm64.o kexec/arch/arm64/kexec-uImage-arm64.c
kexec/arch/arm64/common-arm64.c: In function ‘get_vabits_actual_from_id_aa64mmfr2_el1’:
kexec/arch/arm64/common-arm64.c:133:30: error: ‘HWCAP_CPUID’ undeclared (first use in this function); did you mean ‘HWCAP_CRC32’?
  if (!(getauxval(AT_HWCAP) & HWCAP_CPUID)) {

...



More information about the kexec mailing list