Jim Shu 1aae4a12da hw/intc: sifive_plic: change interrupt priority register to WARL field
PLIC spec [1] requires interrupt source priority registers are WARL
field and the number of supported priority is power-of-2 to simplify SW
discovery.

Existing QEMU RISC-V machine (e.g. shakti_c) don't strictly follow PLIC
spec, whose number of supported priority is not power-of-2. Just change
each bit of interrupt priority register to WARL field when the number of
supported priority is power-of-2.

[1] https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc#interrupt-priorities

Signed-off-by: Jim Shu <jim.shu@sifive.com>
Reviewed-by: Clément Chigot <chigot@adacore.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20221003041440.2320-3-jim.shu@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2022-10-14 14:29:50 +10:00
..
2022-06-08 19:38:47 +01:00
2022-06-08 19:38:47 +01:00
2019-08-16 13:31:52 +02:00
2022-04-21 09:27:54 -07:00
2021-11-09 10:11:27 +01:00
2019-08-16 13:31:52 +02:00
2021-01-08 15:13:38 +00:00
2021-11-09 10:11:27 +01:00
2022-06-28 11:06:02 +02:00
2022-06-08 19:38:47 +01:00
2020-09-09 09:27:09 -04:00