From 7cbcc538f4b3040db1e39a6547efa501a8a44907 Mon Sep 17 00:00:00 2001 From: Atish Patra Date: Wed, 24 Aug 2022 15:13:55 -0700 Subject: hw/intc: Move mtimer/mtimecmp to aclint Historically, The mtime/mtimecmp has been part of the CPU because they are per hart entities. However, they actually belong to aclint which is a MMIO device. Move them to the ACLINT device. This also emulates the real hardware more closely. Reviewed-by: Anup Patel Reviewed-by: Alistair Francis Reviewed-by: Andrew Jones Signed-off-by: Atish Patra Message-Id: <20220824221357.41070-2-atishp@rivosinc.com> Signed-off-by: Alistair Francis --- include/hw/intc/riscv_aclint.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hw/intc') diff --git a/include/hw/intc/riscv_aclint.h b/include/hw/intc/riscv_aclint.h index 26d4048..693415e 100644 --- a/include/hw/intc/riscv_aclint.h +++ b/include/hw/intc/riscv_aclint.h @@ -32,6 +32,8 @@ typedef struct RISCVAclintMTimerState { /*< private >*/ SysBusDevice parent_obj; uint64_t time_delta; + uint64_t *timecmp; + QEMUTimer **timers; /*< public >*/ MemoryRegion mmio; -- cgit v1.1