qemu-patch-raspberry4/target-ppc
Anton Blanchard 6bb9a0a9ef target-ppc: Fix SRR0 when taking unaligned exceptions
We are setting SRR0 to the instruction before the one causing the
unaligned exception. A quick testcase:

. = 0x100
.globl _start
_start:
	/* Cause a 0x600 */
	li	3,0x1
	stwcx.	3,0,3
1:	b	1b

. = 0x600
1:	b	1b

Built into something we can load as a BIOS image:

gcc -mbig -c test.S
ld -EB -Ttext 0x0 -o test test.o
objcopy -O binary test test.bin

Run with:

qemu-system-ppc64 -nographic -bios test.bin

Shows an incorrect SRR0 (points at the li):

SRR0 0000000000000100

With the patch we get the correct SRR0:

SRR0 0000000000000104

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
2015-09-20 22:48:39 +02:00
..
arch_dump.c target-ppc: Set the correct endianness in ELF dump header 2014-06-16 13:24:36 +02:00
cpu-models.c target-ppc: Remove POWER5+ v0.0 that never existed 2015-03-25 22:49:46 +01:00
cpu-models.h target-ppc: Remove POWER5+ v0.0 that never existed 2015-03-25 22:49:46 +01:00
cpu-qom.h target-ppc: Use cpu_exec_interrupt qom hook 2014-09-25 18:54:22 +01:00
cpu.h tlb: Add "ifetch" argument to cpu_mmu_index() 2015-09-11 08:15:28 -07:00
dfp_helper.c target-ppc: Fix compiler warning 2014-06-24 20:01:24 +04:00
excp_helper.c target-ppc: Fix SRR0 when taking unaligned exceptions 2015-09-20 22:48:39 +02:00
fpu_helper.c target-ppc: Eliminate set_fprf Argument From helper_compute_fprf 2015-01-07 16:16:25 +01:00
gdbstub.c target-ppc: Fix gdbstub for ppc64le-linux-user 2014-07-08 12:10:36 +02:00
helper.h target-ppc: Introduce tbegin 2015-01-07 16:16:27 +01:00
helper_regs.h PPC: Only enter MSR_POW when no interrupts pending 2014-04-08 11:20:05 +02:00
int_helper.c crypto: move built-in AES implementation into crypto/ 2015-07-07 12:04:13 +02:00
kvm-stub.c kvm/openpic: in-kernel mpic support 2013-07-01 01:11:14 +02:00
kvm.c target-ppc: fix hugepage support when using memory-backend-file 2015-07-07 17:44:49 +02:00
kvm_ppc.h kvm_ppc: remove kvmppc_timer_hack 2015-09-20 22:48:38 +02:00
machine.c migration: Use normal VMStateDescriptions for Subsections 2015-06-12 06:53:57 +02:00
Makefile.objs kvm_ppc: remove kvmppc_timer_hack 2015-09-20 22:48:38 +02:00
mem_helper.c target-ppc: Introduce tbegin 2015-01-07 16:16:27 +01:00
mfrom_table.c find -type f | xargs sed -i 's/[\t ]$//g' # on most files 2007-09-16 21:08:06 +00:00
mfrom_table_gen.c fix spelling in target sub directory 2011-12-02 10:50:57 +00:00
misc_helper.c target-ppc: move sdr1 value change detection logic to helper_store_sdr1() 2015-03-09 15:00:05 +01:00
mmu-hash32.c qemu-log: add log category for MMU info 2014-12-16 18:43:19 +00:00
mmu-hash32.h target-ppc: Use PowerPCCPU in PowerPCCPUClass::handle_mmu_fault hook 2014-03-13 19:20:48 +01:00
mmu-hash64.c target-ppc: Fix warnings from Sparse 2015-03-09 15:00:08 +01:00
mmu-hash64.h target-ppc: Use right page size with hash table lookup 2015-03-09 14:59:53 +01:00
mmu_helper.c target-ppc: move sdr1 value change detection logic to helper_store_sdr1() 2015-03-09 15:00:05 +01:00
monitor.c monitor: remove target-specific code from monitor.c 2015-09-16 17:33:32 +02:00
STATUS target-ppc: remove powerpc 970gx 2014-03-05 03:06:23 +01:00
timebase_helper.c tcg: Invert the inclusion of helper.h 2014-05-28 09:33:54 -07:00
translate.c disas: Remove uses of CPU env 2015-06-22 17:40:01 +02:00
translate_init.c Target-ppc: Remove unnecessary variable 2015-09-11 10:21:38 +03:00
user_only_helper.c cpu: Move exception_index field from CPU_COMMON to CPUState 2014-03-13 19:20:46 +01:00