From owner-freebsd-arm@FreeBSD.ORG Mon Jun 22 23:44:11 2015 Return-Path: Delivered-To: freebsd-arm@nevdull.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 880E877E for ; Mon, 22 Jun 2015 23:44:11 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from kif.fubar.geek.nz (kif.fubar.geek.nz [178.62.119.249]) by mx1.freebsd.org (Postfix) with ESMTP id 566EE9A8 for ; Mon, 22 Jun 2015 23:44:10 +0000 (UTC) (envelope-from andrew@fubar.geek.nz) Received: from bender.Home (97e07b11.skybroadband.com [151.224.123.17]) by kif.fubar.geek.nz (Postfix) with ESMTPSA id 32AEED7E1C for ; Mon, 22 Jun 2015 23:35:13 +0000 (UTC) Date: Tue, 23 Jun 2015 00:35:12 +0100 From: Andrew Turner To: Subject: HEADS UP: Changing the arm64 userland entry ABI Message-ID: <20150623003512.0e2c03b6@bender.Home> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.27; amd64-portbld-freebsd10.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Jun 2015 23:44:11 -0000 If you don't use FreeBSD/arm64 you can stop reading now. I'm changing the ABI for how the kernel provides the stack and the pointer to the arguments. Currently both are provided through the stack pointer, however this means the stack may be misaligned. I'm changing this to have the stack pointer be correctly aligned, and have a register (x0) point to the arguments. This will mean a new kernel with old userland, or vice versa will fail. To allow for there to be a transition, I've updated the userland side to handle either the current or new ABI, and expect to update the kernel in a week or two. When the kernel is updated only a userland built from r284707 [1] or later will work. There will also need to be similar changes made to qemu usermode to support this. The good news from this is this fixes the crash seen with clang, and I have managed to get buildkernel to complete. Andrew [1] https://svnweb.freebsd.org/changeset/base/284707