]> git.proxmox.com Git - mirror_qemu.git/commit - hw/intc/riscv_aclint.c
hw/intc: Support 32/64-bit mtimecmp and mtime accesses in RISC-V ACLINT
authorFrank Chang <frank.chang@sifive.com>
Wed, 20 Apr 2022 08:08:58 +0000 (16:08 +0800)
committerAlistair Francis <alistair.francis@wdc.com>
Fri, 22 Apr 2022 00:35:16 +0000 (10:35 +1000)
commitd42df0ea5dd58cfda5e1466487f93b5b90a67594
treed3491de7164e8c661d83821f3665e484364d88c5
parent231a90c08545a7f903800d2ffb988dad08947460
hw/intc: Support 32/64-bit mtimecmp and mtime accesses in RISC-V ACLINT

RISC-V privilege spec defines that:

* In RV32, memory-mapped writes to mtimecmp modify only one 32-bit part
  of the register.
* For RV64, naturally aligned 64-bit memory accesses to the mtime and
  mtimecmp registers are additionally supported and are atomic.

It's possible to perform both 32/64-bit read/write accesses to both
mtimecmp and mtime registers.

Signed-off-by: Frank Chang <frank.chang@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Jim Shu <jim.shu@sifive.com>
Message-Id: <20220420080901.14655-3-frank.chang@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
hw/intc/riscv_aclint.c