]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ARM: hw_breakpoint: Check function for OS Save and Restore mechanism
authorDietmar Eggemann <dietmar.eggemann@arm.com>
Sun, 14 Oct 2012 20:08:14 +0000 (21:08 +0100)
committerWill Deacon <will.deacon@arm.com>
Thu, 10 Jan 2013 21:13:06 +0000 (21:13 +0000)
commit57ba899731156ab01cdb7dae8d1fe6430ef4957c
tree588fe8e2ddd6c7705666ea62a91d0d70dd4af40a
parent02051ead976d854df1de726841c4a646826ec860
ARM: hw_breakpoint: Check function for OS Save and Restore mechanism

v7 debug introduced OS Save and Restore mechanism. On a v7 debug SinglePower
system, i.e a system without a separate core and debug power domain, which does
not support external debug over powerdown, it is implementation defined whether
OS Save and Restore is implemented.
v7.1 debug requires OS Save and Restore mechanism. v6 debug and v6.1 debug do
not implement it.

A new global variable bool has_ossr is introduced and is determined in
arch_hw_breakpoint_init() like debug_arch or the number of BRPs/WRPs.

The logic how to check if OS Save and Restore is supported has changed with
this patch. In reset_ctrl_regs() a mask consisting of OSLM[1] (OSLSR.3) and
OSLM[0] (OSLSR.0) was used to check if the system supports OS Save and
Restore. In the new function core_has_os_save_restore() only OSLM[0] is used.
It is not necessary to check OSLM[1] too since it is v7.1 debug specific and
v7.1 debug requires OS Save and Restore and thus OS Lock.

Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm/include/asm/hw_breakpoint.h
arch/arm/kernel/hw_breakpoint.c