Make TCB address available to userspace via the UserLocal register.
authorvisa <visa@openbsd.org>
Thu, 20 Apr 2017 15:42:26 +0000 (15:42 +0000)
committervisa <visa@openbsd.org>
Thu, 20 Apr 2017 15:42:26 +0000 (15:42 +0000)
commit2fef4a9239f881729bf148d7a57caa1ebe22d91f
tree58f7822e21371a18a67369b47eddd20b81a09596
parentf8e00d7d74088cac7dac24c49b8d6e2c80f8db96
Make TCB address available to userspace via the UserLocal register.
This lets programs get the address without a system call on OCTEON II
and later.

Add UserLocal load emulation for systems that do not implement
the RDHWR instruction or the UserLocal register.

OK guenther@
sys/arch/mips64/include/cpu.h
sys/arch/mips64/include/mips_cpu.h
sys/arch/mips64/include/mips_opcode.h
sys/arch/mips64/include/tcb.h
sys/arch/mips64/mips64/context.S
sys/arch/mips64/mips64/cpu.c
sys/arch/mips64/mips64/genassym.cf
sys/arch/mips64/mips64/trap.c
sys/arch/octeon/octeon/machdep.c