> -----Original Message----- > From: Lukas Auer <lukas.a...@aisec.fraunhofer.de> > Sent: Wednesday, March 6, 2019 4:23 AM > To: u-boot@lists.denx.de > Cc: Atish Patra <atish.pa...@wdc.com>; Anup Patel > <anup.pa...@wdc.com>; Bin Meng <bmeng...@gmail.com>; Andreas > Schwab <sch...@suse.de>; Palmer Dabbelt <pal...@sifive.com>; > Alexander Graf <ag...@suse.de>; Lukas Auer > <lukas.a...@aisec.fraunhofer.de>; Anup Patel <a...@brainfault.org>; Rick > Chen <r...@andestech.com>; Baruch Siach <bar...@tkos.co.il>; Stefan > Roese <s...@denx.de>; Daniel Schwierzeck <daniel.schwierz...@gmail.com> > Subject: [PATCH v2 5/9] riscv: add support for multi-hart systems > > On RISC-V, all harts boot independently. To be able to run on a multi-hart > system, U-Boot must be extended with the functionality to manage all harts > in the system. All harts entering U-Boot are registered in the available_harts > mask stored in global data. A hart lottery system as used in the Linux kernel > selects the hart U-Boot runs on. All other harts are halted. U-Boot can > delegate functions to them using smp_call_function(). > > Every hart has a valid pointer to the global data structure and a 8KiB stack > by > default. The stack size is set with CONFIG_STACK_SIZE_SHIFT. > > Signed-off-by: Lukas Auer <lukas.a...@aisec.fraunhofer.de> > --- > > Changes in v2: > - Implement hart lottery to pick main hart to run U-Boot > - Remove CONFIG_MAIN_HART as it is not required anymore > - Register available harts in the available_harts mask > > arch/riscv/Kconfig | 4 ++ > arch/riscv/cpu/cpu.c | 9 ++- > arch/riscv/cpu/start.S | 134 ++++++++++++++++++++++++++++++++++- > arch/riscv/include/asm/csr.h | 1 + > arch/riscv/lib/asm-offsets.c | 1 + > 5 files changed, 147 insertions(+), 2 deletions(-)
Reviewed-by: Anup Patel <anup.pa...@wdc.com> Regards, Anup _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot