lib: Add IPI extension in SBI

This patch adds new IPI extension which replaces ipi related
v0.1 extensions. This also adds a new API for ipi sending as trap
handling is not necessary in v0.2 SBI IPI related extensions.

It also modifies the IPI sending code which now accepts hart mask as a value
instead of S-mode virtual address. Thus, the caller should set it to exact hart
mask value everytime.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
Atish Patra
2019-11-24 23:33:47 -08:00
committed by Anup Patel
parent 109266397a
commit 9777aeef41
5 changed files with 160 additions and 24 deletions

View File

@@ -39,7 +39,8 @@ sbi_system_shutdown(struct sbi_scratch *scratch, u32 type)
/* If that fails (or is not implemented) send an IPI on every
* hart to hang and then hang the current hart */
sbi_ipi_send_many(scratch, NULL, NULL, SBI_IPI_EVENT_HALT, NULL);
sbi_ipi_send_many(scratch, sbi_hart_available_mask(), 0,
SBI_IPI_EVENT_HALT, NULL);
sbi_hart_hang();
}