summaryrefslogtreecommitdiff
path: root/target-unicore32/helper.c
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13cputlb: Change tlb_flush() argument to CPUStateAndreas Färber1-1/+3
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13exec: Change cpu_abort() argument to CPUStateAndreas Färber1-9/+5
Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13cpu: Turn cpu_handle_mmu_fault() into a CPUClass hookAndreas Färber1-1/+4
Note that while such functions may exist both for *-user and softmmu, only *-user uses the CPUState hook, while softmmu reuses the prototype for calling it directly. Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-03-13cpu: Factor out cpu_generic_init()Andreas Färber1-10/+3
All targets using it gain the ability to set -cpu name,key=value,... options via the default TYPE_CPU CPUClass::parse_features() implementation. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-10-07cpu: Drop cpu_model_str from CPU_COMMONAndreas Färber1-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>
2013-03-12cpu: Replace do_interrupt() by CPUClass::do_interrupt methodAndreas Färber1-1/+4
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-16target-unicore32: Move TCG initialization to UniCore32CPU initfnAndreas Färber1-6/+0
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>
2013-02-16target-unicore32: Introduce QOM realizefn for UniCore32CPUAndreas Färber1-1/+2
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>
2013-02-01target-unicore32: Rename CPU subtypesAndreas Färber1-0/+1
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>
2013-01-27target-unicore32: Detect attempt to instantiate non-CPU type in cpu_init()Andreas Färber1-2/+4
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>
2012-12-23configure: allow disabling pixman if not neededRobert Schiele1-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>
2012-12-19misc: move include files to include/qemu/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19ui: move files to ui/ and include/ui/Paolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-08-11unicore32-softmmu: Add a minimal curses screen supportGuan Xuetao1-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>
2012-08-11unicore32: Split UniCore-F64 instruction helpers from helper.cGuan Xuetao1-330/+0
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 <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-11unicore32-softmmu: Add coprocessor 0(sysctrl) and 1(ocd) instruction supportGuan Xuetao1-37/+148
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, so we could output chars to this console without graphic card. TODO: curses display should be added lator for screen output. Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-08-11unicore32-softmmu: Add unicore32-softmmu build supportGuan Xuetao1-13/+14
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 be build successfully. By 20120804: change QEMU_ARCH_UNICORE32 to 0x4000 Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-03-30target-unicore32: Move CPU-dependent init into initfnAndreas Färber1-23/+0
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>
2012-03-30target-unicore32: QOM'ify CPUAndreas Färber1-36/+7
Embed CPUUniCore32State as first member of UniCore32CPU. Contributed under GPLv2+. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-03-30target-unicore32: License future contributions under GPLv2+Andreas Färber1-0/+3
This is to limit relicensing obstacles to the pending IBM investigation. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Guan Xuetao <gxt@mprc.pku.edu.cn>
2012-03-14target-unicore32: Don't overuse CPUStateAndreas Färber1-31/+31
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> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-28target-unicore32: Clean includesStefan Weil1-4/+0
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>
2011-08-20Use glib memory allocation and free functionsAnthony Liguori1-1/+1
qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-07Remove unused is_softmmu parameter from cpu_handle_mmu_faultBlue Swirl1-1/+1
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 <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-26Remove exec-all.h include directivesBlue Swirl1-1/+0
Most exec-all.h include directives are now useless, remove them. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-04-12unicore32: add target-unicore32 directory for unicore32-linux-user supportGuan Xuetao1-0/+487
Signed-off-by: Guan Xuetao <gxt@mprc.pku.edu.cn> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>