mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-05 00:33:55 -06:00
added cpu_model parameter to cpu_init()
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3562 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
7d77bf2006
commit
aaed909a49
46 changed files with 320 additions and 324 deletions
|
@ -2970,20 +2970,26 @@ void cpu_ppc_reset (void *opaque)
|
|||
tlb_flush(env, 1);
|
||||
}
|
||||
|
||||
CPUPPCState *cpu_ppc_init (void)
|
||||
CPUPPCState *cpu_ppc_init (const char *cpu_model)
|
||||
{
|
||||
CPUPPCState *env;
|
||||
const ppc_def_t *def;
|
||||
|
||||
def = cpu_ppc_find_by_name(cpu_model);
|
||||
if (!def)
|
||||
return NULL;
|
||||
|
||||
env = qemu_mallocz(sizeof(CPUPPCState));
|
||||
if (!env)
|
||||
return NULL;
|
||||
cpu_exec_init(env);
|
||||
|
||||
cpu_ppc_register_internal(env, def);
|
||||
cpu_ppc_reset(env);
|
||||
return env;
|
||||
}
|
||||
|
||||
void cpu_ppc_close (CPUPPCState *env)
|
||||
{
|
||||
/* Should also remove all opcode tables... */
|
||||
free(env);
|
||||
qemu_free(env);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue