u32 *xrdc = ioremap(0x401A4000, 0x1000);
printk(KERN_DEBUG "XRDC_0 status 0x%x \n", *xrdc);
iounmap(xrdc);
Hello, I am trying to achieve same thing too.
I run the following code in a kernel module in order to read CR register of XRDC module
uint32_t* virt_addr;
uint32_t val = 0;
virt_addr = ioremap(0x401A4000, 4);
val = ioread32(virt_addr);
iounmap(virt_addr);
With this code I can read other system registers but cannot read XRDC registers (which require secure privileged access). When I invoke the code via a system call to kernel, I get following error message:
Message from syslogd@ at Thu Apr 28 18:48:32 2022 ...
: Internal error: synchronous external abort: 96000210 [#3] PREEMPT SMP
Message from syslogd@ at Thu Apr 28 18:48:32 2022 ...
: Code: 91016000 95fd178b b94033e2 b40001b4 (b9400281)
Hi,
Which S32G variant are you using? Are you working with an NXP reference board?
How are you configuring the XRDC? Is it being initialized by the M7 core? Or is it being configured by each core?
Also, we understand you are working with BSP37.0, but from where you are executing the code you are showing?
Please, let us know.