[PATCH] riscv/start: Startup sequence update.
Hesham Almatary
hesham.almatary at cl.cam.ac.uk
Thu Apr 29 18:18:20 UTC 2021
On Thu, 29 Apr 2021 at 20:07, Gedare Bloom <gedare at rtems.org> wrote:
>
> On Thu, Apr 29, 2021 at 11:53 AM Sebastian Huber
> <sebastian.huber at embedded-brains.de> wrote:
> >
> >
> > On 28/04/2021 15:55, Somesh Deshmukh wrote:
> > > +/* Clear .bss */
> > > +LADDR a0, bsp_section_bss_begin
> > > +li a1, 0
> > > +LADDR a2, bsp_section_bss_size
> > > +call memset
> > > +
> > > #ifdef BSP_START_COPY_FDT_FROM_U_BOOT
> > > mv a0, a1
> > > call bsp_fdt_copy
> > > #endif
> >
> > How did you test this? The above memset() sets register a1 to 0 and
> > probably uses this register also, the a1 is later used for the
> > bsp_fdt_copy(), probably with an invalid value.
> >
> Good point, that a1 I guess is a parameter passed in by uboot and
> needs to be preserved if this code should keep working.
>
Right. a1 will be zero on the bsp_fdt_copy() call this way.
> > I would place the device tree in a noinit section.
> >
> That is probably a better solution.
>
> It should also be documented in this start.S file what are the
> assumptions about parameters coming from the bootloader since it is
> not obvious.
+1
>
> > --
> > embedded brains GmbH
> > Herr Sebastian HUBER
> > Dornierstr. 4
> > 82178 Puchheim
> > Germany
> > email: sebastian.huber at embedded-brains.de
> > phone: +49-89-18 94 741 - 16
> > fax: +49-89-18 94 741 - 08
> >
> > Registergericht: Amtsgericht München
> > Registernummer: HRB 157899
> > Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler
> > Unsere Datenschutzerklärung finden Sie hier:
> > https://embedded-brains.de/datenschutzerklaerung/
> >
> > _______________________________________________
> > devel mailing list
> > devel at rtems.org
> > http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list