[PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries

Philippe Mathieu-Daudé posted 4 patches 3 months, 1 week ago
[PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries
Posted by Philippe Mathieu-Daudé 3 months, 1 week ago
The Octeon68XX CPU is available since commit 9a6046a655
("target/mips: introduce Cavium Octeon CPU model").

Cc: Pavel Dovgalyuk <Pavel.Dovgalyuk@ispras.ru>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1722
Reported-by: Johnathan Hữu Trí <nhtri2003@gmail.com>
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 linux-user/mips64/target_elf.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/linux-user/mips64/target_elf.h b/linux-user/mips64/target_elf.h
index ec55d8542a..ce6fb6541e 100644
--- a/linux-user/mips64/target_elf.h
+++ b/linux-user/mips64/target_elf.h
@@ -9,6 +9,14 @@
 #define MIPS64_TARGET_ELF_H
 static inline const char *cpu_get_model(uint32_t eflags)
 {
+    switch (eflags & EF_MIPS_MACH) {
+    case EF_MIPS_MACH_OCTEON:
+    case EF_MIPS_MACH_OCTEON2:
+    case EF_MIPS_MACH_OCTEON3:
+        return "Octeon68XX";
+    default:
+        break;
+    }
     if ((eflags & EF_MIPS_ARCH) == EF_MIPS_ARCH_64R6) {
         return "I6400";
     }
-- 
2.45.2


Re: [PATCH-for-9.1 2/4] linux-user/mips: Select Octeon68XX CPU for Octeon binaries
Posted by Richard Henderson 3 months, 1 week ago
On 8/14/24 23:39, Philippe Mathieu-Daudé wrote:
> The Octeon68XX CPU is available since commit 9a6046a655
> ("target/mips: introduce Cavium Octeon CPU model").
> 
> Cc: Pavel Dovgalyuk<Pavel.Dovgalyuk@ispras.ru>
> Resolves:https://gitlab.com/qemu-project/qemu/-/issues/1722
> Reported-by: Johnathan Hữu Trí<nhtri2003@gmail.com>
> Suggested-by: Richard Henderson<richard.henderson@linaro.org>
> Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org>
> ---
>   linux-user/mips64/target_elf.h | 8 ++++++++
>   1 file changed, 8 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~