]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
linux-user: Add ARM get_tls syscall support
authorChristophe Lyon <christophe.lyon@st.com>
Mon, 16 Apr 2018 09:18:25 +0000 (11:18 +0200)
committerLaurent Vivier <laurent@vivier.eu>
Mon, 30 Apr 2018 07:51:31 +0000 (09:51 +0200)
Co-Authored-By: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Message-Id: <20180416091845.7315-1-christophe.lyon@st.com>
[lv: moved the change to linux-user/arm/cpu_loop.c]
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
linux-user/arm/cpu_loop.c
linux-user/arm/target_syscall.h

index d911929bf64b538b63c023356603706bd7a83886..26928fbbb2c3f97b3b28816752a1d98ab3155d49 100644 (file)
@@ -347,6 +347,9 @@ void cpu_loop(CPUARMState *env)
                         case ARM_NR_breakpoint:
                             env->regs[15] -= env->thumb ? 2 : 4;
                             goto excp_debug;
+                        case ARM_NR_get_tls:
+                            env->regs[0] = cpu_get_tls(env);
+                            break;
                         default:
                             gemu_log("qemu: Unsupported ARM syscall: 0x%x\n",
                                      n);
index 94e2a42cb2ed9a28729658a011c6eb153d4bb645..afc0772e1948d6f5af3341142cc09a6eddd3de24 100644 (file)
@@ -16,6 +16,7 @@ struct target_pt_regs {
 #define ARM_NR_breakpoint (ARM_NR_BASE + 1)
 #define ARM_NR_cacheflush (ARM_NR_BASE + 2)
 #define ARM_NR_set_tls   (ARM_NR_BASE + 5)
+#define ARM_NR_get_tls    (ARM_NR_BASE + 6)
 
 #define ARM_NR_semihosting       0x123456
 #define ARM_NR_thumb_semihosting  0xAB