Skip to contentSkip to conversation

hw/arm/boot: Rebuild hflags when modifying CPUState at boot

PATCH Applied Edgar E. Iglesias 5 participants 6 messages Oct 31, 2019 – Nov 1, 2019

lore
Share & tools
lore
#0 lore raw

cover hw/arm/boot: Rebuild hflags when modifying CPUState at boot

I'm seeing asserts with missmatching hflags when doing direct boots on versal. This patch fixes the problem for me, rebuilding hflags after boot code modifes the state.

Cheers,
Edgar

Edgar E. Iglesias (1):
hw/arm/boot: Rebuild hflags when modifying CPUState at boot

 hw/arm/boot.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 1 line
2.19.1
#1 lore raw

PATCH 1/1 hw/arm/boot: Rebuild hflags when modifying CPUState at boot

Rebuild hflags when modifying CPUState at boot.

Fixes e979972a6a
---
 hw/arm/boot.c | 1 +
 1 file changed, 1 insertion(+)
hw/arm/boot.c +1 -0
index c264864c11..ef6724960c 100644
@@ -786,6 +786,7 @@ static void do_cpu_reset(void *opaque)
                 info->secondary_cpu_reset_hook(cpu, info);
             }
         }
+        arm_rebuild_hflags(env);
     }
 }
 
Signature · 1 line
2.19.1
Reviewed-by on v1 1/1
#2 lore raw
Quoted 14 lines · Edgar E. Iglesias

Rebuild hflags when modifying CPUState at boot.

Fixes e979972a6a
---
  hw/arm/boot.c | 1 +
  1 file changed, 1 insertion(+)
hw/arm/boot.c +0 -0
index c264864c11..ef6724960c 100644

hw/arm/boot.c static void do_cpu_reset(void *opaque) · line 792

Quoted 7 lines
hw/arm/boot.c +1 -0
@@ -786,6 +786,7 @@ static void do_cpu_reset(void *opaque)
                  info->secondary_cpu_reset_hook(cpu, info);
              }
          }
+        arm_rebuild_hflags(env);
      }
  }
 
Reviewed-by on v1 1/1
#3 lore raw
In reply to Edgar E. Iglesias
Quoted 13 lines · Edgar E. Iglesias

Rebuild hflags when modifying CPUState at boot.

Fixes e979972a6a
---
 hw/arm/boot.c | 1 +
 1 file changed, 1 insertion(+)
hw/arm/boot.c +0 -0
index c264864c11..ef6724960c 100644

hw/arm/boot.c static void do_cpu_reset(void *opaque) · line 789

Quoted 4 lines
hw/arm/boot.c +1 -0
@@ -786,6 +786,7 @@ static void do_cpu_reset(void *opaque)
                 info->secondary_cpu_reset_hook(cpu, info);
             }
         }
+        arm_rebuild_hflags(env);

Do we just get away with armv7m_reset because there is no futzing about with execution state?

Anyway:

hw/arm/boot.c static void do_cpu_reset(void *opaque) · line 791

Quoted 2 lines
hw/arm/boot.c +0 -0
     }
 }

--
Alex Bennée

Reviewed-by on v1 1/1
#4 lore raw
In reply to Edgar E. Iglesias
Quoted 4 lines · Edgar E. Iglesias

Rebuild hflags when modifying CPUState at boot.

Fixes e979972a6a
Quoted 17 lines
---
 hw/arm/boot.c | 1 +
 1 file changed, 1 insertion(+)
hw/arm/boot.c +1 -0
index c264864c11..ef6724960c 100644
@@ -786,6 +786,7 @@ static void do_cpu_reset(void *opaque)
                 info->secondary_cpu_reset_hook(cpu, info);
             }
         }
+        arm_rebuild_hflags(env);
     }
 }
 
#5 lore raw
In reply to Edgar E. Iglesias
Quoted 5 lines · Edgar E. Iglesias

I'm seeing asserts with missmatching hflags when doing direct boots on versal. This patch fixes the problem for me, rebuilding hflags after boot code modifes the state.

Quoted 9 lines

Cheers,
Edgar

Edgar E. Iglesias (1):
hw/arm/boot: Rebuild hflags when modifying CPUState at boot

 hw/arm/boot.c | 1 +
 1 file changed, 1 insertion(+)

Applied to target-arm.next, thanks.

-- PMM