freebsd-dev/sys/powerpc/powernv
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
..
opal_async.c Extract eventfilter declarations to sys/_eventfilter.h 2019-05-20 00:38:23 +00:00
opal_console.c [PowerPC64LE] Fix endianness issues in phyp and opal consoles. 2020-09-23 00:06:48 +00:00
opal_dbg.c [PPC64] Enable opal console use as a GDB DBGPORT 2019-12-09 13:09:32 +00:00
opal_dev.c [PowerPC] Fix setting of time in OPAL 2020-09-10 01:49:53 +00:00
opal_flash.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal_hmi.c [PowerPC] Fix panic when attempting to handle an HMI from an idle thread 2019-12-30 02:56:47 +00:00
opal_i2c.c powerpc/powernv: Add asynchronous token management for powernv 2019-03-01 02:49:47 +00:00
opal_i2cm.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal_nvram.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal_pci.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal_sensor.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
opal.h [PowerPC64] Fix invalid OPAL call in xive_bind(). 2020-08-21 03:23:10 +00:00
opalcall.S [PowerPC64LE] Work around qemu TCG bug in mtmsrd emulation. 2020-09-23 00:09:29 +00:00
platform_powernv.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
powernv_centaur.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
powernv_xscom.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
xive.c [PowerPC64] Fix xive order calculation in qemu TCG 2020-09-08 23:48:49 +00:00