Statistics
| Branch: | Revision:

root / target-unicore32 @ feature-archipelago

# Date Author Comment
fdfba1a2 02/11/2014 02:56 pm Edgar E. Iglesias

exec: Make ldl_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

ab1eb72b 10/11/2013 07:36 pm Anthony Liguori

Merge remote-tracking branch 'rth/tcg-pull' into staging

  1. By Richard Henderson
  2. Via Richard Henderson
    • rth/tcg-pull:
      exec: Add both big- and little-endian memory helpers
      tcg: Add qemu_ld_st_i32/64
      tcg: Add TCGMemOp
      configure: Remove CONFIG_QEMU_LDST_OPTIMIZATION...
5cd8f621 10/10/2013 09:43 pm Richard Henderson

tcg: Move helper registration into tcg_context_init

No longer needs to be done on a per-target basis.

Signed-off-by: Richard Henderson <>

51fb256a 10/07/2013 12:48 pm Andreas Färber

cpu: Drop cpu_model_str from CPU_COMMON

Since this is only read in cpu_copy() and linux-user has a global
cpu_model, drop the field from generic code.

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

8cfd0495 09/02/2013 07:08 pm Richard Henderson

tcg: Change tcg_gen_exit_tb argument to uintptr_t

And update all users.

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

b1669e5e 09/02/2013 07:08 pm Richard Henderson

target: Include softmmu_exec.h where forgotten

Several targets forgot to include softmmu_exec.h, which would
break them with a header cleanup to follow.

Reviewed-by: Aurelien Jarno <>
Signed-off-by: Richard Henderson <>

14a10fc3 07/29/2013 04:29 pm Andreas Färber

cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"

Commit c643bed99 moved qemu_init_vcpu() calls to common CPUState code.
This causes x86 cpu-add to fail with "KVM: setting VAPIC address failed".

The reason for the failure is that CPUClass::kvm_fd is not yet...

00b941e5 07/23/2013 03:41 am Andreas Färber

cpu: Turn cpu_get_phys_page_debug() into a CPUClass hook

Change breakpoint_invalidate() argument to CPUState alongside.

Since all targets now assign a softmmu-only field, we can drop helpers
cpu_class_set_{do_unassigned_access,vmsd}() and device_class_set_vmsd()....

b42eab27 07/23/2013 03:41 am Andreas Färber

target-unicore32: Implement CPUClass::set_pc()

This adds support for GDB's c addr (Continue) and s addr (Single Step).

Prepares for dropping cpu_pc_from_tb().

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

bdf7ae5b 07/23/2013 03:41 am Andreas Färber

cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()

Where no extra implementation is needed, fall back to CPUClass::set_pc().

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

ed2803da 07/23/2013 03:41 am Andreas Färber

cpu: Move singlestep_enabled field from CPU_COMMON to CPUState

Prepares for changing cpu_single_step() argument to CPUState.

Acked-by: Michael Walle <> (for lm32)
Signed-off-by: Andreas Färber <>

62a80559 07/09/2013 10:33 pm Andreas Färber

target-unicore32: Change gen_intermediate_code_internal() signature

Use UniCore32CPU and bool.

Prepares for moving singlestep_enabled field to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

6291ad77 07/09/2013 10:20 pm Peter Maydell

linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-user

The functions cpu_clone_regs() and cpu_set_tls() are not purely CPU
related -- they are specific to the TLS ABI for a a particular OS.
Move them into the linux-user/ tree where they belong....

6e42be7c 07/09/2013 10:20 pm Andreas Färber

cpu: Drop unnecessary dynamic casts in *_env_get_cpu()

A transition from CPUFooState to FooCPU can be considered safe,
just like FooCPU::env access in the opposite direction.
The only benefit of the FOO_CPU() casts would be protection against
bogus CPUFooState pointers, but then surrounding code would likely...

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

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

6681fca3 06/01/2013 01:25 pm Stefan Weil

Remove unnecessary break statements

Fix these warnings from cppcheck:

hw/display/cirrus_vga.c:2603:
hw/sd/sd.c:348:
hw/timer/exynos4210_mct.c:1033:
target-arm/translate.c:9886:
target-s390x/mem_helper.c:518:
target-unicore32/translate.c:1936:
style: Consecutive return, break, continue, goto or throw statements are unnecessary....

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

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

97a8ea5a 03/12/2013 11:35 am Andreas Färber

cpu: Replace do_interrupt() by CPUClass::do_interrupt method

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

806f352d 03/03/2013 04:29 pm Peter Maydell

gen-icount.h: Rename gen_icount_start/end to gen_tb_start/end

The gen_icount_start/end functions are now somewhat misnamed since they
are useful for generic "start/end of TB" code, used for more than just
icount. Rename them to gen_tb_start/end.

Signed-off-by: Peter Maydell <>...

fadf9825 03/03/2013 04:28 pm Andreas Färber

cpu: Introduce ENV_OFFSET macros

Introduce ENV_OFFSET macros which can be used in non-target-specific
code that needs to generate TCG instructions which reference CPUState
fields given the cpu_env register that TCG targets set up with a
pointer to the CPUArchState struct....

d1f8cd83 02/23/2013 07:25 pm Richard Henderson

target-unicore32: Use mul*2 for do_mult

Cc: Guan Xuetao <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

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

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

target-unicore32: Move TCG initialization to UniCore32CPU initfn

Normalize the "inited" logic and add a tcg_enabled() check to suppress
it for qtest.

Ensures that a QOM-created UniCore32CPU is usable.

Acked-by: Guan Xuetao <>
Signed-off-by: Andreas Färber <>

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

target-unicore32: Introduce QOM realizefn for UniCore32CPU

Introduce a realizefn and set realized = true in uc32_cpu_init().

Acked-by: Guan Xuetao <>
[AF: Invoke the parent's realizefn]
Signed-off-by: Andreas Färber <>

eeb266de 02/01/2013 02:35 am Andreas Färber

target-unicore32: Rename CPU subtypes

In the initial conversion of CPU models to QOM types, model names were
mapped 1:1 to type names. As a side effect this gained us a type "any",
which is now a device.

To avoid "-device any" silliness and to pave the way for compiling...

88e28512 02/01/2013 02:35 am Andreas Färber

target-unicore32: Mark as unmigratable

CPU_SAVE_VERSION 2 was bogus as both save and load would just throw a
hw_error(). Therefore we can without problems suppress registration of
"cpu_common" VMState by dropping CPU_SAVE_VERSION define and provide an
unmigratable "cpu" VMStateDescription for UniCore32CPU at device level...

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

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

Fixes -cpu unicore32-cpu asserting.

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

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

target-unicore32: 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....

d89e1218 01/28/2013 12:33 am Andreas Färber

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

Consolidate model checking into a new uc32_cpu_class_by_name().

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

74880fe2 12/23/2012 10:38 pm Robert Schiele

configure: allow disabling pixman if not needed

When we build neither any system emulation targets nor the tools there
is actually no need for pixman library. In that case do not enforce
presence of that library on the system.

Reviewed-by: Andreas F=E4rber <>...

6b4c305c 12/19/2012 09:32 am Paolo Bonzini

fpu: move public header file to include/fpu

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

14cccb61 12/19/2012 09:31 am Paolo Bonzini

qom: move include files to include/qom/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

28ecbaee 12/19/2012 09:31 am Paolo Bonzini

ui: move files to ui/ and include/ui/

Signed-off-by: Paolo Bonzini <>

76cad711 12/19/2012 09:29 am Paolo Bonzini

build: kill libdis, move disassemblers to disas/

Signed-off-by: Paolo Bonzini <>

a8a826a3 12/16/2012 10:35 am Blue Swirl

exec: refactor cpu_restore_state

Refactor common code around calls to cpu_restore_state().

tb_find_pc() has now no external users, make it static.

Signed-off-by: Blue Swirl <>

ab1103de 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_instr_start from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

25983cad 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_pc from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

c9c99c22 12/08/2012 04:24 pm Evgeny Voevodin

TCG: Use gen_opc_icount from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Signed-off-by: Blue Swirl <>

92414b31 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_buf from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

efd7f486 11/17/2012 03:53 pm Evgeny Voevodin

TCG: Use gen_opc_ptr from context instead of global variable.

Signed-off-by: Evgeny Voevodin <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Blue Swirl <>

f4359b9f 11/10/2012 03:49 pm Blue Swirl

disas: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Richard Henderson <>
Acked-by: Aurelien Jarno <>
Acked-by: Guan Xuetao <>

447b3b60 11/10/2012 03:49 pm Blue Swirl

target-unicore32: avoid using cpu_single_env

Pass around CPUArchState instead of using global cpu_single_env.

Signed-off-by: Blue Swirl <>
Acked-by: Guan Xuetao <>
Reviewed-by: Andreas Färber <>

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

daa47c34 09/27/2012 10:44 pm Richard Henderson

target-unicore32: Call tcg_gen_debug_insn_start

Acked-by: Guan Xuetao <>
Signed-off-by: Richard Henderson <>
Signed-off-by: Aurelien Jarno <>

04a130ea 09/15/2012 08:44 pm Blue Swirl

target-unicore32: switch to AREG0 free mode

Add an explicit CPUState parameter instead of relying on AREG0
and switch to AREG0 free mode.

Tested-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>

1e5cdaa1 08/11/2012 12:37 pm Guan Xuetao

unicore32: Close dump-option of cpu_dump_state_ucf64 function

Since of tedious output, we close dump-option of cpu_dump_state_ucf64 function.

Signed-off-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>

ff5928d0 08/11/2012 12:37 pm Guan Xuetao

unicore32-softmmu: Add a minimal curses screen support

This patch adds a minimal curses screen support for unicore32-softmmu.
We assume 80*30 screen size to minimize the implementation.
Two problems are not solved, but they are innocuous.
1. curses windows will be blank when switching to monitor screen and back...

e8ede0a8 08/11/2012 12:37 pm Guan Xuetao

unicore32: Split UniCore-F64 instruction helpers from helper.c

This patch just splits ucf64 instruction simulation helpers from
helper.c.
Also, two checkpatch warnings are solved.

v1->v2: adjust copyright information for new ucf64_helper.c

Signed-off-by: Guan Xuetao <>...

c5240d82 08/11/2012 12:37 pm Guan Xuetao

unicore32: Disintegrate cpu_dump_state_ucf64 function

This patch disintegrates cpu_dump_state_ucf64 function from cpu_dump_state.

Signed-off-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>

f3ccc323 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Implement softmmu specific functions

This patch implements softmmu specific functions, include tlb_fill,
switch_mode, do_interrupt and uc32_cpu_handle_mmu_fault.
So the full exception handlers and page table walking could work now.

Signed-off-by: Guan Xuetao <>...

ef03168a 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Make sure that kernel can access user space

As a matter of course, we need to access user space in kernel code,
so we need to correct load/store decoders to indicate correct memory
region.

Signed-off-by: Guan Xuetao <>...

889c134a 08/11/2012 12:36 pm Andreas Färber

target-unicore32: Drop UC32_CPUID macros

Any code that depends on a particular CPU type can now go through
callbacks on the QOM UniCore32CPUClass.

Signed-off-by: Andreas Färber <
Acked-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>

527d9979 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Add coprocessor 0(sysctrl) and 1(ocd) instruction support

Coprocessor 0 is system control coprocessor, and we need get/set its contents.
Also, all cache/tlb ops shoule be implemented here, but just ignored with no harm.

Coprocessor 1 is OCD (on-chip-debugger), which is used for faked console,...

d48813dd 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Make UniCore32 cpuid & exceptions correct and runable

This patch initializes the cpuid to exactly correct value because
linux kernel will check it.
In addition, the exception types are specified in proper situations.
Then it could make exceptions generated correctly and timely....

4f23a1e6 08/11/2012 12:36 pm Guan Xuetao

unicore32-softmmu: Add unicore32-softmmu build support

This patch adds unicore32-softmmu build support, include configure,
makefile, arch_init, and all missing functions needed by softmmu.
Although all missing functions are empty, unicore32-softmmu could...

fbe37ef3 06/07/2012 10:21 am Paolo Bonzini

build: move other target-*/ objects to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

9cdc8df3 06/07/2012 08:19 am Paolo Bonzini

build: move libobj-y variable to nested Makefile.objs

Signed-off-by: Paolo Bonzini <>

5e8861a0 06/07/2012 08:17 am Paolo Bonzini

build: move obj-TARGET-y variables to nested Makefile.objs

Also drop duplicate occurrence of device-hotplug.o.

Signed-off-by: Paolo Bonzini <>

8df9082d 03/30/2012 12:09 pm Andreas Färber

target-unicore32: Move CPU-dependent init into initfn

Instead of setting values in a CPUID switch, do so in initfn functions.

Signed-off-by: Andreas Färber <>
Acked-by: Guan Xuetao <>

2b3bc6c0 03/30/2012 12:09 pm Andreas Färber

target-unicore32: Relicense to GPLv2+

Adopt the license text suggested by Guan Xue-tao (with a minor
simplification) for all target-unicore/ files except helper.c.

To helper.c Anthony Liguori contributed a qemu_malloc() -> g_malloc()
conversion, still pending IBM relicensing approval, so that remains...

c3a8baa9 03/30/2012 12:09 pm Andreas Färber

target-unicore32: License future contributions under GPLv2+

This is to limit relicensing obstacles to the pending IBM investigation.

Signed-off-by: Andreas Färber <>
Acked-by: Guan Xuetao <>

ae0f5e9e 03/30/2012 12:09 pm Andreas Färber

target-unicore32: QOM'ify CPU

Embed CPUUniCore32State as first member of UniCore32CPU.

Contributed under GPLv2+.

Signed-off-by: Andreas Färber <>
Acked-by: Guan Xuetao <>

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

eb23b556 03/14/2012 11:20 pm Andreas Färber

target-unicore32: Don't overuse CPUState

Scripted conversion:
sed -i "s/CPUState/CPUUniCore32State/g" target-unicore32/*.[hc]
sed -i "s/#define CPUUniCore32State/#define CPUState/" target-unicore32/cpu.h

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

15ecee74 03/14/2012 11:20 pm Andreas Färber

target-unicore32: Rename to CPUUniCore32State

This aids in refactoring CPUState by adopting the common naming scheme.

Signed-off-by: Andreas Färber <>
Reviewed-by: Anthony Liguori <>

8141905a 02/28/2012 11:33 pm Stefan Weil

target-unicore32: Clean includes

The change in cpu.h is needed when HOST_LONG_BITS is defined in qemu-common.h.

Signed-off-by: Stefan Weil <>

fa4e49c0 09/09/2011 08:58 pm Gerd Hoffmann

Use hex instead of binary.

Older gcc versions don't understand 0b<bits>,
use hex representation instead.

Fixes build failure on RHEL-5.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

3feaca9e 08/21/2011 06:32 pm Stefan Weil

Fix conversions from pointer to tcg_target_long

tcg_gen_exit_tb takes a parameter of type tcg_target_long,
so the type casts of pointer to long should be replaced by
type casts of pointer to tcg_target_long.

These changes are needed for build environments where...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

97b348e7 08/07/2011 12:32 pm Blue Swirl

Remove unused is_softmmu parameter from cpu_handle_mmu_fault

Parameter is_softmmu (and its evil mutant twin brother is_softmuu)
is not used in cpu_*_handle_mmu_fault() functions, remove them
and adjust callers.

Acked-by: Richard Henderson <>...

3e457172 07/30/2011 12:41 pm Blue Swirl

exec.h cleanup

Move softmmu_exec.h include directives from target-*/exec.h to
target-*/op_helper.c. Move also various other stuff only used in
op_helper.c there.

Define global env in dyngen-exec.h.

For i386, move wrappers for segment and FPU helpers from user-exec.c...

2b41f10e 06/26/2011 09:25 pm Blue Swirl

Remove exec-all.h include directives

Most exec-all.h include directives are now useless, remove them.

Signed-off-by: Blue Swirl <>

f081c76c 06/26/2011 09:25 pm Blue Swirl

Move cpu_has_work and cpu_pc_from_tb to cpu.h

Move functions cpu_has_work() and cpu_pc_from_tb() from exec.h to cpu.h. This is
needed by later patches.

Signed-off-by: Blue Swirl <>

f3e27037 06/26/2011 09:25 pm Blue Swirl

exec.h: fix coding style and change cpu_has_work to return bool

Before the next patch, fix coding style of the areas affected.

Change the type of the return value from cpu_has_work() and
qemu_cpu_has_work() to bool.

Signed-off-by: Blue Swirl <>

1162c041 06/26/2011 09:25 pm Blue Swirl

cpu_loop_exit: avoid using AREG0

Make cpu_loop_exit() take a parameter for CPUState instead of relying
on global env.

Signed-off-by: Blue Swirl <>

e87b7cb0 04/20/2011 11:33 am Stefan Weil

Remove unused function parameters from gen_pc_load and rename the function

Function gen_pc_load was introduced in commit
d2856f1ad4c259e5766847c49acbb4e390731bd4.
The only reason for parameter searched_pc was
a debug statement in target-i386/translate.c....

6e64da3c 04/12/2011 09:48 pm Guan Xuetao

unicore32: add target-unicore32 directory for unicore32-linux-user support

Signed-off-by: Guan Xuetao <>
Signed-off-by: Blue Swirl <>