diff options
| author | Clément Léger <[email protected]> | 2024-11-25 11:53:00 +0100 |
|---|---|---|
| committer | Anup Patel <[email protected]> | 2024-12-15 11:53:53 +0530 |
| commit | b47fcd01b3ba0e3ea89f5454456eded04afb93ab (patch) | |
| tree | 562d80b17735cb4c34e2f5d3dcb8122b84e72422 | |
| parent | 851e3010989254e67bf809aa5fc9e90dd7baa487 (diff) | |
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 <[email protected]>
Signed-off-by: Clément Léger <[email protected]>
Reviewed-by: Anup Patel <[email protected]>
| -rw-r--r-- | lib/sbi/sbi_sse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sbi/sbi_sse.c b/lib/sbi/sbi_sse.c index bf5620e8..c9f9a9dd 100644 --- a/lib/sbi/sbi_sse.c +++ b/lib/sbi/sbi_sse.c @@ -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 */ |
