This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM6442: Stop system counter upon debug entry

Part Number: AM6442

Hi Team,

While debugging Linux processes by means of a stop-and-go debugger (Lauterbach), I face the following messages after resuming from a breakpoint:

[  556.787556] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:

I very much presume, that this is due to the fact, that the system counter is not stopped after hitting a breakpoint. At least, I see that the system timer register CNTPCT_EL0 does not stop counting when a breakpoint is hit. Could you please tell me how make the system counter stop upon debug entry ? 

  • Hi,

    I've talked to our debug/Lauterbach expert, and here's his feedback:

    The debug state of any core can be hooked to a suspend signal which peripherals can be associated with.  That peripheral may also need to enable some IP local registers to accept the freeze signal. CNTPCT_EL0 is driven by the GTC so the below is what they need to do for Lauterbach or CCS.  Its not automatic.

    Enable GTC for debug timestamps, 0x3=freeze in debug halt (see GTC_CNTCR Register Field Descriptions in TRM)
    Data.Set EZAXI:0x00A90000 %LE %Long 0x3

    GTC feeds multiple clocks, eg: A53-arch-timer and is in slot 0: (0+1) x 4 = 4 = 0x4
            @APB:0x9D300004       - debug address plane
            @AXI:0x7: 0x9D300004       - 64bit-system address

    T32 commands to stop timer if "A53-0" is halted
            Data.Set EAPB: 0x9D300004       %LE %Long (0x10000|1.)
            Data.Set EAXI:0x7: 0x9D300004  %LE %Long (0x10000|1.)

    Regards, Andreas

  • Hi Andreas

    Thanks a lot for your info. This seems to work. The command to stop the timer if "A53-1" is halted would then be

    Data.Set EAPB: 0x9D300008       %LE %Long (0x10000|1.)

    Is this correct ?

  • Hi Walter,

    glad to hear it's working for you. Yes 0x9D300008 should do the same for A53-1. Because the CPU suspend input mapping for this core is 2, so (0+2) x 4 = 8 = 0x8.

    Regards, Andreas