summaryrefslogtreecommitdiffstats
path: root/target-unicore32
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'rth/tcg-pull' into stagingAnthony Liguori2013-10-111-3/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # By Richard Henderson # 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 tcg: Add tcg-be-ldst.h tcg: Add tcg-be-null.h exec: Delete is_tcg_gen_code and GETRA_EXT tcg-aarch64: Update to helper_ret_*_mmu routines tcg: Merge tcg_register_helper into tcg_context_init tcg: Add tcg-runtime.c helpers to all_helpers tcg: Put target helper data into an array. tcg: Remove stray semi-colons from target-*/helper.h tcg: Move helper registration into tcg_context_init target-m68k: Rename helpers.h to helper.h tcg: Use a GHashTable for tcg_find_helper tcg: Delete tcg_helper_get_name declaration tcg-hppa: Remove tcg backend Message-id: 1381440525-6666-1-git-send-email-rth@twiddle.net Signed-off-by: Anthony Liguori <aliguori@amazon.com>
| * tcg: Move helper registration into tcg_context_initRichard Henderson2013-10-101-3/+0
| | | | | | | | | | | | No longer needs to be done on a per-target basis. Signed-off-by: Richard Henderson <rth@twiddle.net>
* | cpu: Drop cpu_model_str from CPU_COMMONAndreas Färber2013-10-071-1/+0
|/ | | | | | | 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 <afaerber@suse.de>
* target: Include softmmu_exec.h where forgottenRichard Henderson2013-09-021-0/+2
| | | | | | | | Several targets forgot to include softmmu_exec.h, which would break them with a header cleanup to follow. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
* tcg: Change tcg_gen_exit_tb argument to uintptr_tRichard Henderson2013-09-021-1/+1
| | | | | | | And update all users. Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Signed-off-by: Richard Henderson <rth@twiddle.net>
* cpu: Partially revert "cpu: Change qemu_init_vcpu() argument to CPUState"Andreas Färber2013-07-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 initialized in the following call graph: ->x86_cpu_realizefn ->x86_cpu_apic_realize ->qdev_init ->device_set_realized ->device_reset (hotplugged == 1) ->apic_reset_common ->vapic_base_update ->kvm_apic_vapic_base_update This causes attempted KVM vCPU ioctls to fail. By contrast, in the non-hotplug case the APIC is reset much later, when the vCPU is already initialized. As a quick and safe solution, move the qemu_init_vcpu() call back into the targets' realize functions. Reported-by: Chen Fan <chen.fan.fnst@cn.fujitsu.com> Acked-by: Igor Mammedov <imammedo@redhat.com> (for i386) Tested-by: Jia Liu <proljc@gmail.com> (for openrisc) Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Turn cpu_get_phys_page_debug() into a CPUClass hookAndreas Färber2013-07-233-3/+8
| | | | | | | | | | | | 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(). Prepares for changing cpu_memory_rw_debug() argument to CPUState. Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa) Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Move singlestep_enabled field from CPU_COMMON to CPUStateAndreas Färber2013-07-231-3/+4
| | | | | | | Prepares for changing cpu_single_step() argument to CPUState. Acked-by: Michael Walle <michael@walle.cc> (for lm32) Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()Andreas Färber2013-07-231-5/+0
| | | | | | | Where no extra implementation is needed, fall back to CPUClass::set_pc(). Acked-by: Michael Walle <michael@walle.cc> (for lm32) Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Implement CPUClass::set_pc()Andreas Färber2013-07-231-0/+8
| | | | | | | | 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 <afaerber@suse.de>
* target-unicore32: Change gen_intermediate_code_internal() signatureAndreas Färber2013-07-091-4/+5
| | | | | | | | | Use UniCore32CPU and bool. Prepares for moving singlestep_enabled field to CPUState. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Drop unnecessary dynamic casts in *_env_get_cpu()Andreas Färber2013-07-091-1/+1
| | | | | | | | | | | | | | | | | 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 break, too. This should slightly improve interrupt etc. performance when going from CPUFooState to FooCPU. For any additional CPU() casts see 3556c233d931ad5ffa46a35cb25cfc057732ebb8 (qom: allow turning cast debugging off). Reported-by: Anthony Liguori <aliguori@us.ibm.com> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
* linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-userPeter Maydell2013-07-091-13/+0
| | | | | | | | | | | | | 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. target-lm32 had entirely unused implementations, since it has no linux-user target; just drop them. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Acked-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Change qemu_init_vcpu() argument to CPUStateAndreas Färber2013-06-281-3/+0
| | | | | | | | This allows to move the call into CPUState's realizefn. Therefore move the stub into libqemustub.a. Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Andreas Färber <afaerber@suse.de>
* cpu: Turn cpu_dump_{state,statistics}() into CPUState hooksAndreas Färber2013-06-283-2/+7
| | | | | | | | | 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 <afaerber@suse.de>
* Remove unnecessary break statementsStefan Weil2013-06-011-1/+0
| | | | | | | | | | | | | | | | | 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. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
* cpu: Replace do_interrupt() by CPUClass::do_interrupt methodAndreas Färber2013-03-125-4/+10
| | | | | | | | | | 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>
* cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber2013-03-122-4/+3
| | | | | | | | | | 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 <afaerber@suse.de>
* gen-icount.h: Rename gen_icount_start/end to gen_tb_start/endPeter Maydell2013-03-031-2/+2
| | | | | | | | | | 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 <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cpu: Introduce ENV_OFFSET macrosAndreas Färber2013-03-031-0/+1
| | | | | | | | | | | | 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. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-unicore32: Use mul*2 for do_multRichard Henderson2013-02-231-72/+11
| | | | | | Cc: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* cpu: Add CPUArchState pointer to CPUStateAndreas Färber2013-02-161-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>
* target-unicore32: Move TCG initialization to UniCore32CPU initfnAndreas Färber2013-02-162-6/+6
| | | | | | | | | | 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 <gxt@mprc.pku.edu.cn> Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Introduce QOM realizefn for UniCore32CPUAndreas Färber2013-02-163-1/+19
| | | | | | | | Introduce a realizefn and set realized = true in uc32_cpu_init(). Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> [AF: Invoke the parent's realizefn] Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Rename CPU subtypesAndreas Färber2013-02-012-3/+7
| | | | | | | | | | | | | 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 multiple targets into one executable, adopt a <name>-<arch>-cpu scheme. No functional changes for -cpu arguments. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Mark as unmigratableAndreas Färber2013-02-014-26/+9
| | | | | | | | | | | | 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 instead, where we can attach this the QOM way. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com>
* target-unicore32: Use type_register() instead of type_register_static()Andreas Färber2013-01-281-1/+1
| | | | | | | | | | | | 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. No functional change with the current implementation. Cf. 918fd0839eeafc83bd4984364321a947d29041fe for arm. Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Catch attempt to instantiate abstract type in cpu_init()Andreas Färber2013-01-281-1/+2
| | | | | | | Fixes -cpu unicore32-cpu asserting. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de>
* target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init()Andreas Färber2013-01-272-2/+27
| | | | | | | | | | | | 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. This fixes, e.g., -cpu puv3_dma asserting. Cc: qemu-stable@nongnu.org Signed-off-by: Andreas Färber <afaerber@suse.de>
* configure: allow disabling pixman if not neededRobert Schiele2012-12-231-0/+2
| | | | | | | | | | 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 <afaerber@suse.de> Signed-off-by: Robert Schiele <rschiele@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fpu: move public header file to include/fpuPaolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* misc: move include files to include/qemu/Paolo Bonzini2012-12-192-2/+2
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* qom: move include files to include/qom/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: move include files to include/exec/Paolo Bonzini2012-12-195-11/+11
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* ui: move files to ui/ and include/ui/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* build: kill libdis, move disassemblers to disas/Paolo Bonzini2012-12-191-1/+1
| | | | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* exec: refactor cpu_restore_stateBlue Swirl2012-12-161-8/+1
| | | | | | | | 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 <blauwirbel@gmail.com>
* TCG: Use gen_opc_instr_start from context instead of global variable.Evgeny Voevodin2012-12-081-3/+3
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_icount from context instead of global variable.Evgeny Voevodin2012-12-081-1/+1
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_pc from context instead of global variable.Evgeny Voevodin2012-12-081-2/+2
| | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_buf from context instead of global variable.Evgeny Voevodin2012-11-171-3/+3
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* TCG: Use gen_opc_ptr from context instead of global variable.Evgeny Voevodin2012-11-171-4/+4
| | | | | | Signed-off-by: Evgeny Voevodin <e.voevodin@samsung.com> Reviewed-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* target-unicore32: avoid using cpu_single_envBlue Swirl2012-11-101-4/+4
| | | | | | | | Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Reviewed-by: Andreas Färber <afaerber@suse.de>
* disas: avoid using cpu_single_envBlue Swirl2012-11-101-1/+1
| | | | | | | | | Pass around CPUArchState instead of using global cpu_single_env. Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Acked-by: Richard Henderson <rth@twiddle.net> Acked-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
* cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber2012-10-312-2/+4
| | | | | | | | | | 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 <afaerber@suse.de> [AF: Updated new target-openrisc function accordingly] Acked-by: Richard Henderson <rth@twiddle.net> (for alpha)
* Rename target_phys_addr_t to hwaddrAvi Kivity2012-10-231-1/+1
| | | | | | | | | | | | | | | 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, standards conformant hwaddr. Outstanding patchsets can be fixed up with the command git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* cleanup useless return sentenceAmos Kong2012-10-051-2/+0
| | | | | | | | This patch cleans up return sentences in the end of void functions. Reported-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Amos Kong <akong@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* target-unicore32: Call tcg_gen_debug_insn_startRichard Henderson2012-09-271-0/+4
| | | | | | Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* target-unicore32: switch to AREG0 free modeBlue Swirl2012-09-154-74/+57
| | | | | | | | Add an explicit CPUState parameter instead of relying on AREG0 and switch to AREG0 free mode. Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* unicore32-softmmu: Add a minimal curses screen supportGuan Xuetao2012-08-111-2/+43
| | | | | | | | | | | | | | 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 2. backspace is not handled yet v1->v2: add extra handler for '\r' Signed-off-by: Zhang Mengchi <zhangmengchi@mprc.pku.edu.cn> Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud