mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
target/loongarch: Add constant timer support
Signed-off-by: Xiaojuan Yang <yangxiaojuan@loongson.cn> Signed-off-by: Song Gao <gaosong@loongson.cn> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220606124333.2060567-25-yangxiaojuan@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
f757a2cd69
commit
dd615fa48d
5 changed files with 77 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "exec/cpu-defs.h"
|
||||
#include "fpu/softfloat-types.h"
|
||||
#include "hw/registerfields.h"
|
||||
#include "qemu/timer.h"
|
||||
|
||||
#define TCG_GUEST_DEFAULT_MO (0)
|
||||
|
||||
|
@ -185,6 +186,8 @@ extern const char * const regnames[32];
|
|||
extern const char * const fregnames[32];
|
||||
|
||||
#define N_IRQS 13
|
||||
#define IRQ_TIMER 11
|
||||
#define IRQ_IPI 12
|
||||
|
||||
#define LOONGARCH_STLB 2048 /* 2048 STLB */
|
||||
#define LOONGARCH_MTLB 64 /* 64 MTLB */
|
||||
|
@ -295,6 +298,7 @@ struct ArchCPU {
|
|||
|
||||
CPUNegativeOffsetState neg;
|
||||
CPULoongArchState env;
|
||||
QEMUTimer timer;
|
||||
};
|
||||
|
||||
#define TYPE_LOONGARCH_CPU "loongarch-cpu"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue