target-unicore32: Rename CPU subtypes
In the initial conversion of CPU models to QOM types, model names weremapped 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...
target-unicore32: Mark as unmigratable
CPU_SAVE_VERSION 2 was bogus as both save and load would just throw ahw_error(). Therefore we can without problems suppress registration of"cpu_common" VMState by dropping CPU_SAVE_VERSION define and provide anunmigratable "cpu" VMStateDescription for UniCore32CPU at device level...
target-unicore32: Catch attempt to instantiate abstract type in cpu_init()
Fixes -cpu unicore32-cpu asserting.
Cc: qemu-stable@nongnu.orgSigned-off-by: Andreas Färber <afaerber@suse.de>
target-unicore32: Use type_register() instead of type_register_static()
According to its documentation, type_register_static()'s TypeInfoargument should exist for the life type of the type.Therefore use type_register() when registering the list of CPU subtypes....
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 isactually (a sub-type of) TYPE_UNICORE32_CPU....
configure: allow disabling pixman if not needed
When we build neither any system emulation targets nor the tools thereis actually no need for pixman library. In that case do not enforcepresence of that library on the system.
Reviewed-by: Andreas F=E4rber <afaerber@suse.de>...
fpu: move public header file to include/fpu
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
misc: move include files to include/qemu/
qom: move include files to include/qom/
exec: move include files to include/exec/
ui: move files to ui/ and include/ui/
build: kill libdis, move disassemblers to disas/
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 <blauwirbel@gmail.com>
TCG: Use gen_opc_instr_start from context instead of global variable.
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.
TCG: Use gen_opc_icount from context instead of global variable.
TCG: Use gen_opc_buf from context instead of global variable.
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.
disas: avoid using cpu_single_env
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>
target-unicore32: avoid using 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>
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 <afaerber@suse.de>[AF: Updated new target-openrisc function accordingly]...
Rename target_phys_addr_t to hwaddr
target_phys_addr_t is unwieldly, violates the C standard (_t suffixes arereserved) and its purpose doesn't match the name (most target_phys_addr_taddresses are not target specific). Replace it with a finger-friendly,...
cleanup useless return sentence
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_start
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 mode
Add an explicit CPUState parameter instead of relying on AREG0and switch to AREG0 free mode.
Tested-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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 <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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...
unicore32: Split UniCore-F64 instruction helpers from helper.c
This patch just splits ucf64 instruction simulation helpers fromhelper.c.Also, two checkpatch warnings are solved.
v1->v2: adjust copyright information for new ucf64_helper.c
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn>...
unicore32: Disintegrate cpu_dump_state_ucf64 function
This patch disintegrates cpu_dump_state_ucf64 function from cpu_dump_state.
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.
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 memoryregion.
target-unicore32: Drop UC32_CPUID macros
Any code that depends on a particular CPU type can now go throughcallbacks on the QOM UniCore32CPUClass.
Signed-off-by: Andreas Färber <afaerber@suse.deAcked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
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,...
unicore32-softmmu: Make UniCore32 cpuid & exceptions correct and runable
This patch initializes the cpuid to exactly correct value becauselinux kernel will check it.In addition, the exception types are specified in proper situations.Then it could make exceptions generated correctly and timely....
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...
build: move other target-*/ objects to nested Makefile.objs
build: move libobj-y variable to nested Makefile.objs
build: move obj-TARGET-y variables to nested Makefile.objs
Also drop duplicate occurrence of device-hotplug.o.
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 <afaerber@suse.de>Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
target-unicore32: Relicense to GPLv2+
Adopt the license text suggested by Guan Xue-tao (with a minorsimplification) 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...
target-unicore32: License future contributions under GPLv2+
This is to limit relicensing obstacles to the pending IBM investigation.
target-unicore32: QOM'ify CPU
Embed CPUUniCore32State as first member of UniCore32CPU.
Contributed under GPLv2+.
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...
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 <afaerber@suse.de>...
target-unicore32: Rename to CPUUniCore32State
This aids in refactoring CPUState by adopting the common naming scheme.
Signed-off-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
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 <sw@weilnetz.de>
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 <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 bytype casts of pointer to tcg_target_long.
These changes are needed for build environments where...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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 themand adjust callers.
Acked-by: Richard Henderson <rth@twiddle.net>...
exec.h cleanup
Move softmmu_exec.h include directives from target-*/exec.h totarget-*/op_helper.c. Move also various other stuff only used inop_helper.c there.
Define global env in dyngen-exec.h.
For i386, move wrappers for segment and FPU helpers from user-exec.c...
Remove exec-all.h include directives
Most exec-all.h include directives are now useless, remove them.
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 isneeded by later patches.
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() andqemu_cpu_has_work() to bool.
cpu_loop_exit: avoid using AREG0
Make cpu_loop_exit() take a parameter for CPUState instead of relyingon global env.
Remove unused function parameters from gen_pc_load and rename the function
Function gen_pc_load was introduced in commitd2856f1ad4c259e5766847c49acbb4e390731bd4.The only reason for parameter searched_pc wasa debug statement in target-i386/translate.c....
unicore32: add target-unicore32 directory for unicore32-linux-user support