mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
target/loongarch: Add LoongArch IOCSR instruction
This includes: - IOCSR{RD/WR}.{B/H/W/D} 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-27-yangxiaojuan@loongson.cn> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
5b1dedfe84
commit
f84a2aacf5
8 changed files with 197 additions and 0 deletions
|
@ -12,6 +12,27 @@
|
|||
#include "fpu/softfloat-types.h"
|
||||
#include "hw/registerfields.h"
|
||||
#include "qemu/timer.h"
|
||||
#include "exec/memory.h"
|
||||
#include "hw/sysbus.h"
|
||||
|
||||
#define IOCSRF_TEMP 0
|
||||
#define IOCSRF_NODECNT 1
|
||||
#define IOCSRF_MSI 2
|
||||
#define IOCSRF_EXTIOI 3
|
||||
#define IOCSRF_CSRIPI 4
|
||||
#define IOCSRF_FREQCSR 5
|
||||
#define IOCSRF_FREQSCALE 6
|
||||
#define IOCSRF_DVFSV1 7
|
||||
#define IOCSRF_GMOD 9
|
||||
#define IOCSRF_VM 11
|
||||
|
||||
#define FEATURE_REG 0x8
|
||||
#define VENDOR_REG 0x10
|
||||
#define CPUNAME_REG 0x20
|
||||
#define MISC_FUNC_REG 0x420
|
||||
#define IOCSRM_EXTIOI_EN 48
|
||||
|
||||
#define IOCSR_MEM_SIZE 0x428
|
||||
|
||||
#define TCG_GUEST_DEFAULT_MO (0)
|
||||
|
||||
|
@ -283,6 +304,10 @@ typedef struct CPUArchState {
|
|||
uint64_t CSR_DSAVE;
|
||||
|
||||
LoongArchTLB tlb[LOONGARCH_TLB_MAX];
|
||||
|
||||
AddressSpace address_space_iocsr;
|
||||
MemoryRegion system_iocsr;
|
||||
MemoryRegion iocsr_mem;
|
||||
} CPULoongArchState;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue