Loosing access to SoC registers with JTAG connected to A7_0 on Linux boot

I was wondering if you may have an idea about this:

While still in U-boot, I can connect with JLink to A7_0 core, and interrogate any SoC registers (ones i want at least), as I would normally expect.
For example, the infamous SRC_M4RCR 0x3039000C.
Or SRC_A7RCR0 0x30390004.

Somewhere immediately after Linux loaded & starts running ( i think as early as starting Kernel trace …), that access is lost, when JLink unable to read them anymore (Even on fresh-reconnect after Linux boots), with silent failures.

The above 2 register examples are still accessible from inside running system with devmem2 for example.
(And there is no domain lock/assignment on them, I see all domains are RW. I just mentioning this, although I don’t see any relevance of domains for access from JTAG ).

Also connecting JLink to the M4 core, allows accessing them. (Ok, for M4RCR, but why A7RCR… ?)

Same with watchdog control registers for WD3, WD1: cannot access either through JTAG connection to A7_0 after Linux booted, but can access them (both) if connected to M4 core.

And there are other bunch of registers like that, which I can access through JTAG connecting to A7_0 with U-boot running only, but lost access to after Linux booted.

What kind of magic may be happening? Where is Linux sources to check for this (and hopefully remove … )?

My related thread:


Is that with the work arounds you mentioned in the that thread enabled? And using ignore_unused_clks?

I guess it could be that when reading register through the CPU interface that the current state of the MMU is applicable… Which, depending on what state the operating system/CPU is in, might prevent any access to those registers.

Yea with all work arounds and parameters on.

I kinda thought connecting with external hardware debugger, nothing running inside would lock me out to access registers… was wrong.

As far as I know, it should be possible to access the bus directly somehow. I am not very familiar with J-Link, maybe the Segger Forum can help.