143888c2fSAtish Patra /* 243888c2fSAtish Patra * RISC-V timer header file. 343888c2fSAtish Patra * 443888c2fSAtish Patra * Copyright (c) 2022 Rivos Inc. 543888c2fSAtish Patra * 643888c2fSAtish Patra * This program is free software; you can redistribute it and/or modify it 743888c2fSAtish Patra * under the terms and conditions of the GNU General Public License, 843888c2fSAtish Patra * version 2 or later, as published by the Free Software Foundation. 943888c2fSAtish Patra * 1043888c2fSAtish Patra * This program is distributed in the hope it will be useful, but WITHOUT 1143888c2fSAtish Patra * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1243888c2fSAtish Patra * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 1343888c2fSAtish Patra * more details. 1443888c2fSAtish Patra * 1543888c2fSAtish Patra * You should have received a copy of the GNU General Public License along with 1643888c2fSAtish Patra * this program. If not, see <http://www.gnu.org/licenses/>. 1743888c2fSAtish Patra */ 1843888c2fSAtish Patra 1943888c2fSAtish Patra #ifndef RISCV_TIME_HELPER_H 2043888c2fSAtish Patra #define RISCV_TIME_HELPER_H 2143888c2fSAtish Patra 2243888c2fSAtish Patra #include "cpu.h" 2343888c2fSAtish Patra #include "qemu/timer.h" 2443888c2fSAtish Patra 25*bbb9fc25SWeiwei Li void riscv_timer_write_timecmp(CPURISCVState *env, QEMUTimer *timer, 2643888c2fSAtish Patra uint64_t timecmp, uint64_t delta, 2743888c2fSAtish Patra uint32_t timer_irq); 2843888c2fSAtish Patra void riscv_timer_init(RISCVCPU *cpu); 2943888c2fSAtish Patra 3043888c2fSAtish Patra #endif 31