freebsd-dev/sys/powerpc
Brandon Bergren 4efb1ca7d2 [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation.
The TCG implementation of mtmsrd in qemu blindly copies the entire register
to the MSR, instead of the specific bit positions listed in the ISA.

This means that qemu will prematurely switch endian out from under the
running code instead of waiting for the rfid, causing an immediate trap
as it attempts to interpret the next instruction in the wrong endianness.

To work around this, ensure PSL_LE is still set before doing the mtmsrd.

In the future, we may wish to just turn off translation and unconditionally
use rfid to switch to the ofmsr instead of quasi-switching to the ofmsr.

Add a new platform option so this can be disabled. (And so that we can
conditonalize additional QEMU-specific hacks in the platform code.)

Sponsored by:	Tag1 Consulting, Inc.
2020-09-23 00:09:29 +00:00
..
aim [PowerPC64LE] LE bringup work: locore / machdep / platform 2020-09-22 23:55:34 +00:00
amigaone powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
booke powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
conf [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. 2020-09-23 00:09:29 +00:00
cpufreq powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
fpu powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
include [PowerPC64LE] Set up powerpc.powerpc64le architecture 2020-09-22 23:49:30 +00:00
mambo powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mikrotik powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
mpc85xx powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
ofw [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. 2020-09-23 00:09:29 +00:00
powermac powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
powernv [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. 2020-09-23 00:09:29 +00:00
powerpc Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
ps3 powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
pseries [PowerPC64LE] Fix endianness issues in phyp and opal consoles. 2020-09-23 00:06:48 +00:00
psim powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00