Commit caa5eeac authored by Ben Dooks's avatar Ben Dooks Committed by Anup Patel
Browse files

lib: sbi: add check for ipi device for hsm start



If the ecall SBI_EXT_HSM_HART_START is called it might try to wake the
secondary hart using sbi_ipi_raw_send() to send an IPI to the hart.
This can fail if there is no IPI device but no error is returned from
sbi_ipi_raw_send() so the ecall returns as if the action completed and
the caller continues without noticing (in the case of Linux it just hangs
waiting for the secondary hart to become active)

Fix this by changing sbi_ipi_raw_send() to return and error, and if an
error is returned, then return it via SBI_EXT_HSM_HART_START call.

Signed-off-by: default avatarBen Dooks <ben.dooks@sifive.com>
Reviewed-by: default avatarAnup Patel <anup@brainfault.org>
parent 994c8cfb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment