Statistics
| Branch: | Revision:

root / target-openrisc @ 834574ea

Name Size
Makefile.objs 202 Bytes
cpu.c 6.6 kB
cpu.h 11.7 kB
exception.c 937 Bytes
exception.h 970 Bytes
exception_helper.c 981 Bytes
fpu_helper.c 14.5 kB
helper.h 2.1 kB
int_helper.c 2.1 kB
interrupt.c 2.4 kB
interrupt_helper.c 1.8 kB
machine.c 1.6 kB
mmu.c 6.8 kB
mmu_helper.c 1.5 kB
sys_helper.c 8.4 kB
translate.c 55.3 kB

Latest revisions

# Date Author Comment
c05efcb1 02/16/2013 03:51 pm Andreas Färber

cpu: Add CPUArchState pointer to CPUState

The target-specific ENV_GET_CPU() macros have allowed us to navigate
from CPUArchState to CPUState. The reverse direction was not supported.
Avoid introducing CPU_GET_ENV() macros by initializing an untyped
pointer that is initialized in derived instance_init functions....

c296262b 02/16/2013 03:50 pm Andreas Färber

target-openrisc: Update OpenRISCCPU to QOM realizefn

Update the openrisc_cpu_realize() signature, hook it up to
DeviceClass::realize and set realized = true in cpu_openrisc_init().

qapi/error.h is now included through qdev and no longer needed.

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

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 <>

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

target-openrisc: Clean up triple QOM casts

Instead of calling openrisc_env_get_cpu(), casting to CPU via the
ENV_GET_CPU() compatibility macro and casting back to OPENRISC_CPU(),
just call openrisc_env_get_cpu() directly.

ENV_GET_CPU() is meant as workaround for target-independent code only....

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()....

View revisions

Also available in: Atom