summary refs log tree commit diff stats
path: root/include
diff options
context:
space:
mode:
authorSong Gao <gaosong@loongson.cn>2025-09-16 20:20:59 +0800
committerSong Gao <gaosong@loongson.cn>2025-09-28 17:31:04 +0800
commitcaf1704c56a38dbd032fd0174c07eded3a624072 (patch)
tree60946c7b591776523dedd8abc7022c74b80ab6be /include
parentd6dfd8d40cebebc3378d379cd28879e0345fbf91 (diff)
downloadfocaccia-qemu-caf1704c56a38dbd032fd0174c07eded3a624072.tar.gz
focaccia-qemu-caf1704c56a38dbd032fd0174c07eded3a624072.zip
target/loongarch: move some machine define to virt.h
move some machine define to virt.h

Signed-off-by: Song Gao <gaosong@loongson.cn>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Message-ID: <20250916122109.749813-2-gaosong@loongson.cn>
Diffstat (limited to 'include')
-rw-r--r--include/hw/loongarch/virt.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/hw/loongarch/virt.h b/include/hw/loongarch/virt.h
index 602feab0f0..7120b46714 100644
--- a/include/hw/loongarch/virt.h
+++ b/include/hw/loongarch/virt.h
@@ -13,6 +13,25 @@
 #include "hw/block/flash.h"
 #include "hw/loongarch/boot.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 VERSION_REG             0x0
+#define FEATURE_REG             0x8
+#define VENDOR_REG              0x10
+#define CPUNAME_REG             0x20
+#define MISC_FUNC_REG           0x420
+#define IOCSRM_EXTIOI_EN        48
+#define IOCSRM_EXTIOI_INT_ENCODE 49
+
 #define LOONGARCH_MAX_CPUS      256
 
 #define VIRT_FWCFG_BASE         0x1e020000UL