[PATCH 3/4] bsp/riscv: work area size based on stack pointer

Hesham Almatary hesham.almatary at cl.cam.ac.uk
Tue Feb 9 09:57:25 UTC 2021


On Tue, 9 Feb 2021 at 07:11, Sebastian Huber
<sebastian.huber at embedded-brains.de> wrote:
>
> On 08/02/2021 20:44, Daniel Hellstrom wrote:
>
> > +
> > +     .section        .data, "aw"
> > +     .align  3
> > +
> > +     .globl  bsp_sp_at_entry
> > +     .type   bsp_sp_at_entry, @object
> > +     .size   bsp_sp_at_entry, 8
> > +bsp_sp_at_entry:
> > +     .dword  0
>
> The size of this object should match uintptr_t. I would name this
> variable riscv_start_stack_pointer. It should be declared in a new
> header file "bsps/riscv/include/bsp/start.h".
>
+1

Also, you might want to use .balign which removes some confusions

> --
> 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


More information about the devel mailing list