• Dietmar Eggemann's avatar
    ARM: hw_breakpoint: Check function for OS Save and Restore mechanism · 57ba8997
    Dietmar Eggemann authored
    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: default avatarDietmar Eggemann <dietmar.eggemann@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    57ba8997
hw_breakpoint.h 3.49 KB