qemu/cpu-add-Tengyun-S5000C-cpu-support.patch
Jiabo Feng ae37a72f4c QEMU update to version 6.2.0-98:
- pci-host: designware: Limit value range of iATU viewport register
- hmat acpi: Fix out of bounds access due to missing use of indirection
- migration: Skip only empty block devices
- aspeed/hace: Initialize g_autofree pointer
- hw/net/vmxnet3: Fix guest-triggerable assert()
- qxl: don't assert() if device isn't yet initialized
- Avoid unaligned fetch in ladr_match()
- linux-user: Fix waitid return of siginfo_t and rusage
- hw/net/lan9118: Replace magic '2048' value by MIL_TXFIFO_SIZE definition
- stdvga: fix screen blanking
- virtio-net: drop too short packets early
- ebpf: replace deprecated bpf_program__set_socket_filter
- vhsot-user: only read reply of SET_LOG_BASE from vq 0
- cpu: add Tengyun S5000C cpu support
- hw/virtio: Fix obtain the buffer id from the last descriptor
- hw/core: ensure kernel_end never gets used undefined

Signed-off-by: Jiabo Feng <fengjiabo1@huawei.com>
(cherry picked from commit 1f9e476e96edb07e34e0133a312f478ddab4b6ff)
2024-08-22 14:53:59 +08:00

83 lines
3.1 KiB
Diff

From 38d4158a556f27c9ce7d9229d6a28cf57dd8de26 Mon Sep 17 00:00:00 2001
From: Jiakun Shuai <shuaijiakun1288@phytium.com.cn>
Date: Fri, 19 Jul 2024 15:29:13 +0800
Subject: [PATCH] cpu: add Tengyun S5000C cpu support
Add the Tengyun-S5000C CPU model.
Signed-off-by: pengmengguang <pengmengguang@phytium.com.cn>
Signed-off-by: Jiakun Shuai <shuaijiakun1288@phytium.com.cn>
---
hw/arm/virt.c | 1 +
target/arm/cpu64.c | 35 +++++++++++++++++++++++++++++++++++
2 files changed, 36 insertions(+)
diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index dc119732f0..3394d3a6a6 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -210,6 +210,7 @@ static const char *valid_cpus[] = {
ARM_CPU_TYPE_NAME("Kunpeng-920"),
ARM_CPU_TYPE_NAME("FT-2000+"),
ARM_CPU_TYPE_NAME("Tengyun-S2500"),
+ ARM_CPU_TYPE_NAME("Tengyun-S5000C"),
ARM_CPU_TYPE_NAME("a64fx"),
ARM_CPU_TYPE_NAME("host"),
ARM_CPU_TYPE_NAME("max"),
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 3ec788fc29..b4522a337f 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -724,6 +724,40 @@ static void aarch64_max_tengyun_s2500_initfn(Object *obj)
}
}
+static void aarch64_tengyun_s5000c_initfn(Object *obj)
+{
+ ARMCPU *cpu = ARM_CPU(obj);
+
+ aarch64_a72_initfn(obj);
+
+ cpu->midr = 0x700f8620;
+ cpu->ctr = 0x9444c004;
+ cpu->isar.regs[ID_ISAR0] = 0x2101110;
+ cpu->isar.regs[ID_ISAR1] = 0x1311211;
+ cpu->isar.regs[ID_ISAR2] = 0x21232042;
+ cpu->isar.regs[ID_ISAR3] = 0x1112131;
+ cpu->isar.regs[ID_ISAR4] = 0x10142;
+ cpu->isar.regs[ID_ISAR5] = 0x1011121;
+ cpu->isar.regs[ID_MMFR0] = 0x10201105;
+ cpu->isar.regs[ID_MMFR1] = 0x40000000;
+ cpu->isar.regs[ID_MMFR2] = 0x1260000;
+ cpu->isar.regs[ID_MMFR3] = 0x2122211;
+ cpu->isar.regs[ID_MMFR4] = 0x21110;
+ cpu->isar.regs[MVFR0] = 0x10110222;
+ cpu->isar.regs[MVFR1] = 0x13211111;
+ cpu->isar.regs[MVFR2] = 0x43;
+ cpu->isar.regs[ID_DFR0] = 0x4010088;
+ cpu->isar.regs[ID_PFR0] = 0x10131;
+ cpu->isar.regs[ID_PFR1] = 0x10010000;
+ cpu->isar.regs[ID_AA64PFR0] = 0x1100000011111112;
+ cpu->isar.regs[ID_AA64DFR0] = 0x10305408;
+ cpu->isar.regs[ID_AA64ISAR0] = 0x111110212120;
+ cpu->isar.regs[ID_AA64ISAR1] = 0x100001;
+ cpu->isar.regs[ID_AA64MMFR0] = 0x101125;
+ cpu->isar.regs[ID_AA64MMFR1] = 0x10212122;
+ cpu->isar.regs[ID_AA64MMFR2] = 0x1011;
+}
+
/* -cpu max: if KVM is enabled, like -cpu host (best possible with this host);
* otherwise, a CPU with as many features enabled as our emulation supports.
* The version of '-cpu max' for qemu-system-arm is defined in cpu.c;
@@ -964,6 +998,7 @@ static const ARMCPUInfo aarch64_cpus[] = {
{ .name = "Kunpeng-920", .initfn = aarch64_kunpeng_920_initfn},
{ .name = "FT-2000+", .initfn = aarch64_max_ft2000plus_initfn },
{ .name = "Tengyun-S2500", .initfn = aarch64_max_tengyun_s2500_initfn },
+ { .name = "Tengyun-S5000C", .initfn = aarch64_tengyun_s5000c_initfn },
{ .name = "a64fx", .initfn = aarch64_a64fx_initfn },
{ .name = "max", .initfn = aarch64_max_initfn },
};
--
2.41.0.windows.1