Based-on: [email protected] ("linux-user: Clean up siginfo_t handling for arm, aarch64") ... for force_sig_fault().
Emulation of EXCP_TRAP was really wrong, in that we were using the contents of R1 when we really wanted the trap immediate. Emulation of the kuser page was wrong, in that the first word contains the version, and must be readable. The easiest way to fix this is to map real data, but then we have to come up with some replacement for __kuser_cmpxchg, and the easiest way to do that is to steal an unused trap number. Both of these stand in the way of cleaning up SIGSEGV, which is how the kuser page is currently implemented. I built a nios2-elf binutils and wrote a couple of asm smoke tests for this. So, golden! r~ Richard Henderson (2): linux-user/nios2: Properly emulate EXCP_TRAP linux-user/nios2: Map a real kuser page target/nios2/cpu.h | 5 ++- linux-user/elfload.c | 35 +++++++++++++++ linux-user/nios2/cpu_loop.c | 85 ++++++++++++++++++++----------------- target/nios2/translate.c | 26 +++++++----- 4 files changed, 99 insertions(+), 52 deletions(-) -- 2.25.1
