diff mbox series

[ARM/FDPIC,4/4] linux-user: ARM-FDPIC: Add arm get tls syscall support

Message ID 20180406151752.10854-5-christophe.lyon@st.com
State New
Headers show
Series FDPIC ABI for ARM | expand

Commit Message

Christophe Lyon April 6, 2018, 3:17 p.m. UTC
Co-Authored-By: Mickaël Guêné <mickael.guene@st.com>
Signed-off-by: Christophe Lyon <christophe.lyon@st.com>

Comments

Peter Maydell April 13, 2018, 3:03 p.m. UTC | #1
On 6 April 2018 at 16:17, Christophe Lyon <christophe.lyon@st.com> wrote:
> Co-Authored-By: Mickaël Guêné <mickael.guene@st.com>
> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
>
> diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscall.h
> index 94e2a42..afc0772 100644
> --- a/linux-user/arm/target_syscall.h
> +++ b/linux-user/arm/target_syscall.h
> @@ -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
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 00810d6..1814578 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -720,6 +720,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);

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

This is a bug fix unrelated to FDPIC, I think.

thanks
-- PMM
Christophe Lyon April 16, 2018, 7:49 a.m. UTC | #2
On 13/04/2018 17:03, Peter Maydell wrote:
> On 6 April 2018 at 16:17, Christophe Lyon <christophe.lyon@st.com> wrote:
>> Co-Authored-By: Mickaël Guêné <mickael.guene@st.com>
>> Signed-off-by: Christophe Lyon <christophe.lyon@st.com>
>>
>> diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscall.h
>> index 94e2a42..afc0772 100644
>> --- a/linux-user/arm/target_syscall.h
>> +++ b/linux-user/arm/target_syscall.h
>> @@ -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
>> diff --git a/linux-user/main.c b/linux-user/main.c
>> index 00810d6..1814578 100644
>> --- a/linux-user/main.c
>> +++ b/linux-user/main.c
>> @@ -720,6 +720,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);
> 
> Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
> 
> This is a bug fix unrelated to FDPIC, I think.
> 

Right, I'll resubmit it with an updated commit message.

> thanks
> -- PMM
> .
>
diff mbox series

Patch

diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscall.h
index 94e2a42..afc0772 100644
--- a/linux-user/arm/target_syscall.h
+++ b/linux-user/arm/target_syscall.h
@@ -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
diff --git a/linux-user/main.c b/linux-user/main.c
index 00810d6..1814578 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -720,6 +720,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);