From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1WVlq8-0002jE-S0 for mharc-grub-devel@gnu.org; Thu, 03 Apr 2014 13:54:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVlq0-0002fe-T1 for grub-devel@gnu.org; Thu, 03 Apr 2014 13:54:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WVlpv-0003Ml-Cs for grub-devel@gnu.org; Thu, 03 Apr 2014 13:54:04 -0400 Received: from mail-lb0-x230.google.com ([2a00:1450:4010:c04::230]:64137) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WVlpv-0003MY-4c for grub-devel@gnu.org; Thu, 03 Apr 2014 13:53:59 -0400 Received: by mail-lb0-f176.google.com with SMTP id 10so1582975lbg.7 for ; Thu, 03 Apr 2014 10:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=0zB8rlcm03eMaChMRPcGFNvhwPJROqhDk35p0yMVB3w=; b=vhRqDoJXUUES732peNRv10TRc9tCsaSM3hVgqYx+29BuS2GCt2QGJXFk26COfhmGHY 2QrgXj0iXkZoXKEubd9U69DUev8d3s7ighIkDwtjRB5pNLJCUrv4e8AucMrXF91RnbPH ll2epAqapUH/+IFTLOr6bXjii8m30nkj4I0ooAZoBveUWaK7e1UpidakVvD3b4kZxdBB k0sXxwrf+3aGQR2i8ZOaFdl4oXOYkr6jbJRsaor56YF/otE5KaZ6YTSzvQerTudep4ex 20QC6IVOHxsemuPozHfygjid5zZY6THVaIbMU/hpNuXBKtyN+7O44oFUHyFsghnitPF8 xChw== X-Received: by 10.112.139.6 with SMTP id qu6mr149652lbb.5.1396547637997; Thu, 03 Apr 2014 10:53:57 -0700 (PDT) Received: from opensuse.site (ppp37-190-15-130.pppoe.spdop.ru. [37.190.15.130]) by mx.google.com with ESMTPSA id jm3sm3986521lbc.29.2014.04.03.10.53.56 for (version=SSLv3 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 10:53:57 -0700 (PDT) Date: Thu, 3 Apr 2014 21:53:56 +0400 From: Andrey Borzenkov To: The development of GNU GRUB Subject: Re: [RFC PATCH 21/23] powerpc64 is not necessarily BigEndian anymore! :) Message-ID: <20140403215356.1b953172@opensuse.site> In-Reply-To: <20140403173336.GA16534@ram.oc3035372033.ibm.com> References: <1393439482-20341-1-git-send-email-linuxram@us.ibm.com> <1393439482-20341-22-git-send-email-linuxram@us.ibm.com> <20140401214945.209b4894@opensuse.site> <533B1FF2.9040503@gmail.com> <20140403173336.GA16534@ram.oc3035372033.ibm.com> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-suse-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c04::230 Cc: phcoder@gmail.com, linuxram@us.ibm.com, pfsmorigo@br.ibm.com 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: Thu, 03 Apr 2014 17:54:10 -0000 =D0=92 Thu, 3 Apr 2014 10:33:36 -0700 Ram Pai =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Tue, Apr 01, 2014 at 10:22:10PM +0200, Vladimir '=CF=86-coder/phcoder'= Serbinenko wrote: > >=20 > > >=20 > > > For the sake of bisectability this really should be moved earlier; > > > otherwise at least patch "fix parameter to firmware calls" would > > > be wrong. > > >=20 > > Even bigger problem is whether we want to run in LE mode at all. From > > what I understand (correct if I'm wrong) firmware calls remain > > big-endian and you need to switch back and forth between LE and BE when > > doing firmware calls. >=20 > Yes. firmware runs in 32bit BE mode. And there is a constant switch from > 64bit LE to 32bit BE and vice-versa for each firmware call. >=20 > > doing firmware calls. Byteswapping for the purpose of firmware calls is > > to be avoided as bugs are easy to slip through (in fact the > > byte-swapping isn't complete in proposed patches. > > (correct me if I'm wrong)=20 >=20 > Is that true? maybe you are right. I might have missed something. > However please hint me what i have missed. I will look into some > other arch code that support the same ieee platform. >=20 >=20 > > these new patches cover a subset of already > > supported machines and don't add any user-visible feature and no new > > kernel type (LE kernel can be loaded from BE GRUB). > > Cross-compiling to BE from LE is easy (TARGET_CFLAGS=3D-EL). >=20 Hmm ... gcc docs mention this only for MIPS, not for PowerPC; for PowerPC it says -mbig. > Well. that is the issue. Various distros have varied support for > cross-compilation (multi-arch support). If the distro does not=20 > have 32bit BE libraries natively installed (out-of-the-box), they > wont be able to generate a 32bit BE grub loader. We speak only about target code that runs at boot time. This code does not use any library. It only needs compiler support. GRUB does not support anything besides gcc and recently some clang support was added. Do you have real life example of distribution which does not support -mbig gcc option to produce big-endian *code*? It is perfectly legal to have different architectures for host and target. So you will have little-endian 64 bit host tools and big-endan 32 bit target. If this works for you this of course is much better solution (at the end it requires just a single line in configure.ac). > These set of patches > overcomes the deficiency by generating a working native executable=20 > on LE systems. >=20 > > So it looks like this patch series adds a new high-maintenance-cost port > > covering only already supported machines and already supportred feature= s. >=20 > It does add maintainence; I agree. But than it does overcome some > deficiences aswell. >=20 Do you mean there are some problems with big-endian code at boot time? Could you give more details? >=20 > Thanks for your comments. And sorry for the delay. I had not seen this > email, since i was not on copy. I will watch the mailing list regularly. > RP >=20 >=20 >=20 >=20 > >=20 >=20 >=20 >=20 > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel >=20 >=20