From: lixianglai <lixianglai(a)loongson.cn>
Define loongarch cpu model type and vendor id in
cpu_map loongarch xml.
Signed-off-by: lixianglai <lixianglai(a)loongson.cn>
---
src/cpu_map/index.xml | 5 +++++
src/cpu_map/loongarch_la464.xml | 6 ++++++
src/cpu_map/loongarch_vendors.xml | 3 +++
src/cpu_map/meson.build | 2 ++
4 files changed, 16 insertions(+)
create mode 100644 src/cpu_map/loongarch_la464.xml
create mode 100644 src/cpu_map/loongarch_vendors.xml
diff --git a/src/cpu_map/index.xml b/src/cpu_map/index.xml
index d2c5af5797..9cfcd1a9c0 100644
--- a/src/cpu_map/index.xml
+++ b/src/cpu_map/index.xml
@@ -119,4 +119,9 @@
<include filename='arm_FT-2000plus.xml'/>
<include filename='arm_Tengyun-S2500.xml'/>
</arch>
+
+ <arch name='loongarch64'>
+ <include filename="loongarch_vendors.xml"/>
+ <include filename="loongarch_la464.xml"/>
+ </arch>
</cpus>
diff --git a/src/cpu_map/loongarch_la464.xml b/src/cpu_map/loongarch_la464.xml
new file mode 100644
index 0000000000..1029e39681
--- /dev/null
+++ b/src/cpu_map/loongarch_la464.xml
@@ -0,0 +1,6 @@
+<cpus>
+ <model name='la464'>
+ <vendor name='Loongson'/>
+ <prid value='0x14c010' mask='0xfffff0'/>
+ </model>
+</cpus>
diff --git a/src/cpu_map/loongarch_vendors.xml b/src/cpu_map/loongarch_vendors.xml
new file mode 100644
index 0000000000..c744654617
--- /dev/null
+++ b/src/cpu_map/loongarch_vendors.xml
@@ -0,0 +1,3 @@
+<cpus>
+ <vendor name='Loongson'/>
+</cpus>
diff --git a/src/cpu_map/meson.build b/src/cpu_map/meson.build
index ae5293e85f..4ea63188df 100644
--- a/src/cpu_map/meson.build
+++ b/src/cpu_map/meson.build
@@ -84,6 +84,8 @@ cpumap_data = [
'x86_vendors.xml',
'x86_Westmere-IBRS.xml',
'x86_Westmere.xml',
+ 'loongarch_vendors.xml',
+ 'loongarch_la464.xml',
]
install_data(cpumap_data, install_dir: pkgdatadir / 'cpu_map')
--
2.27.0