freebsd-dev/sys/powerpc
Justin Hibbits 7cd4e55c43 Handle the Facility Unavailable exception as a SIGILL
Currently Facility Unavailable is absent and once an application
tries to use or access a register from a feature disabled in the
CPU it causes a kernel panic.

A simple test-case is:

int main() { asm volatile ("tbegin.;"); }

which will use TM (Hardware Transactional Memory) feature which
is not supported by the kernel and so will trigger the following
kernel panic:

----

fatal user trap:

    exception       = 0xf60 (unknown)
    srr0            = 0x10000890
    srr1            = 0x800000000000f032
    lr              = 0x100004e4
    curthread       = 0x5f93000
    pid = 1021, comm = htm

panic: unknown trap
cpuid = 40
KDB: stack backtrace:
Uptime: 3m18s
Dumping 10 MB (3 chunks)
    chunk 0: 11MB (2648 pages) ... ok
    chunk 1: 1MB (24 pages) ... ok
    chunk 2: 1MB (2 pages)panic: IOMMU mapping error: -4

cpuid = 40
Uptime: 3m18s

----

Since Hardware Transactional Memory is not yet supported by FreeBSD, treat
this as an illegal instruction.

PR:		224350
Submitted by:	Gustavo Romero <gromero_AT_ibm_DOT_com>
MFC after:	2 weeks
2017-12-15 04:11:20 +00:00
..
aim sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
booke Retrieve the page outside of holding locks 2017-12-10 04:43:27 +00:00
conf It's time to retire AHC_REG_PRETTY_PRINT and AHD_REG_PRETTY_PRINT from 2017-11-29 23:41:49 +00:00
cpufreq sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
fpu sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
include Handle the Facility Unavailable exception as a SIGILL 2017-12-15 04:11:20 +00:00
mambo sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
mikrotik - Allow different slicers for different flash types to be registered 2017-02-22 10:21:39 +00:00
mpc85xx Override memattr for mmap on the Freescale DIU driver 2017-12-02 01:42:07 +00:00
ofw Back out OF module installation in the event of failure. PS3 firmware gives 2017-11-28 06:31:39 +00:00
powermac sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
powerpc Handle the Facility Unavailable exception as a SIGILL 2017-12-15 04:11:20 +00:00
ps3 sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
pseries sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00
psim sys/powerpc: further adoption of SPDX licensing ID tags. 2017-11-27 15:09:59 +00:00