From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VhflG-0006L2-1J for mharc-grub-devel@gnu.org; Sat, 16 Nov 2013 08:18:06 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vhfl9-0006Kr-J1 for grub-devel@gnu.org; Sat, 16 Nov 2013 08:18:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vhfl4-0004R2-6u for grub-devel@gnu.org; Sat, 16 Nov 2013 08:17:59 -0500 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]:46076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vhfl3-0004Qp-Vb for grub-devel@gnu.org; Sat, 16 Nov 2013 08:17:54 -0500 Received: by mail-ee0-f43.google.com with SMTP id c13so948109eek.16 for ; Sat, 16 Nov 2013 05:17:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=B8zAXGy4DKyU19je63aNb/Z1YkUsJWIHYa5pg7+tIJM=; b=C9fqwWg/esqaBPRiB1KeC4RTVB0FKr0ndXEPMsCjfJ1XCWNKSxW6y+1SO0BmD3YBHZ Tb9z0nj/0sIRjmElrjaenyxNrtvY+le32npmX+pai1asg0vXfyaePWxoO6ZukHZYXunV ZQs77smbpnt0KpXNfrJ518q8NVXkHktxfQLBPXrTgPhiGi69Nxta8MdUUmmFwVDZ9vXg bGxLqEoqR87KDEojo7bewxQCsHf3/yLfeuPyYdU2tqbxYqyNYmKYJ1YF7da2+1z5GXcL qL1A7ApXy4OEBE6p115U4o0rNyXI7neB63eKPGg+TgStWQptgmNkhFzo9/9dNG0FHf0G +FDw== X-Received: by 10.15.50.195 with SMTP id l43mr7817699eew.30.1384607873056; Sat, 16 Nov 2013 05:17:53 -0800 (PST) Received: from [192.168.1.16] (31-249.1-85.cust.bluewin.ch. [85.1.249.31]) by mx.google.com with ESMTPSA id i1sm16746749eeg.0.2013.11.16.05.17.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 16 Nov 2013 05:17:52 -0800 (PST) Message-ID: <5287707F.5090207@gmail.com> Date: Sat, 16 Nov 2013 14:17:51 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH] arm: fix u-boot port syscall interface va_arg handling (was Re: [PATCH] [ARM] Enable boot module for arm) References: <51EBE025.6040302@gmail.com> <51F137FE.4030102@gmail.com> <51F139FF.2030402@gmail.com> <51F13E82.7040207@gmail.com> <20130727074625.64ad89d2@opensuse.site> <51F34AE4.1080709@gmail.com> <20131115231325.1d3fa95a@opensuse.site> <5286C02B.9050404@gmail.com> <20131116123941.GC30374@rocoto.smurfnet.nu> <528769EF.9070207@gmail.com> <20131116130010.GD30374@rocoto.smurfnet.nu> In-Reply-To: <20131116130010.GD30374@rocoto.smurfnet.nu> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2IDMMRTHCUOGACLMEDCUW" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c00::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Nov 2013 13:18:05 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2IDMMRTHCUOGACLMEDCUW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 16.11.2013 14:00, Leif Lindholm wrote: > On Sat, Nov 16, 2013 at 01:49:51PM +0100, Vladimir '=CF=86-coder/phcode= r' Serbinenko wrote: >> On 16.11.2013 13:39, Leif Lindholm wrote: >>> - str r9, transition_space + 8 >> You need to save r9. Otherwise GRUB will crash if compiled with clang.= >=20 > Hmm, but this is a bug in clang in that case. >=20 > From an ABI perspective, grub_uboot_syscall is a veneer: > the only visible side effect it is permitted to have is to corrupt r12.= >=20 According to wikipedia: "Subroutines must preserve the contents of r4 to r11 and the stack pointe= r." So changing r9 sounds to me like this is actually U-Boot bug and preserving it sounds like right way to handle it. What's the harm in preserving r9? Is it used for something in calling? > We need to additionally switch r8 between grub and u-boot copy because > u-boot uses it for its global data pointer, and lr because we need to > corrupt it to make u-boot return to this veneer to switch the r8 back > again. >=20 > This veneer should not touch anything else - so if we need to > temporarily work around a toolchain ABI bug, can we do this via an > ifdef and a config option? >=20 If the bug is on clang side (I doubt it right now), there is no way to handle it without side effects and we can invent a test for it, we can reject buggy compilers (clang is secondary compiler) > / > Leif >=20 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 ------enig2IDMMRTHCUOGACLMEDCUW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKHcH8ACgkQmBXlbbo5nOsDAwD9FoGAzBbN1gilqQl3zkgAqDS2 ppXHShLPSuMrHHfLpaMBAJE/GrwpIVbnB1FLb/UQm3T4uWu7ILHQKMtBxvXS7cu3 =wSkG -----END PGP SIGNATURE----- ------enig2IDMMRTHCUOGACLMEDCUW--