From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZmKzb-00089e-Qg for mharc-grub-devel@gnu.org; Wed, 14 Oct 2015 08:17:15 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmKyU-0007h4-Io for grub-devel@gnu.org; Wed, 14 Oct 2015 08:16:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmKyT-0000Cn-EK for grub-devel@gnu.org; Wed, 14 Oct 2015 08:16:06 -0400 Received: from mail-wi0-x230.google.com ([2a00:1450:400c:c05::230]:36611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmKyT-0000Ci-4o for grub-devel@gnu.org; Wed, 14 Oct 2015 08:16:05 -0400 Received: by wicgb1 with SMTP id gb1so228239185wic.1 for ; Wed, 14 Oct 2015 05:16:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=edpyB9V6w5z7wiaTrr/N2bme3eTLXl+OR0ziN/5Kmxk=; b=V06bKx8ZoptqEpcHP2fGbKMo7kR5NQF4iyBdF5RF0OgpTSlO5Lkt4n8fzSPZZWQGqd vL2C56WS5+w7JXTV0JYgcHsqgobSjPv5IA36vWz53tDnXrU/Lx5N6qSCB+XQL6EEtS9l A+sek8v9V7yUUVaOKSjKaP2SZMY5J63YT53s9LyA7XsoCtvSXe8lciI5WzStCpVPzZsH wEMz7QxsXTFxz+Y5feVU3Nn/K+AphvJFFZN2XnTEKXPl5wehlvVsj6mQZknbq1HA9T1S NknmZXcTF7tXGiGREpcQFEmCDP5rS2lJmMFbzQ3cImlXf16E54hmMfUBMJgKiCMmoUer z5rw== MIME-Version: 1.0 X-Received: by 10.180.23.231 with SMTP id p7mr28219828wif.30.1444824964253; Wed, 14 Oct 2015 05:16:04 -0700 (PDT) Received: by 10.27.126.212 with HTTP; Wed, 14 Oct 2015 05:16:03 -0700 (PDT) Received: by 10.27.126.212 with HTTP; Wed, 14 Oct 2015 05:16:03 -0700 (PDT) In-Reply-To: <561DDEC7.2070703@gmail.com> References: <1440009323-8667-1-git-send-email-mhw@netris.org> <55D6A36D.205@gmail.com> <876147ryhy.fsf@netris.org> <55D99791.4080104@gmail.com> <87a8thuqmo.fsf_-_@netris.org> <55EF16C0.6010703@gmail.com> <55F5186E.5040306@gmail.com> <56182E44.8010306@gmail.com> <56185BA0.6030006@gmail.com> <561DDEC7.2070703@gmail.com> Date: Wed, 14 Oct 2015 14:16:03 +0200 Message-ID: Subject: Re: [PATCH v2] Ensure that MIPS target code is compiled for the O32 ABI. From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: multipart/alternative; boundary=089e010d891cc1cf8205220f8688 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::230 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: Wed, 14 Oct 2015 12:16:08 -0000 --089e010d891cc1cf8205220f8688 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Le 14 oct. 2015 6:50 AM, "Andrei Borzenkov" a =C3=A9c= rit : > > 10.10.2015 03:28, Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0=B8= =D1=88=D0=B5=D1=82: > >> On 09.10.2015 23:14, Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: >>> >>> On 13.09.2015 08:32, Andrei Borzenkov wrote: >>>> >>>> 08.09.2015 20:11, Vladimir '=CF=86-coder/phcoder' Serbinenko =D0=BF=D0= =B8=D1=88=D0=B5=D1=82: >>>>> >>>>> On 23.08.2015 23:50, Mark H Weaver wrote: >>>>>> >>>>>> Include -mabi=3D32 in CFLAGS_PLATFORM and CCASFLAGS_PLATFORM to comp= ile >>>>>> code for the O32 ABI when targetting MIPS, since the MIPS assembly code >>>>>> in GRUB assumes this. >>>>> >>>>> Could you be more precise where we assume this? Why not fix the assembly >>>>> instead? >>>> >>>> >>>> If I understand it correctly, this is not only about assembly - ABIs >>>> differ in sizes of types as well, >>> >>> Only in obscure types long double and uint128_t. We use neither. >> >> Correction: I was comparing o32 to n32. We still need to ensure that >> either o32 or n32 is used. It's easier to just ensure that o32 is used, >> so that we have less variability in the code but can be relaxed later if >> need be. > > > I see that you committed my suggested patch but I find comments (and commit message) a bit misleading. While grub main code is fixed, the configure asm test not, and that was the first thing that failed. > Can you please elaborate on how am test fails? The only failure I have seen was due to usage of $t4 and I replaced it with $t0 >>> f) int grub_setjmp (grub_jmp_buf env) // grub_jmp_buf is an array, s= o >>> pointer >>> g) int grub_longjmp (grub_jmp_buf env, int val) >> >> Correction: setjmp/longjmp are not adapted to n32 but we don't use them >> anyway. Probably it's time to delete the dead code after double checking >> that extras don't use it either. >> >> >> >> >> _______________________________________________ >> Grub-devel mailing list >> Grub-devel@gnu.org >> https://lists.gnu.org/mailman/listinfo/grub-devel >> > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel --089e010d891cc1cf8205220f8688 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Le=C2=A014 oct. 2015 6:50 AM, "Andrei Borzenkov" <arvidjaar@gmail.com> a =C3=A9crit=C2=A0:<= br> >
> 10.10.2015 03:28, Vladimir '=CF=86-coder/phcoder' Serbinenko = =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>
>> On 09.10.2015 23:14, Vladimir '=CF=86-coder/phcoder' Serbi= nenko wrote:
>>>
>>> On 13.09.2015 08:32, Andrei Borzenkov wrote:
>>>>
>>>> 08.09.2015 20:11, Vladimir '=CF=86-coder/phcoder' = Serbinenko =D0=BF=D0=B8=D1=88=D0=B5=D1=82:
>>>>>
>>>>> On 23.08.2015 23:50, Mark H Weaver wrote:
>>>>>>
>>>>>> Include -mabi=3D32 in CFLAGS_PLATFORM and CCASFLAG= S_PLATFORM to compile
>>>>>> code for the O32 ABI when targetting MIPS, since t= he MIPS assembly code
>>>>>> in GRUB assumes this.
>>>>>
>>>>> Could you be more precise where we assume this? Why no= t fix the assembly
>>>>> instead?
>>>>
>>>>
>>>> If I understand it correctly, this is not only about assem= bly - ABIs
>>>> differ in sizes of types as well,
>>>
>>> Only in obscure types long double and uint128_t. We use neithe= r.
>>
>> Correction: I was comparing o32 to n32. We still need to ensure th= at
>> either o32 or n32 is used. It's easier to just ensure that o32= is used,
>> so that we have less variability in the code but can be relaxed la= ter if
>> need be.
>
>
> I see that you committed my suggested patch but I find comments (and c= ommit message) a bit misleading. While grub main code is fixed, the configu= re asm test not, and that was the first thing that failed.
>
Can you please elaborate on how am test fails? The only failure I have seen= was due to usage of $t4 and I replaced it with $t0
>>> =C2=A0 =C2=A0f) int grub_setjmp (grub_jmp_buf env) // grub_jmp= _buf is an array, so
>>> pointer
>>> =C2=A0 =C2=A0g) int grub_longjmp (grub_jmp_buf env, int val) >>
>> Correction: setjmp/longjmp are not adapted to n32 but we don't= use them
>> anyway. Probably it's time to delete the dead code after doubl= e checking
>> that extras don't use it either.
>>
>>
>>
>>
>> _______________________________________________
>> Grub-devel mailing list
>> Grub-devel@gnu.org
>> http= s://lists.gnu.org/mailman/listinfo/grub-devel
>>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://= lists.gnu.org/mailman/listinfo/grub-devel

--089e010d891cc1cf8205220f8688--