lib: sbi: sse: Fix a6 and a7 register content upon injection

The specification states that a6 contains the current hart id and
a7 contains the entry argument. This was inverted in the current
implementation.

Reported-by: Andrew Jones <andrew.jones@linux.dev>
Signed-off-by: Clément Léger <cleger@rivosinc.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
This commit is contained in:
Clément Léger authored and Anup Patel committed 2024-12-15 11:53:53 +05:30
1 parent 851e301098
commit b47fcd01b3
1 file changed
+2 -2
+2 -2
View File
@@ -509,8 +509,8 @@ static void sse_event_inject(struct sbi_sse_event *e,
csr_write(CSR_SEPC, regs->mepc);
/* Setup entry context */
regs->a6 = e->attrs.entry.arg;
regs->a7 = current_hartid();
regs->a6 = current_hartid();
regs->a7 = e->attrs.entry.arg;
regs->mepc = e->attrs.entry.pc;
/* Return to S-mode with virtualization disabled */