mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 16:53:55 -06:00
target-microblaze: QOM'ify CPU
Embed CPUMBState as first member of QOM MicroBlazeCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> [AF: Updated cpu.c to include cpu-qom.h indirectly via cpu.h]
This commit is contained in:
parent
aa0d1267b3
commit
b77f98cada
5 changed files with 135 additions and 1 deletions
|
@ -1891,11 +1891,13 @@ void cpu_dump_state (CPUMBState *env, FILE *f, fprintf_function cpu_fprintf,
|
|||
|
||||
CPUMBState *cpu_mb_init (const char *cpu_model)
|
||||
{
|
||||
MicroBlazeCPU *cpu;
|
||||
CPUMBState *env;
|
||||
static int tcg_initialized = 0;
|
||||
int i;
|
||||
|
||||
env = g_malloc0(sizeof(CPUMBState));
|
||||
cpu = MICROBLAZE_CPU(object_new(TYPE_MICROBLAZE_CPU));
|
||||
env = &cpu->env;
|
||||
|
||||
cpu_exec_init(env);
|
||||
cpu_state_reset(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue