sparc: Hook up but not implement the get/set context traps.
authorGabe Black <gabeblack@google.com>
Wed, 18 Mar 2020 06:00:51 +0000 (23:00 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 24 Mar 2020 01:00:22 +0000 (01:00 +0000)
commit059fa7079dab8a2cd3cffb6a0837d5145f5c7b1f
tree6504d6540bfa8e620b0fa7ff5682d3205a3d0ca6
parented5c610611fc57365e6f96f4fa8f9de9f0ad9798
sparc: Hook up but not implement the get/set context traps.

gem5 will panic if it encounters a trap it doesn't know what to do with.
Newer versions of glibc, gcc, etc., use the getcontext trap in setjmp
during startup.

This change hooks up a function for both the getcontext and setcontext
traps. The getcontext one just warns that it isn't implemented. If the
context it creates is never used (likely) then that should be fine for
now. If we ever try to actually use a context with setcontext, then
something bad will almost certainly happen if it's not implemented, and
we panic.

Change-Id: Id6797ac6955249d299e975c9c30360920d380e60
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26825
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/arch/sparc/linux/process.cc
src/arch/sparc/linux/process.hh