[PATCH v5 6/6] Drop dependency on libgcc by importing part of FreeBSD's libquad
Bin Meng
bmeng.cn at gmail.com
Sun Jul 11 21:06:25 PDT 2021
Hi Anup,
On Mon, Jul 12, 2021 at 12:02 PM Anup Patel <anup at brainfault.org> wrote:
>
> On Mon, Jul 12, 2021 at 9:25 AM Bin Meng <bmeng.cn at gmail.com> wrote:
> >
> > On Sun, Jul 11, 2021 at 11:46 PM Anup Patel <anup at brainfault.org> wrote:
> > >
> > > On Sun, Jul 11, 2021 at 7:58 AM Jessica Clarke <jrtc27 at jrtc27.com> wrote:
> > > >
> > > > We only need libgcc for 64-bit division on RV32. Whilst GCC toolchains
> > > > bundle libgcc, Clang toolchains tend not to ship libclang_rt.builtins
> > > > given every compiler is a cross-compiler for every target and so you
> > > > would need a silly number of builds of it, with only the native library
> > > > available; only vendor-provided Clang toolchains specifically for bare
> > > > metal cross-compiling are likely to provide it.
> > > >
> > > > Thus, import part of FreeBSD's implementation of the division support
> > > > functions needed and stop linking against libgcc.
> > > >
> > > > Signed-off-by: Jessica Clarke <jrtc27 at jrtc27.com>
> > >
> > > I tried this patch with GCC linux toolchain and U-Boot SPL and it worked
> > > fine for me. Other please try LLVM and bare-metal toolchain at your end
> > > and if you see any issue then please send a fix patch.
> > >
> > > Reviewed-by: Anup Patel <anup.patel at wdc.com>
> > > Tested-by: Anup Patel <anup.patel at wdc.com>
> > >
> > > Applied this patch to the riscv/opensbi repo.
> > >
> > > @Bin Meng Can you also try RV32 U-Boot SPL ? I did not try that.
> >
> > It seems RV32 U-Boot SPL is broken, that it does not boot occasionally.
> >
> > But this has nothing to do with the LLVM changes in this series. It
> > was due to upstream libfdt changes. I have sent a patch on the U-Boot
> > side. Booting S-mode U-Boot directly is not affected.
>
> Yes, it's not related to this series. In fact, it is not related to
> FW_PIC at all.
Correct.
> I did little digging. It seems OpenSBI gets corrupted FDT from U-Boot SPL
> RV32. The fw_platform_init() get's stuck very early because it is not able to
> find nodeoffset of "/" path in FDT.
Yeah, that's because fdt_ro_probe_() returns -FDT_ERR_ALIGNMENT hence
fw_platform_init() gets stuck.
> The OpenSBI RV32 firmwares work fine without U-Boot SPL which leads
> to the conclusion that FDT is corrupted for U-Boot SPL RV32 case.
>
> I hope the above info helps ...
I already sent a patch to U-Boot ML, see:
http://patchwork.ozlabs.org/project/uboot/patch/20210712035231.26475-1-bmeng.cn@gmail.com/
You may have a test on your side with this patch.
Regards,
Bin
More information about the opensbi
mailing list