I am facing an issue that maybe someone of you has already encountered a possible fixed.
Let me start by saying that this is a software issue basically, but it is related to FPGA developing since I am facing this on a Xilinx MPSOC platform where the arm processor is interfaced with PL logic via AXI4 buses and the register bank has been generated with AirHDL tool.
The problem I am facing is the following:
If I access a non-hit address in the AXI4-LIte address space (let’s say a non-implemented register) using devmem command, I get an error, but the exception/error is anyway managed.
If I perform the same non-existing register access from Linux, Linux itself crashes (Kernel panic).
I am not a software developer, so I asked my colleagues an explanation and a possible solution. But the reply is that the Linux driver can only be written in a way that cannot manage those kinds of error.
Hi,
There are 2 possible cases - one when you try to access the register that is out of the memory addresses (let’s say you have axi peripherals at addresses 0x1000-0x1FFF but you are trying to access 0x8000). Then it’s typical to freeze (sort of timeout occurs).
The second case - when your peripheral has addresses assigned 0x1000-0x1FFF, but you have registers only 0x1000-0x10FF. Then your code should cover the rest of the addresses by let’s say returning “DEADBEEF” or something like that.
Which is your case?
Ps. I’m not aware of linux solution for these cases - would love to hear it if exists though
I am aware the workaround with “fake” response like “DEADBEEF” or equivalent,
but I don’t like it at all since I am doing acquisition boards and I don’t want to use a fake value anyhow.
In may case, access to 0x8000 in your example, returns a complete freeze of the processor (kernel panic).
But then this is a realm for Linux experts, I guess.