qemu-e2k/linux-user/arm
Mikhail Ilyin b8d43285a4 linux-user: Access correct register for get/set_tls syscalls on ARM TZ CPUs
When support was added for TrustZone to ARM CPU emulation, we failed
to correctly update the support for the linux-user implementation of
the get/set_tls syscalls. This meant that accesses to the TPIDRURO
register via the syscalls were always using the non-secure copy of
the register even if native MRC/MCR accesses were using the secure
register. This inconsistency caused most binaries to segfault on startup
if the CPU type was explicitly set to one of the TZ-enabled ones like
cortex-a15. (The default "any" CPU doesn't have TZ enabled and so is
not affected.)

Use access_secure_reg() to determine whether we should be using
the secure or the nonsecure copy of TPIDRURO when emulating these
syscalls.

Signed-off-by: Mikhail Ilyin <m.ilin@samsung.com>
Message-id: 1426505198-2411-1-git-send-email-m.ilin@samsung.com
[PMM: rewrote commit message to more clearly explain the issue
 and its consequences.]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-03-16 12:30:47 +00:00
..
nwfpe linux-user/arm/nwfpe: Delete unused aCC array 2015-01-27 22:33:57 +02:00
syscall_nr.h linux-user: Enable epoll_pwait syscall for ARM 2014-10-06 21:52:45 +03:00
syscall.h linux-user: Support target-to-host translation of mlockall argument 2014-08-22 15:06:35 +03:00
target_cpu.h linux-user: Access correct register for get/set_tls syscalls on ARM TZ CPUs 2015-03-16 12:30:47 +00:00
target_signal.h
target_structs.h
termbits.h