From owner-freebsd-arm@freebsd.org Tue Jan 1 18:34:19 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 069A51424C00 for ; Tue, 1 Jan 2019 18:34:19 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E6E280FE9 for ; Tue, 1 Jan 2019 18:34:18 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1546367651; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=kCUpOOQoUApXN4hHG2V2l0Q0kBBpuIBnum7M7X9cCyfUWQ+oVAQ8fHMhQdGcznYGh78HgfWlxcbTb 9xTPU99L7KGjQQVZSpVD74pFXQBLK7alTacT/GcWKRwBmofhuLNYp6nTwJ26ufqrpu+3VsxOwABwJv DK1mNgmSjspaUK8aUZLGyapROzL4GLu2xjPb5tpfBlAM680//Jmqd75ySu/Hv6OS9gNVtab4MkJ2aU IDj3/rEp281fTYPF/itaV+C+GiZtS63qUt31P18/se8D7rnf6c+dIZupb2YH2tl2bip729Pa+MVX3K ZRbZ1qsW46wvSiPnUlHmC0H8aZ1Q8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:dkim-signature:from; bh=v86tWrIOOkoZcZ4wnCYUQsrj4WANhUPf6KhybhvJrYk=; b=ugDVoCOLNW0dgPSc5Q3kmGSydCHuXR5bdFu0cpiapIl8kqSZ9ZByDEnG8rZPvpz03yhI47rH1tHxJ THhHt0iXohP92Cj8Gg9McaqV4wVAYjGPvE/b04UEYFjSU0s3JAjBfe43F+qhMCsPLxE3T+aCtjg30z likxDXedyktHjk0veTL1Ka1HlvNfI7cbexf1PT6ds0hSN7WeLxNyTg43id9QQke0uMPflJhGr0NktA EXbx1T3RbeoPbEEs4Xvs00ijulV0qivqBKQ9RhUXJpjYQdeBfNwyGX1FyubO9Y9jTXeN+JgIOoZCBj Y5nYU9SeyEbn4FWl/0KCSTePI8vB14Q== ARC-Authentication-Results: i=1; outbound2.eu.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:to:from:subject:message-id:from; bh=v86tWrIOOkoZcZ4wnCYUQsrj4WANhUPf6KhybhvJrYk=; b=bnETfi5JopdCPxKbSi9ZDG+I5RGnhy8/IeuM3ClWadvq9d51XFp56GQ/z91bOy902LjcazfR7mhGW /uwzDb7Jo/zxyM50WKgZ8vkUzXE68JjDMIDlCgYMHnlHegNNZle6w/qCH7vfZik8kNljjipFqDQFKk sD93o8yKukeIVHk79bzgO3bGHQc6Gd7uMbFf7P+xorrobXK2yro6pRAltwEW8rD6Ip/IWExBet5hAP w9ZwQU/dzI+XGRVOF03q679dsLO1dtUjRWf/pXpJPWeo11ERh9MtPOlZlBCrWrTV16mvEs+jvvTwaH O3bWZXNdXMEgHCo1JcstHlkhUjTgHdw== X-MHO-RoutePath: aGlwcGll X-MHO-User: d2cd56cb-0df3-11e9-a887-bd2f23b465e5 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.eu.mailhop.org (Halon) with ESMTPSA id d2cd56cb-0df3-11e9-a887-bd2f23b465e5; Tue, 01 Jan 2019 18:34:09 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x01IY7bu034238; Tue, 1 Jan 2019 11:34:07 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1546367647.78877.105.camel@freebsd.org> Subject: Re: What's the difference between armv6 and armv7? From: Ian Lepore To: Jonathan Chen , freebsd-arm@freebsd.org Date: Tue, 01 Jan 2019 11:34:07 -0700 In-Reply-To: References: Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4E6E280FE9 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.99 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.99)[-0.990,0]; ASN(0.00)[asn:16509, ipnet:52.58.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jan 2019 18:34:19 -0000 On Wed, 2019-01-02 at 06:36 +1300, Jonathan Chen wrote: > Hi, > > Sorry if this sounds like a simple question, but what is the > difference between armv6 and armv7 TARGET_ARCH? I had opportunity to > try out both for STABLE-12 the past few days, and the resultant > kernel > and binaries both work for the RPI2. The file(1) output doesn't > appear > to offer any distinguishing features either: > > rpi2:~,6:35am> file /usr/bin/true > /usr/bin/true: ELF 32-bit LSB executable, ARM, EABI5 version 1 > (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for > FreeBSD 12.0 (1200500), FreeBSD-style, stripped > > Thanks For a long time, freebsd made no distinction between armv6 and v7 and everything worked pretty well. The few places where the minor differences between v6 and v7 mattered were in the kernel, and it detected the hardware type at runtime and coped. Pretending that v6 and v7 were the same caused problems mainly for ports, which  sometimes compile differently for v6 and v7 (they use #ifdef). Running a v6 kernel and world on v7 hardware may mostly work, depending on which ports/pkgs you use, but that's really an accident. The only real armv6 systems that freebsd supports are the original rpi and rpi-b (the ones with the single-core processor). Everything else is v7 for 32-bit or v8 for 64-bit. Your rpi-2, being multi-core, definitely needs to be running v7. To see the difference in a binary, use "readelf -A" and look for Tag_CPU_arch in the output. (I guess file(1) should be taught to find those tags and report the file type with more detail.) -- Ian