From nobody Wed Jun 30 12:19:48 2021 X-Original-To: freebsd-arm@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4C53811F011E for ; Wed, 30 Jun 2021 12:19:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFL501ZMkz3kKk for ; Wed, 30 Jun 2021 12:19:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1F56A483E for ; Wed, 30 Jun 2021 12:19:48 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 15UCJmeK073731 for ; Wed, 30 Jun 2021 12:19:48 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 15UCJmTT073730 for freebsd-arm@FreeBSD.org; Wed, 30 Jun 2021 12:19:48 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 256903] arm64: ELF auxiliary vectors for armv7 processors miss VFP information Date: Wed, 30 Jun 2021 12:19:48 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: fuz@fuz.su X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256903 Bug ID: 256903 Summary: arm64: ELF auxiliary vectors for armv7 processors miss VFP information Product: Base System Version: 13.0-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: fuz@fuz.su While trying to run armv7 Go programs in a native armv7 jail on arm64 FreeB= SD 13.0-RELEASE, I noticed that they refuse to run: $ /usr/local/bin/go=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 runtime: this CPU has no floating point hardware, so it cannot run this GOARM=3D7 binary. Recompile using GOARM=3D5. This error message is produced by src/runtime/os_freebsd_arm.go in the Go toolchain: if goarm > 5 && cpu.HWCap&_HWCAP_VFP =3D=3D 0 { print("runtime: this CPU has no floating point hardware, so= it cannot run\n") print("this GOARM=3D", goarm, " binary. Recompile using GOARM=3D5.\n") exit(1) } and cpu.HWCap is set from the _AT_HWCAP ELF auxillary vector: func archauxv(tag, val uintptr) { switch tag { case _AT_HWCAP: cpu.HWCap =3D uint(val) case _AT_HWCAP2: cpu.HWCap2 =3D uint(val) } } Checking these vectors with a simple test program shows that they are missi= ng: #include #include int main() { unsigned long hwcap, hwcap2; if (elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap) !=3D 0) { perror("elf_aux_info(AT_HWCAP)"); } if (elf_aux_info(AT_HWCAP2, &hwcap2, sizeof hwcap2) !=3D 0) { perror("elf_aux_info(AT_HWCAP2)"); } printf("0x%08lx 0x%08lx\n", hwcap, hwcap2); } On an ARMv7 machine, this prints 0x001fb8d6 0x00000000 as expected. However, in a native armv7 jail on an arm64 machine, we instead get elf_aux_info(AT_HWCAP): No such file or directory elf_aux_info(AT_HWCAP2): No such file or directory 0x00000000 0x00000000 showing that the auxillary vectors are missing. Please make sure these auxillary vectors are present when running armv7 binaries on arm64 FreeBSD. --=20 You are receiving this mail because: You are the assignee for the bug.=