Revision 2d44fc8e hw/mips_mipssim.c
b/hw/mips_mipssim.c | ||
---|---|---|
46 | 46 |
} loaderparams; |
47 | 47 |
|
48 | 48 |
typedef struct ResetData { |
49 |
CPUMIPSState *env;
|
|
49 |
MIPSCPU *cpu;
|
|
50 | 50 |
uint64_t vector; |
51 | 51 |
} ResetData; |
52 | 52 |
|
... | ... | |
105 | 105 |
static void main_cpu_reset(void *opaque) |
106 | 106 |
{ |
107 | 107 |
ResetData *s = (ResetData *)opaque; |
108 |
CPUMIPSState *env = s->env;
|
|
108 |
CPUMIPSState *env = &s->cpu->env;
|
|
109 | 109 |
|
110 |
cpu_state_reset(env);
|
|
110 |
cpu_reset(CPU(s->cpu));
|
|
111 | 111 |
env->active_tc.PC = s->vector & ~(target_ulong)1; |
112 | 112 |
if (s->vector & 1) { |
113 | 113 |
env->hflags |= MIPS_HFLAG_M16; |
... | ... | |
161 | 161 |
env = &cpu->env; |
162 | 162 |
|
163 | 163 |
reset_info = g_malloc0(sizeof(ResetData)); |
164 |
reset_info->env = env;
|
|
164 |
reset_info->cpu = cpu;
|
|
165 | 165 |
reset_info->vector = env->active_tc.PC; |
166 | 166 |
qemu_register_reset(main_cpu_reset, reset_info); |
167 | 167 |
|
Also available in: Unified diff