lib: sbi: Allow specifying start mode to sbi_hsm_hart_start() API
authorAnup Patel <anup.patel@wdc.com>
Mon, 7 Sep 2020 05:41:29 +0000 (11:11 +0530)
committerAnup Patel <anup@brainfault.org>
Wed, 16 Sep 2020 03:35:22 +0000 (09:05 +0530)
commit6734304f8c759c782cab12ecfd6c20fb23b8ee44
tree37b5a05628e96be9a1740e7dcd68808d1607eddf
parentc1c7c3ee9eb70e5c25914621f0363bfe244ebc79
lib: sbi: Allow specifying start mode to sbi_hsm_hart_start() API

The sbi_scratch already has provision to specify the next stage mode
so we can leverage this to specify start mode to sbi_hsm_hart_start().

In future, this will be useful in providing SBI calls to U-mode on
embedded cores where we M-mode and U-mode but no S-mode.

Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
include/sbi/sbi_hsm.h
lib/sbi/sbi_ecall_hsm.c
lib/sbi/sbi_hsm.c