qemu-devel
[Top][All Lists]
Advanced

[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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]