diff options
| author | Michael Clark | 2019-03-16 02:21:03 +0100 |
|---|---|---|
| committer | Palmer Dabbelt | 2019-03-19 13:14:39 +0100 |
| commit | acbbb94e5730c9808830938e869d243014e2923a (patch) | |
| tree | 3398a36b64ab9b9e50e6b7907e81d5b49dbf6595 /scripts | |
| parent | RISC-V: Change local interrupts from edge to level (diff) | |
| download | qemu-acbbb94e5730c9808830938e869d243014e2923a.tar.gz qemu-acbbb94e5730c9808830938e869d243014e2923a.tar.xz qemu-acbbb94e5730c9808830938e869d243014e2923a.zip | |
RISC-V: Add support for vectored interrupts
If vectored interrupts are enabled (bits[1:0]
of mtvec/stvec == 1) then use the following
logic for trap entry address calculation:
pc = mtvec + cause * 4
In addition to adding support for vectored interrupts
this patch simplifies the interrupt delivery logic
by making sync/async cause decoding and encoding
steps distinct.
The cause code and the sign bit indicating sync/async
is split at the beginning of the function and fixed
cause is renamed to cause. The MSB setting for async
traps is delayed until setting mcause/scause to allow
redundant variables to be eliminated. Some variables
are renamed for conciseness and moved so that decls
are at the start of the block.
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
