[Qemu-devel] [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900

Fredrik Noring posted 2 patches 7 years, 3 months ago
Maintainers: Laurent Vivier <laurent@vivier.eu>, Aurelien Jarno <aurelien@aurel32.net>, "Philippe Mathieu-Daudé" <f4bug@amsat.org>, Aleksandar Rikalo <aleksandar.rikalo@syrmia.com>, Jiaxun Yang <jiaxun.yang@flygoat.com>
[Qemu-devel] [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900
Posted by Fredrik Noring 7 years, 3 months ago
Recognise the R5900, which reports itself as MIPS III, as a 64-bit CPU
supporting the n32 ABI.

Signed-off-by: Fredrik Noring <noring@nocrew.org>
---
 linux-user/mips64/target_elf.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index ec55d8542a..5f2f2df29f 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -12,6 +12,9 @@ static inline const char *cpu_get_model(uint32_t eflags)
     if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
         return "I6400";
     }
+    if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
+        return "R5900";
+    }
     return "5KEf";
 }
 #endif
-- 
2.18.1


Re: [Qemu-devel] [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900
Posted by Laurent Vivier 7 years, 3 months ago
On 08/11/2018 19:43, Fredrik Noring wrote:
> Recognise the R5900, which reports itself as MIPS III, as a 64-bit CPU
> supporting the n32 ABI.
> 
> Signed-off-by: Fredrik Noring <noring@nocrew.org>
> ---
>  linux-user/mips64/target_elf.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
> index ec55d8542a..5f2f2df29f 100644
> --- a/linux-user/mips64/target_elf.h
> +++ b/linux-user/mips64/target_elf.h
> @@ -12,6 +12,9 @@ static inline const char *cpu_get_model(uint32_t eflags)
>      if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
>          return "I6400";
>      }
> +    if ((eflags & EF_MIPS_MACH) == EF_MIPS_MACH_5900) {
> +        return "R5900";
> +    }
>      return "5KEf";
>  }
>  #endif
> 

Reviewed-by: Laurent Vivier <laurent@vivier.eu>


Re: [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900
Posted by Philippe Mathieu-Daudé 4 years, 11 months ago
On Thu, Nov 8, 2018 at 7:45 PM Fredrik Noring <noring@nocrew.org> wrote:
>
> Recognise the R5900, which reports itself as MIPS III, as a 64-bit CPU
> supporting the n32 ABI.
>
> Signed-off-by: Fredrik Noring <noring@nocrew.org>
> ---
>  linux-user/mips64/target_elf.h | 3 +++
>  1 file changed, 3 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Re: [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900
Posted by Bin Meng 4 years, 11 months ago
On Sun, Feb 14, 2021 at 11:17 PM Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>
> On Thu, Nov 8, 2018 at 7:45 PM Fredrik Noring <noring@nocrew.org> wrote:

Oops, an old patch from 2018 and was never applied?

> >
> > Recognise the R5900, which reports itself as MIPS III, as a 64-bit CPU
> > supporting the n32 ABI.
> >
> > Signed-off-by: Fredrik Noring <noring@nocrew.org>
> > ---
> >  linux-user/mips64/target_elf.h | 3 +++
> >  1 file changed, 3 insertions(+)
>
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Regards,
Bin

Re: [PATCH 1/2] linux-user/mips: Support the n32 ABI for the R5900
Posted by Laurent Vivier 4 years, 11 months ago
Le 14/02/2021 à 16:17, Philippe Mathieu-Daudé a écrit :
> On Thu, Nov 8, 2018 at 7:45 PM Fredrik Noring <noring@nocrew.org> wrote:
>>
>> Recognise the R5900, which reports itself as MIPS III, as a 64-bit CPU
>> supporting the n32 ABI.
>>
>> Signed-off-by: Fredrik Noring <noring@nocrew.org>
>> ---
>>  linux-user/mips64/target_elf.h | 3 +++
>>  1 file changed, 3 insertions(+)
> 
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 

Applied to my linux-user-for-6.0 branch.

Thanks,
Laurent