summaryrefslogtreecommitdiff
path: root/target-lm32/cpu.c
AgeCommit message (Collapse)AuthorFilesLines
2013-03-18target-lm32: flush tlb after clearing envMichael Walle1-2/+2
The tlb data is stored within the CPU env. Therefore, the initialization has to be done after we clear the environment. Otherwise the tlb will have a valid entry for address 0x0. Signed-off-by: Michael Walle <michael@walle.cc>
2013-03-12target-lm32: Update VMStateDescription to LM32CPUAndreas Färber1-0/+1
Add a vmstate_lm32_cpu referencing the previous VMStateDescription as a sub-struct and hook it up to CPUClass::vmsd. Drop cpu_{save,load}(). Acked-by: Michael Walle <michael@walle.cc> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-03-12cpu: Replace do_interrupt() by CPUClass::do_interrupt methodAndreas Färber1-0/+2
This removes a global per-target function and thus takes us one step closer to compiling multiple targets into one executable. It will also allow to override the interrupt handling for certain CPU families. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16cpu: Add CPUArchState pointer to CPUStateAndreas Färber1-0/+2
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. The field may not be called "env" due to it being poisoned. Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-lm32: Move TCG initialization to LM32CPU initfnAndreas Färber1-0/+6
Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-16target-lm32: Introduce QOM realizefn for LM32CPUAndreas Färber1-2/+16
Introduce a realizefn and set realized = true in cpu_lm32_init(). Also move cpu_reset() call from initfn to realizefn. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-01-15cpu: Move cpu_index field to CPUStateAndreas Färber1-1/+1
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(). Acked-by: Richard Henderson <rth@twiddle.net> (for alpha) [AF: Rebased onto ppc CPU subclasses and openpic changes] Signed-off-by: Andreas Färber <afaerber@suse.de>
2012-06-04target-lm32: Let cpu_lm32_init() return LM32CPUAndreas Färber1-1/+1
Make the include paths for cpu-qom.h consistent to allow using LM32CPU in cpu.h. Turn cpu_init macro into a static inline function returning CPULM32State for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
2012-04-12target-lm32: QOM'ify CPU resetAndreas Färber1-1/+9
Move code from cpu_state_reset() into QOM lm32_cpu_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
2012-04-12target-lm32: QOM'ify CPU initAndreas Färber1-0/+13
Move code from cpu_lm32_init() to an initfn; call cpu_reset() instead of cpu_state_reset(). Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>
2012-04-12target-lm32: QOM'ify CPUAndreas Färber1-0/+60
Embed CPULM32State as first member of QOM LM32CPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Michael Walle <michael@walle.cc>