[U-Boot] [PATCH] riscv: add Kconfig entries for the F and D ISA extensions support

Bin Meng bmeng.cn at gmail.com
Wed May 29 03:21:04 UTC 2019


On Tue, May 28, 2019 at 6:50 PM Greentime Hu <greentime at andestech.com> wrote:
>
> Hi Bin,
> On Tue, May 28, 2019 at 05:58:47PM +0800, Bin Meng wrote:
> > Hi Greentime,
> >
> > On Tue, May 28, 2019 at 3:54 PM Greentime Hu <greentime at andestech.com> wrote:
> > >
> > > Hi Bin,
> > > On Fri, May 24, 2019 at 05:40:08PM +0800, Bin Meng wrote:
> > > > Hi Eric,
> > > >
> > > > On Fri, May 24, 2019 at 4:04 PM Eric Lin <dslin1010 at gmail.com> wrote:
> > > > >
> > > > > Hi Bin
> > > > >
> > > > > Bin Meng <bmeng.cn at gmail.com> ??? 2019???5???22??? ?????? ??????5:25?????????
> > > > > >
> > > > > > Hi Eric,
> > > > > >
> > > > > > On Wed, May 22, 2019 at 4:23 PM <tesheng at andestech.com> wrote:
> > > > > > >
> > > > > > > Hi Bin,
> > > > > > >
> > > > > > > > -----Original Message-----
> > > > > > > > From: Bin Meng [mailto:bmeng.cn at gmail.com]
> > > > > > > > Sent: Tuesday, May 21, 2019 3:56 PM
> > > > > > > > To: Eric Te-Sheng Lin(?????????)
> > > > > > > > Cc: U-Boot Mailing List; Lukas Auer; Anup Patel; Rick Jian-Zhi Chen(?????????);
> > > > > > > > Greentime Ying-Han Hu(?????????); dslin1010 at gmail.com
> > > > > > > > Subject: Re: [PATCH] riscv: add Kconfig entries for the F and D ISA extensions
> > > > > > > > support
> > > > > > > >
> > > > > > > > Hi Eric,
> > > > > > > >
> > > > > > > > On Tue, May 21, 2019 at 3:18 PM Eric Lin <tesheng at andestech.com> wrote:
> > > > > > > > >
> > > > > > > > > This patch add Kconfig entries for the F (Single-Precision)
> > > > > > > >
> > > > > > > > adds
> > > > > > > >
> > > > > > >
> > > > > > > OK I'll correct it as adds
> > > > > > >
> > > > > > > > > and D (Double-Precision) floating point instruction-set extensions.
> > > > > > > > >
> > > > > > > >
> > > > > > > > Could you please provide reason that why U-Boot has to be compiled using F/D
> > > > > > > > extension?
> > > > > > > >
> > > > > > >
> > > > > > > Cause on AE350 platform, we have two different kinds of toolchain v5d (support I/M/A/C/F/D ISA) and
> > > > > > > v5 (support I/M/A/C ISA). If we use the v5d toolchain to build U-Boot it will build fail, so we would like to add F/D extension on U-Boot.
> > > > > >
> > > > > > I don't understand. What difference do these two toochains have? Isn't
> > > > > > the v5d toolchain's default -march string be pre-configured to imafd?
> > > > > > But even if the toolchain is pre-configured to generate fd
> > > > > > instruction, I think it can be override by the compiler flags. Can you
> > > > > > please share the details of the toolchain you used? I suspect you have
> > > > > > to fix your toolchain, not U-Boot.
> > > > > >
> > > > >
> > > > > It's seems the ABI issue. Because our toolchain don't support
> > > > > multilib, the v5d toolchain libraries ABI is ilp64d.
> > > > > If I use the v5d toolchain to build U-Boot with -mabi=lp64, it will
> > > > > get link error as below:
> > > >
> > > > Then please fix your compiler. Passing -mabi=lp64 to compiler is
> > > > definitely correct.
> > >
> > >  One of our customer ever used floating point in their project. They want
> > >  to calculate something with floating point instructions in u-Boot before
> > >  entering kernel.
> >
> > This is a new use case. For other architectures like x86, we don't
> > allow U-Boot to be compiled using hardware float ABI. Why can't they
> > use software floating point instead?
>
> It's because they'd like to calculate something very quickly. It may just be
> done in few cycles with floating point instructions and it will be very useful
> for their usages instead of using soft-float.
>
> That's the reason they ask us to provide such kind of CONFIG and we think it
> might also be helpful for users who are trying to do some mathematics with
> floating point instructions in u-Boot.
>

I will have to leave this to other people to comment. I personally do
not like this to be supported in the upstream U-Boot. However if
others do not object, I am OK too.

Regards,
Bin


More information about the U-Boot mailing list