[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 5/7] target-unicore32: Store cp0 c1_sys in UniCore32
From: |
Andreas Färber |
Subject: |
[Qemu-devel] [PATCH 5/7] target-unicore32: Store cp0 c1_sys in UniCore32CPUClass |
Date: |
Wed, 14 Mar 2012 02:39:56 +0100 |
Contributed under GPLv2+.
Signed-off-by: Andreas Färber <address@hidden>
---
target-unicore32/cpu-qom.h | 1 +
target-unicore32/cpu.c | 4 ++++
target-unicore32/helper.c | 1 -
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/target-unicore32/cpu-qom.h b/target-unicore32/cpu-qom.h
index f3592d0..4d730f0 100644
--- a/target-unicore32/cpu-qom.h
+++ b/target-unicore32/cpu-qom.h
@@ -45,6 +45,7 @@ typedef struct UniCore32CPUClass {
struct {
uint32_t c0_cpuid;
uint32_t c0_cachetype;
+ uint32_t c1_sys;
} cp0;
} UniCore32CPUClass;
diff --git a/target-unicore32/cpu.c b/target-unicore32/cpu.c
index c17b880..fa5c280 100644
--- a/target-unicore32/cpu.c
+++ b/target-unicore32/cpu.c
@@ -18,6 +18,7 @@ typedef struct UniCore32CPUInfo {
const char *name;
uint32_t cp0_c0_cpuid;
uint32_t cp0_c0_cachetype;
+ uint32_t cp0_c1_sys;
} UniCore32CPUInfo;
static const UniCore32CPUInfo uc32_cpus[] = {
@@ -25,6 +26,7 @@ static const UniCore32CPUInfo uc32_cpus[] = {
.name = "UniCore-II",
.cp0_c0_cpuid = 0x40010863,
.cp0_c0_cachetype = 0x1dd20d2,
+ .cp0_c1_sys = 0x00090078,
},
{
.name = "any",
@@ -43,6 +45,7 @@ static void uc32_cpu_initfn(Object *obj)
env->cpu_model_str = object_get_typename(obj);
env->cp0.c0_cpuid = klass->cp0.c0_cpuid;
env->cp0.c0_cachetype = klass->cp0.c0_cachetype;
+ env->cp0.c1_sys = klass->cp0.c1_sys;
env->uncached_asr = ASR_MODE_USER;
env->regs[31] = 0;
@@ -57,6 +60,7 @@ static void uc32_cpu_class_init(ObjectClass *klass, void
*data)
k->cp0.c0_cpuid = info->cp0_c0_cpuid;
k->cp0.c0_cachetype = info->cp0_c0_cachetype;
+ k->cp0.c1_sys = info->cp0_c1_sys;
}
static void uc32_register_cpu(const UniCore32CPUInfo *info)
diff --git a/target-unicore32/helper.c b/target-unicore32/helper.c
index 5e5e34d..ba9318b 100644
--- a/target-unicore32/helper.c
+++ b/target-unicore32/helper.c
@@ -35,7 +35,6 @@ CPUUniCore32State *uc32_cpu_init(const char *cpu_model)
set_feature(env, UC32_HWCAP_CMOV);
set_feature(env, UC32_HWCAP_UCF64);
env->ucf64.xregs[UC32_UCF64_FPSCR] = 0;
- env->cp0.c1_sys = 0x00090078;
break;
case UC32_CPUID_ANY: /* For userspace emulation. */
set_feature(env, UC32_HWCAP_CMOV);
--
1.7.7
- Re: [Qemu-devel] [PATCH 2/7] target-unicore32: Relicense to GPLv2+, (continued)
[Qemu-devel] [PATCH 1/7] MAINTAINERS: Add entry for UniCore32, Andreas Färber, 2012/03/13
[Qemu-devel] [PATCH 3/7] target-unicore32: QOM'ify CPU, Andreas Färber, 2012/03/13
[Qemu-devel] [PATCH 5/7] target-unicore32: Store cp0 c1_sys in UniCore32CPUClass,
Andreas Färber <=
[Qemu-devel] [PATCH 7/7] target-unicore32: Store ucf64 fpscr in UniCore32CPUClass, Andreas Färber, 2012/03/13
[Qemu-devel] [PATCH 6/7] target-unicore32: Store feature flags in UniCore32CPUClass, Andreas Färber, 2012/03/13
Re: [Qemu-devel] [PATCH 0/7] QOM'ify UniCore32 CPU, Guan Xuetao, 2012/03/14
Re: [Qemu-devel] [PATCH 0/7] QOM'ify UniCore32 CPU, Blue Swirl, 2012/03/14
[Qemu-devel] [PATCH 00/12] QOM'ify SuperH CPU and SH7750 SoC, Andreas Färber, 2012/03/14