diff mbox series

[02/35] target/mips: Fix microMIPS on reset

Message ID 20180620120620.12806-3-yongbok.kim@mips.com
State New
Headers show
Series nanoMIPS | expand

Commit Message

Yongbok Kim June 20, 2018, 12:05 p.m. UTC
From: Yongbok Kim <yongbok.kim@imgtec.com>

Fix to activate microMIPS (and nanoMIPS) on reset when Config3.ISA == {1, 3}

Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>
---
 target/mips/translate.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Aleksandar Markovic June 22, 2018, 1:45 p.m. UTC | #1
> From: Yongbok Kim <yongbok.kim@imgtec.com>
>
> Fix to activate microMIPS (and nanoMIPS) on reset when Config3.ISA == {1, 3}
>
> Signed-off-by: Yongbok Kim <yongbok.kim@mips.com>

Reviewed-by: Aleksandar Markovic <aleksandar.markovic@mips.com>

> ---
>  target/mips/translate.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/target/mips/translate.c b/target/mips/translate.c
> index e57d71e..bfbc300 100644
> --- a/target/mips/translate.c
> +++ b/target/mips/translate.c
> @@ -20713,6 +20713,11 @@ void cpu_state_reset(CPUMIPSState *env)
>          env->CP0_Status |= (1 << CP0St_FR);
>      }
>
> +    if (env->CP0_Config3 & (1 << CP0C3_ISA)) {
> +        /*  microMIPS/nanoMIPS on reset when Config3.ISA == {1, 3} */
> +        env->hflags |= MIPS_HFLAG_M16;
> +    }
> +
>      /* MSA */
>      if (env->CP0_Config3 & (1 << CP0C3_MSAP)) {
>          msa_reset(env);
> --
> 1.9.1
diff mbox series

Patch

diff --git a/target/mips/translate.c b/target/mips/translate.c
index e57d71e..bfbc300 100644
--- a/target/mips/translate.c
+++ b/target/mips/translate.c
@@ -20713,6 +20713,11 @@  void cpu_state_reset(CPUMIPSState *env)
         env->CP0_Status |= (1 << CP0St_FR);
     }
 
+    if (env->CP0_Config3 & (1 << CP0C3_ISA)) {
+        /*  microMIPS/nanoMIPS on reset when Config3.ISA == {1, 3} */
+        env->hflags |= MIPS_HFLAG_M16;
+    }
+
     /* MSA */
     if (env->CP0_Config3 & (1 << CP0C3_MSAP)) {
         msa_reset(env);