diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-02-02 19:12:17 +0530 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-02-27 13:46:37 -0800 |
commit | 5f3616ccceb5d5c49f99838c78498e581fb42fc5 (patch) | |
tree | d44d99603f2329c984d4d9d2ba3ffccab382b50a /include/hw | |
parent | c695724868ce4049fd79c5a509880dbdf171e744 (diff) | |
download | qemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.zip qemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.tar.gz qemu-5f3616ccceb5d5c49f99838c78498e581fb42fc5.tar.bz2 |
hw/riscv: Provide rdtime callback for TCG in CLINT emulation
This patch extends CLINT emulation to provide rdtime callback for
TCG. This rdtime callback will be called wheneven TIME CSRs are
read in privileged modes.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'include/hw')
-rw-r--r-- | include/hw/riscv/sifive_clint.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/hw/riscv/sifive_clint.h b/include/hw/riscv/sifive_clint.h index ae8286c..4a720bf 100644 --- a/include/hw/riscv/sifive_clint.h +++ b/include/hw/riscv/sifive_clint.h @@ -41,7 +41,8 @@ typedef struct SiFiveCLINTState { } SiFiveCLINTState; DeviceState *sifive_clint_create(hwaddr addr, hwaddr size, uint32_t num_harts, - uint32_t sip_base, uint32_t timecmp_base, uint32_t time_base); + uint32_t sip_base, uint32_t timecmp_base, uint32_t time_base, + bool provide_rdtime); enum { SIFIVE_SIP_BASE = 0x0, |