From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Ub90d-00076G-Hm for mharc-grub-devel@gnu.org; Sat, 11 May 2013 08:34:43 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ub90Z-00076A-V9 for grub-devel@gnu.org; Sat, 11 May 2013 08:34:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ub90Y-0007Pt-VF for grub-devel@gnu.org; Sat, 11 May 2013 08:34:39 -0400 Received: from mail-ea0-x235.google.com ([2a00:1450:4013:c01::235]:46292) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ub90Y-0007Pm-PK for grub-devel@gnu.org; Sat, 11 May 2013 08:34:38 -0400 Received: by mail-ea0-f181.google.com with SMTP id a11so390934eae.12 for ; Sat, 11 May 2013 05:34:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:x-enigmail-version:content-type; bh=8U4MNGjr63dYI9MFm6NugeuCtbnNnWRG92YIJuJUg60=; b=B47+v7c6Ntc80qAsBZxD9cbY9Feadpg2rSPL8KTefNfxX8IKigQbvQghSwvUQVe7Zm NuSTkreKgqmynudD1XJZ+jMDZUmeXke7nzstNwQ5UIqa1SHWkrr3sSSqGnRAduJZu3Ft VKS3jM/BGnhUAOVmDneyBl6cDqAVCYF6WEeq8WiE8uL+/TYSM5nFmbq+Syct1PApcl9f OaS4j2gUo0FG2X6bj69Z6Y/w56MHgf8oX0SXTorVq1Y9yhJvUz8YNSWiPUOSjeH/7CZ4 nIAe0ZYfwwVQS2NAPAZJJcIcfYiwcRgNkQD52v5MkcLZzHD9po8shaEY1bHIEdBaoL1Q iChg== X-Received: by 10.15.49.199 with SMTP id j47mr9222180eew.24.1368275677236; Sat, 11 May 2013 05:34:37 -0700 (PDT) Received: from debian.x201.phnet (vpn-global-dhcp3-020.ethz.ch. [129.132.210.20]) by mx.google.com with ESMTPSA id n7sm9820869eeo.0.2013.05.11.05.34.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 11 May 2013 05:34:36 -0700 (PDT) Message-ID: <518E0488.5040703@gmail.com> Date: Sat, 11 May 2013 10:42:48 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.12) Gecko/20130116 Icedove/10.0.12 MIME-Version: 1.0 To: Leif Lindholm Subject: Re: [PATCH 7/7] Add support for ARM UEFI ("EFI") platforms References: <5159B4CB.2040300@gmail.com> <20130403180757.GO23069@rocoto.smurfnet.nu> <515C8AB7.7000602@gmail.com> <20130404125414.GP23069@rocoto.smurfnet.nu> <51645046.6070403@gmail.com> <20130509180853.GH28516@rocoto.smurfnet.nu> In-Reply-To: <20130509180853.GH28516@rocoto.smurfnet.nu> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigD5CF5665B602A322C5A9FC1B" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4013:c01::235 Cc: The development of GRUB 2 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, 11 May 2013 12:34:42 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigD5CF5665B602A322C5A9FC1B Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Committed to arm branch after fixing few bugs. On 09.05.2013 20:08, Leif Lindholm wrote: > On Tue, Apr 09, 2013 at 07:30:46PM +0200, Vladimir '=CF=86-coder/phcode= r' Serbinenko wrote: >>> Since I didn't want to have to duplicate my relocation handling >>> between kernel and grub-mkimage, I use kern/arm/dl.c for both. >> >> Could you move the common functions to dl_helper.c as in ISA64? > =20 > Done in the attached patch. >=20 >>> In order to do that in an endianess-safe way, I need to be able to >>> export target platform information over there, as well as the >>> host_to_target/target_to_host macros. This would involve moving these= >>> macros, as well as the struct image_target_desc definition, out of >>> grub-mkimage.c. >> >> Is big-endian ARM of any interest at all? I was under impression that = it >> was limited to few devices and not supported by either u-boot or EFI. >> You still have grub_le_to_cpu / grub_cpu_to_le > =20 > It shouldn't be of much interest at the boot stage, but even if it is > there are two things that make life easier: > 1) With the endianess support introduced in ARMv6 (supported by RasPi),= > instructions are always little-endian. This would leave only the > abs32 relocations as needing to be configured for a specific target.= > 2) The UEFI spec (2.3.1) states that on an ARM processor, little-endian= > will always be the configured state of the data interface(s). >=20 >>> However, this would also make it possible to do the same for IA64, >>> and get rid of some code duplication between grub-mkimagexx.c and >>> kern/ia64/dl.c. >> >> I already did. For IA64 I simply used le_to_cpu/cpu_to_le as ia64-efi = is >> always little-endian >=20 > I was referring more to functions like add_value_to_slot_* that are > duplicated between these files. But of course, given the IA64 fixed > endianess, the other part of my comment was irrelevant :) >=20 > Attached is a patch that: > - incoorporates Francesco's bug fixes > - splits out relocation work into dl_helper.c > - cleans up code slightly > - makes relocations use le_to_cpu/cpu_to_le > - changes all grub_util printout calls to grub_dprintf=20 >=20 > / > Leif --------------enigD5CF5665B602A322C5A9FC1B 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.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlGOBIgACgkQNak7dOguQgkOjwD9GnRYs41A5Sz64B6F7CCXfuwo XAx28+ct0Q2qImxMa8sA/0K+mETYarWerwS/Ip7hBOjkkkpW6T9iSTT4qZjtHgbx =jR5+ -----END PGP SIGNATURE----- --------------enigD5CF5665B602A322C5A9FC1B--