Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Dec 2019 13:51:15 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org>
Subject:   devel/freebsd-gcc9@aarch64 and devel/binutils@aarch64: locore.S vs. gcc toolchain notational mismatch (icc_sre_el2)
Message-ID:  <37D45724-F490-420E-B33E-3FD165D4FC53@yahoo.com>
References:  <37D45724-F490-420E-B33E-3FD165D4FC53.ref@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help

/usr/src/sys/arm64/arm64/locore.S: Assembler messages:
/usr/src/sys/arm64/arm64/locore.S:282: Error: unknown or missing system =
register name at operand 2 -- `mrs x2,icc_sre_el2'
/usr/src/sys/arm64/arm64/locore.S:285: Error: unknown or missing system =
register name at operand 1 -- `msr icc_sre_el2,x2'
*** [locore.o] Error code 1

make[2]: stopped in =
/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/sys/=
GENERIC-NODBG
.ERROR_TARGET=3D'locore.o'
=
.ERROR_META_FILE=3D'/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/sr=
c/arm64.aarch64/sys/GENERIC-NODBG/locore.o.meta'
.MAKE.LEVEL=3D'2'
MAKEFILE=3D''
.MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes =
verbose curdirOk=3Dyes'
_ERROR_CMD=3D'/usr/local/bin/aarch64-unknown-freebsd13.0-gcc9 =
-mcpu=3Dcortex-a53 =
--sysroot=3D/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.=
aarch64/tmp -B/usr/local/aarch64-unknown-freebsd13.0/bin/ -c -x =
assembler-with-cpp -DLOCORE -O -pipe  -g -nostdinc  -I. -I/usr/src/sys =
-I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt =
-D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h    =
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer =
-fdebug-prefix-map=3D./machine=3D/usr/src/sys/arm64/include =
-mgeneral-regs-only -ffixed-x18 -ffreestanding -fwrapv -fstack-protector =
-gdwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes =
-Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef =
-Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs =
-fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=3Daddress =
-Wno-error=3Daggressive-loop-optimizations -Wno-error=3Darray-bounds =
-Wno-error=3Dattributes -Wno-error=3Dcast-qual -Wno-error=3Denum-compare =
-Wno-error=3Dinline -Wno-error=3Dmaybe-uninitialized -Wno-error=3Doverflow=
 -Wno-error=3Dsequence-point -Wno-unused-but-set-variable =
-Wno-error=3Dmisleading-indentation -Wno-error=3Dnonnull-compare =
-Wno-error=3Dshift-overflow -Wno-error=3Dtautological-compare =
-Wno-error=3Dstringop-overflow -Wno-error=3Dmemset-elt-size =
-Wno-error=3Dpacked-not-aligned -Wno-address-of-packed-member =
-Wno-format-zero-length   -v -fno-common -fms-extensions =
-finline-limit=3D8000 --param inline-unit-growth=3D100 --param =
large-function-growth=3D1000 -fms-extensions  -std=3Diso9899:1999  =
-Werror /usr/src/sys/arm64/arm64/locore.S;'
=
.CURDIR=3D'/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.a=
arch64/sys/GENERIC-NODBG'

FYI:

# grep -U5 icc_sre_el2 /usr/src/sys/arm64/arm64/locore.S
	ubfx	x2, x2, #ID_AA64PFR0_GIC_SHIFT, #ID_AA64PFR0_GIC_BITS
	/* GIC[3:0] =3D=3D 0001 - GIC CPU interface via special regs. =
supported */
	cmp	x2, #(ID_AA64PFR0_GIC_CPUIF_EN >> ID_AA64PFR0_GIC_SHIFT)
	b.ne	2f

	mrs	x2, icc_sre_el2
	orr	x2, x2, #ICC_SRE_EL2_EN	/* Enable access from insecure =
EL1 */
	orr	x2, x2, #ICC_SRE_EL2_SRE	/* Enable system =
registers */
	msr	icc_sre_el2, x2
2:

	/* Set the address to return to our return address */
	msr	elr_el2, x30
	isb


(devel/freebsd-gcc6 likely has the same status.)

The context was head -r355976 based.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37D45724-F490-420E-B33E-3FD165D4FC53>