mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
cpu: Factor out cpu_generic_init()
All targets using it gain the ability to set -cpu name,key=value,... options via the default TYPE_CPU CPUClass::parse_features() implementation. Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
1590bbcb02
commit
9262685b81
10 changed files with 62 additions and 103 deletions
|
@ -2186,19 +2186,7 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
|
||||
ARMCPU *cpu_arm_init(const char *cpu_model)
|
||||
{
|
||||
ARMCPU *cpu;
|
||||
ObjectClass *oc;
|
||||
|
||||
oc = cpu_class_by_name(TYPE_ARM_CPU, cpu_model);
|
||||
if (!oc) {
|
||||
return NULL;
|
||||
}
|
||||
cpu = ARM_CPU(object_new(object_class_get_name(oc)));
|
||||
|
||||
/* TODO this should be set centrally, once possible */
|
||||
object_property_set_bool(OBJECT(cpu), true, "realized", NULL);
|
||||
|
||||
return cpu;
|
||||
return ARM_CPU(cpu_generic_init(TYPE_ARM_CPU, cpu_model));
|
||||
}
|
||||
|
||||
void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue