Re: [PATCH v2] riscv: force __cpu_up_ variables to put in data section

2020-05-04 Thread Palmer Dabbelt
On Mon, 04 May 2020 10:37:40 PDT (-0700), ati...@atishpatra.org wrote: On Mon, May 4, 2020 at 12:50 AM Andreas Schwab wrote: On Mai 04 2020, Anup Patel wrote: > Slightly improved text: > > This issue happens on random booting of multiple harts, which means > it will manifest for BBL and

Re: [PATCH v2] riscv: force __cpu_up_ variables to put in data section

2020-05-04 Thread Atish Patra
On Mon, May 4, 2020 at 12:50 AM Andreas Schwab wrote: > > On Mai 04 2020, Anup Patel wrote: > > > Slightly improved text: > > > > This issue happens on random booting of multiple harts, which means > > it will manifest for BBL and OpenSBI v0.6 (or older version). In OpenSBI > > v0.7 (or higher

Re: [PATCH v2] riscv: force __cpu_up_ variables to put in data section

2020-05-04 Thread Andreas Schwab
On Mai 04 2020, Anup Patel wrote: > Slightly improved text: > > This issue happens on random booting of multiple harts, which means > it will manifest for BBL and OpenSBI v0.6 (or older version). In OpenSBI > v0.7 (or higher version), we have HSM extension so all the secondary harts > are

Re: [PATCH v2] riscv: force __cpu_up_ variables to put in data section

2020-05-04 Thread Anup Patel
On Mon, May 4, 2020 at 9:24 AM Zong Li wrote: > > Put __cpu_up_stack_pointer and __cpu_up_task_pointer in data section. > Currently, these two variables are put in bss section, there is a > potential risk that secondary harts get the uninitialized value before > main hart finishing the bss

[PATCH v2] riscv: force __cpu_up_ variables to put in data section

2020-05-03 Thread Zong Li
Put __cpu_up_stack_pointer and __cpu_up_task_pointer in data section. Currently, these two variables are put in bss section, there is a potential risk that secondary harts get the uninitialized value before main hart finishing the bss clearing. In this case, all secondary harts would pass the