summaryrefslogtreecommitdiff
path: root/target-microblaze/cpu.h
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13cpu: Turn cpu_handle_mmu_fault() into a CPUClass hookAndreas Färber1-2/+1
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: Turn cpu_has_work() into a CPUClass hookAndreas Färber1-5/+0
Default to false. Tidy variable naming and inline cast uses while at it. Tested-by: Jia Liu <proljc@gmail.com> (or32) Signed-off-by: Andreas Färber <afaerber@suse.de>
2014-01-14Microblaze: Convert Microblaze-pic handling to GPIOsAlistair Francis1-0/+4
This patch uses inbound GPIO lines (IRQ and FIR) for interrupts instead of using the old pic_cpu method, which doesn't correspond to real hardware. This creates the CPU's inbound IRQ and FIR GPIO lines and updates the Microblaze boards to use this new method. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Suggested-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reveiwed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Tested-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
2013-10-24microblaze: At swx, check that the reserved word is unmodifiedEdgar E. Iglesias1-0/+1
This improves the reservation check for system emulation, making it possible to catch stores that modify reserved word. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2013-07-23cpu: Introduce CPUClass::synchronize_from_tb() for cpu_pc_from_tb()Andreas Färber1-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>
2013-07-09linux-user: Move cpu_clone_regs() and cpu_set_tls() into linux-userPeter Maydell1-14/+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>
2013-06-28cpu: Turn cpu_unassigned_access() into a CPUState hookAndreas Färber1-2/+3
Use it for all targets, but be careful not to pass invalid CPUState. cpu_single_env can be NULL, e.g. on Xen. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-03-12cpu: Replace do_interrupt() by CPUClass::do_interrupt methodAndreas Färber1-1/+0
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-03-12cpu: Move halted and interrupt_request fields to CPUStateAndreas Färber1-3/+1
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>
2013-02-16target-microblaze: Move TCG initialization to MicroBlazeCPU initfnAndreas Färber1-0/+1
Split off TCG initialization from cpu_mb_init() into mb_tcg_init() to call it from the initfn. Ensures that a QOM-created MicroBlazeCPU is usable. Signed-off-by: Andreas Färber <afaerber@suse.de>
2013-02-01target-microblaze: Mark as unmigratableAndreas Färber1-2/+0
cpu_{save,load} were no-ops, so de facto it is unmigratable and no backwards compatibility to keep. Therefore mark the MicroBlazeCPU as unmigratable at device level the QOM way and suppress "cpu_common" VMState registration by dropping CPU_SAVE_VERSION. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Juan Quintela <quintela@redhat.com>
2013-01-21target-microblaze: Drop unused cpu_mb_close() prototypeAndreas Färber1-1/+0
Such a function never existed. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-12-19fpu: move public header file to include/fpuPaolo Bonzini1-1/+1
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19exec: move include files to include/exec/Paolo Bonzini1-3/+3
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-10-31cpus: Pass CPUState to [qemu_]cpu_has_work()Andreas Färber1-1/+3
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)
2012-10-23Rename target_phys_addr_t to hwaddrAvi Kivity1-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>
2012-10-19microblaze: Support setting of TLS ptrEdgar E. Iglesias1-0/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-04target-microblaze: Let cpu_mb_init() return MicroBlazeCPUAndreas Färber1-2/+10
Since qemu_init_vcpu() is no-op for CONFIG_USER_ONLY drop the env variable that is now unused there. Turn cpu_init macro into a static inline function returning CPUMBState for backwards compatibility. Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-06-04target-microblaze: lwx/swx: first implementationPeter A. G. Crosthwaite1-0/+4
Signed-off-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2012-04-24target-microblaze: QOM'ify CPUAndreas Färber1-0/+2
Embed CPUMBState as first member of QOM MicroBlazeCPU. Let CPUClass::reset() call cpu_state_reset() for now. Signed-off-by: Andreas Färber <afaerber@suse.de> Tested-by: Peter A. G. Crosthwaite <peter.crosthwaite@petalogix.com> [AF: Updated cpu.c to include cpu-qom.h indirectly via cpu.h]
2012-03-14target-lm32/microblaze: Drop second CPU{LM32, MB}State typedefAndreas Färber1-2/+2
Commit 9b9a970a23625de4ae6b7461906a9a0d98d3ca95 (target-lm32/microblaze: Typedef struct CPU{MB,LM32}State) introduced necessary typedefs for cpu_mmu_index() and mmu.h respectively. On some GCC versions this leads to "error: redefinition of typedef". Drop the original typedef to hopefully fix the build. Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14Rename CPUState -> CPUArchStateAndreas Färber1-1/+1
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 All occurrences of CPUArchState are expected to be replaced by QOM CPUState, once all targets are QOM'ified and common fields have been extracted. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-microblaze: Don't overuse CPUStateAndreas Färber1-15/+15
Scripted conversion: sed -i "s/CPUState/CPUMBState/g" target-microblaze/*.[hc] sed -i "s/#define CPUMBState/#define CPUState/" target-microblaze/cpu.h Signed-off-by: Andreas Färber <afaerber@suse.de> Acked-by: Anthony Liguori <aliguori@us.ibm.com>
2012-03-14target-lm32/microblaze: Typedef struct CPU{MB,LM32}StateAndreas Färber1-0/+1
Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
2012-02-28target-microblaze: Clean includesStefan Weil1-0/+3
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>
2012-01-12microblaze: Emulate the hw stackprotectorEdgar E. Iglesias1-0/+3
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-12-02fix spelling in target sub directoryDong Xu Wang1-1/+1
Cc: Richard Henderson <rth@twiddle.net> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Alexander Graf <agraf@suse.de> Cc: Aurelien Jarno <aurelien@aurel32.net> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-25microblaze: Add an MSR_PVR constant and use it.Edgar E. Iglesias1-0/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.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-07-20Fix unassigned memory access handlingBlue Swirl1-2/+2
cea5f9a28faa528b6b1b117c9ab2d8828f473fef exposed bugs in unassigned memory access handling. Fix them by always passing CPUState to the handlers. Reported-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-06-26Move cpu_has_work and cpu_pc_from_tb to cpu.hBlue Swirl1-0/+13
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 <blauwirbel@gmail.com>
2011-05-08irq: Privatize CPU_INTERRUPT_NMI.Richard Henderson1-0/+3
This interrupt name is used by i386, CRIS, and MicroBlaze. Copy the name into each target. Signed-off-by: Richard Henderson <rth@twiddle.net> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-04-12microblaze: Add stream-insn related constantsEdgar E. Iglesias1-0/+9
Based on a patch from: Alejandro Cabrera <aldaya@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-04-11microblaze: Add constant for exception-code maskEdgar E. Iglesias1-0/+1
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-04-11microblaze: Correct MMU_ZONES maskAlejandro Cabrera1-1/+1
Signed-off-by: Alejandro Cabrera <aldaya@gmail.com> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2011-03-11microblaze: Add PVR for writeback cache, endiansMichal Simek1-0/+4
Specify PVR for writeback cache, endians and others. Signed-off-by: Michal Simek <monstr@monstr.eu> Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-09microblaze: Add basic FPU emulationEdgar E. Iglesias1-0/+2
Missing: * fcmp.un insn * Denormalized exceptions * Exception model is not accurate Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-09-09microblaze: Add definitions for FSR reg fieldsEdgar E. Iglesias1-0/+7
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-07-03remove exec-all.h inclusion from cpu.hPaolo Bonzini1-1/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-03move cpu_pc_from_tb to target-*/exec.hPaolo Bonzini1-5/+0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-07microblaze: Make MSR_UM and MSR_VM part of the tb flagsEdgar E. Iglesias1-4/+3
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@petalogix.com>
2010-05-19microblaze: Update elf machine nums.Edgar E. Iglesias1-1/+1
189 was allocated in upstream binutils. 0xbaab was the old temporary value. Still used by some tools and the linux kernel. I've seen 115 in older gdb versions, but lets ignore that one. Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2010-03-12Target specific usermode cleanupPaul Brook1-0/+2
Disable various target specific code that is only relevant to system emulation. Signed-off-by: Paul Brook <paul@codesourcery.com>
2010-03-12Move TARGET_PHYS_ADDR_SPACE_BITS to target-*/cpu.h.Richard Henderson1-0/+3
Removes a set of ifdefs from exec.c. Introduce TARGET_VIRT_ADDR_SPACE_BITS for all targets other than Alpha. This will be used for page_find_alloc, which is supposed to be using virtual addresses in the first place. Signed-off-by: Richard Henderson <rth@twiddle.net>
2009-10-01Revert "Get rid of _t suffix"Anthony Liguori1-1/+1
In the very least, a change like this requires discussion on the list. The naming convention is goofy and it causes a massive merge problem. Something like this _must_ be presented on the list first so people can provide input and cope with it. This reverts commit 99a0949b720a0936da2052cb9a46db04ffc6db29. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-10-01Get rid of _t suffixmalc1-1/+1
Some not so obvious bits, slirp and Xen were left alone for the time being. Signed-off-by: malc <av1474@comtv.ru>
2009-09-03microblaze: Trap on bus accesses to unmapped areas.Edgar E. Iglesias1-0/+3
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-09-03microblaze: Add infrastructure for supporting hw exceptions.Edgar E. Iglesias1-3/+18
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
2009-08-24cleanup cpu-exec.c, part 0/N: consolidate handle_cpu_signalNathan Froyd1-0/+1
handle_cpu_signal is very nearly copy-paste code for each target, with a few minor variations. This patch sets up appropriate defaults for a generic handle_cpu_signal and provides overrides for particular targets that did things differently. Fixing things like the persistent (XXX: use sigsetjmp) should now become somewhat easier. Previous comments on this patch suggest that the "activate soft MMU for this block" comments refer to defunct functionality. I have removed such blocks for the appropriate targets in this patch. Signed-off-by: Nathan Froyd <froydnj@codesourcery.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-07-16Update to a hopefully more future proof FSF addressBlue Swirl1-2/+1
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>