Skip to contentSkip to conversation

ARM: hw_breakpoint: clear DBGVCR out of reset

PATCH New Will Deacon 3 participants 4 messages Apr 1, 2011 – Apr 4, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: hw_breakpoint: clear DBGVCR out of reset

The DBGVCR, used for configuring vector catch debug events, is UNKNOWN out of reset on ARMv7. When enabling monitor mode, this must be zeroed to avoid UNPREDICTABLE behaviour.

This patch adds the zeroing code to the debug reset path.

---
 arch/arm/kernel/hw_breakpoint.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
arch/arm/kernel/hw_breakpoint.c +7 -0
index 8dbc126..87acc25 100644
@@ -868,6 +868,13 @@ static void reset_ctrl_regs(void *info)
 		 */
 		asm volatile("mcr p14, 0, %0, c1, c0, 4" : : "r" (0));
 		isb();
+
+		/*
+		 * Clear any configured vector-catch events before
+		 * enabling monitor mode.
+		 */
+		asm volatile("mcr p14, 0, %0, c0, c7, 0" : : "r" (0));
+		isb();
 	}
 
 	if (enable_monitor_mode())
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ARM: hw_breakpoint: clear DBGVCR out of reset

Quoted 8 lines · Will Deacon

The DBGVCR, used for configuring vector catch debug events, is UNKNOWN out of reset on ARMv7. When enabling monitor mode, this must be zeroed to avoid UNPREDICTABLE behaviour.

This patch adds the zeroing code to the debug reset path.

Please Cc stable as this fix should go to the 37 and 38 stable trees.

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.
#2 lore raw

PATCH 1/1 ARM: hw_breakpoint: clear DBGVCR out of reset

Hi Stephen,

Quoted 11 lines · Stephen Boyd
Quoted 8 lines · Will Deacon

The DBGVCR, used for configuring vector catch debug events, is UNKNOWN out of reset on ARMv7. When enabling monitor mode, this must be zeroed to avoid UNPREDICTABLE behaviour.

This patch adds the zeroing code to the debug reset path.

Please Cc stable as this fix should go to the 37 and 38 stable trees.

Will do. If you could please confirm that it fixes the problems reported initially then that would be great.

Thanks,

Will

#3 lore raw

PATCH 1/1 ARM: hw_breakpoint: clear DBGVCR out of reset

Quoted 12 lines · Will Deacon

Hi Stephen,

Quoted 9 lines · Stephen Boyd
Quoted 8 lines · Will Deacon

The DBGVCR, used for configuring vector catch debug events, is UNKNOWN out of reset on ARMv7. When enabling monitor mode, this must be zeroed to avoid UNPREDICTABLE behaviour.

This patch adds the zeroing code to the debug reset path.

Quoted 8 lines
Quoted 1 line

Please Cc stable as this fix should go to the 37 and 38 stable trees.

Will do. If you could please confirm that it fixes the problems reported initially then that would be great.

Thanks,

Will

I confirm that this fixes the problem I was seeing.

Thanks
Steve

Signature · 2 lines
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.