diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-09-21 14:40:30 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-09-21 14:40:32 +0100 |
commit | 9ee660e7c138595224b65ddc1c5712549f0a278c (patch) | |
tree | fc91b907a3befd431541637c407b77142a829354 /target/mips/translate.c | |
parent | ff5667ed53c544c4dc88dcd7cb23cc509c9a55e0 (diff) | |
parent | 2a2be359c4335607c7f746cf27c412c08ab89aff (diff) |
Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170921' into staging
MIPS patches 2017-09-21
Changes:
QOMify MIPS cpu
Improve macro parenthesization
# gpg: Signature made Thu 21 Sep 2017 13:50:37 BST
# gpg: using RSA key 0x2238EB86D5F797C2
# gpg: Good signature from "Yongbok Kim <yongbok.kim@imgtec.com>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg: It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 8600 4CF5 3415 A5D9 4CFA 2B5C 2238 EB86 D5F7 97C2
* remotes/yongbok/tags/mips-20170921:
mips: Improve macro parenthesization
mips: replace cpu_mips_init() with cpu_generic_init()
mips: MIPSCPU model subclasses
mips: call cpu_mips_realize_env() from mips_cpu_realizefn()
mips: split cpu_mips_realize_env() out of cpu_mips_init()
mips: introduce internal.h and cleanup cpu.h
mips: move hw/mips/cputimer.c to target/mips/
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/mips/translate.c')
-rw-r--r-- | target/mips/translate.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/target/mips/translate.c b/target/mips/translate.c index c78d27294c..d16d879df7 100644 --- a/target/mips/translate.c +++ b/target/mips/translate.c @@ -23,6 +23,7 @@ #include "qemu/osdep.h" #include "cpu.h" +#include "internal.h" #include "disas/disas.h" #include "exec/exec-all.h" #include "tcg-op.h" @@ -20511,29 +20512,15 @@ void mips_tcg_init(void) #include "translate_init.c" -MIPSCPU *cpu_mips_init(const char *cpu_model) +void cpu_mips_realize_env(CPUMIPSState *env) { - MIPSCPU *cpu; - CPUMIPSState *env; - const mips_def_t *def; - - def = cpu_mips_find_by_name(cpu_model); - if (!def) - return NULL; - cpu = MIPS_CPU(object_new(TYPE_MIPS_CPU)); - env = &cpu->env; - env->cpu_model = def; env->exception_base = (int32_t)0xBFC00000; #ifndef CONFIG_USER_ONLY - mmu_init(env, def); + mmu_init(env, env->cpu_model); #endif - fpu_init(env, def); - mvp_init(env, def); - - object_property_set_bool(OBJECT(cpu), true, "realized", NULL); - - return cpu; + fpu_init(env, env->cpu_model); + mvp_init(env, env->cpu_model); } bool cpu_supports_cps_smp(const char *cpu_model) |