mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
Fix CPU (re-)selection on reset.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2900 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
fdf41d225e
commit
51b2772f28
5 changed files with 12 additions and 4 deletions
|
@ -206,13 +206,15 @@ static void r4k_mmu_init (CPUMIPSState *env, mips_def_t *def)
|
|||
|
||||
int cpu_mips_register (CPUMIPSState *env, mips_def_t *def)
|
||||
{
|
||||
if (!def)
|
||||
def = env->cpu_model;
|
||||
if (!def)
|
||||
cpu_abort(env, "Unable to find MIPS CPU definition\n");
|
||||
env->cpu_model = def;
|
||||
env->CP0_PRid = def->CP0_PRid;
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
env->CP0_Config0 = def->CP0_Config0 | (1 << CP0C0_BE);
|
||||
#else
|
||||
env->CP0_Config0 = def->CP0_Config0;
|
||||
#ifdef TARGET_WORDS_BIGENDIAN
|
||||
env->CP0_Config0 |= (1 << CP0C0_BE);
|
||||
#endif
|
||||
env->CP0_Config1 = def->CP0_Config1;
|
||||
env->CP0_Config2 = def->CP0_Config2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue