Statistics
| Branch: | Revision:

root / target-openrisc / cpu.c @ 478032a9

History | View | Annotate | Download (6.3 kB)

# Date Author Comment
bc755a00 02/01/2013 02:35 am Andreas Färber

target-openrisc: TYPE_OPENRISC_CPU should be abstract

A basic assumption of CPU subtypes is that only specific models get
instantiated. A user is not supposed to instantiate an <arch>-cpu.
Suppress it via abstract = true, which also drops or32-cpu from
-cpu ? output....

478032a9 02/01/2013 02:35 am Andreas Färber

target-openrisc: Rename CPU subtypes

Model names were mapped 1:1 to type names. As a side effect this
registered a type "any", which is now a device.

To avoid "-device any" silliness and to pave the way for compiling
multiple targets into one executable, adopt a <name>-<arch>-cpu scheme....

a1ebd6ce 01/28/2013 05:57 pm Andreas Färber

target-openrisc: Use type_register() instead of type_register_static()

According to its documentation, type_register_static()'s TypeInfo
argument should exist for the life type of the type.
Therefore use type_register() when registering the list of CPU subtypes....

c432b784 01/28/2013 05:54 pm Andreas Färber

target-openrisc: Catch attempt to instantiate abstract type in cpu_init()

There is no abstract OpenRISCCPU yet, but that seems a bug of its own.

Cc:
Signed-off-by: Andreas Färber <>

bd039ce0 01/27/2013 03:52 pm Andreas Färber

target-openrisc: Detect attempt to instantiate non-CPU type in cpu_init()

Consolidate model checking into a new openrisc_cpu_class_by_name().

If the name matches an existing type, also check whether that type is
actually (a sub-type of) TYPE_OPENRISC_CPU....

8486af93 01/27/2013 03:34 pm Andreas Färber

target-openrisc: Drop OpenRISCCPUList

It was missed in 92a3136174f60ee45b113296cb2c2a5225b00369 (cpu:
Introduce CPUListState struct) because its naming did not match the
*CPUListState pattern. Use the generalized CPUListState instead.

Signed-off-by: Andreas Färber <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

e67db06e 07/28/2012 12:12 am Jia Liu

target-or32: Add target stubs and QOM cpu

Add OpenRISC target stubs, QOM cpu and basic machine.

Signed-off-by: Jia Liu <>
Signed-off-by: Blue Swirl <>