Replies: 3 comments 1 reply
-
To describe the behaviour more, I've noticed that the ISR1 stack maxes out instantly upon Zephyr startup. Even if I make the stack size huge (256kb), it still maxes out and I don't get to see it fill up. Maybe my memory is misaligned somewhere? Not sure |
Beta Was this translation helpful? Give feedback.
-
This is what I get with
So seems like it has been like that for a while, I'm not sure if this is expected, but it definitely looks worrying. For comparison, the following is from
I'm trying to see what's wrong right now, cc @npitre @fkokosinski @carlocaione who might have insights on this |
Beta Was this translation helpful? Give feedback.
-
The issue was never caused by stack overflow then. Can confirm I see the proper ISR1 stack usage after your PR, @ycsin. After skimming through the GDB output of my I can't send the full output (it won't let me record), but I would like to see if anyone knows why these errors are not being shown in the console although my printk works and logging works (I can confirm If anyone would like to check my device tree for signs of a spurious interrupt, it's here: The rest of my zephyr configuration is also in that repo. Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I'm almost finished porting my LiteX VexriscV SMP to Zephyr. I can build samples for the board, such as
etc.
These samples seem to work correctly, and use both cores, however, the issue becomes apparent when I build anything with interrupts, such as the console samples. Instantly when the program starts, the stack size for ISR1 is overflowed, see here:
I believe this to be the cause of interrupts not working and the program appearing to freeze, here's the output I get from the subsys/console/echo sample:
I've checked many times that my CSR addresses match my devicetree and that it's mapped out similarly to other boards with the sifive PLIC/CLINT. I also noticed that in
${ZEPHYR_BASE}/zephyr/arch/riscv/core/smp.c
, there's a macro forMSIP_BASE
. I've also made that the same address as my CLINT. Didn't fix anything.I should also add that CONFIG_ATOMIC_OPERATIONS_C is disabled and CONFIG_ATOMIC_OPERATIONSBUILTIN is enabled (I think !CONFIG_ATOMIC_OPERATIONS_C has been asserted in Kconfig since this issue occured: #55049)
Here is my Zephyr fork:
https://github.com/lcomino64/zephyr-lcomino64
And here is a repo with the LiteX configuration:
https://github.com/lcomino64/Thesis-public
Can anyone suggest ways to debug this? Or tell me what could possibly be maxing out the ISR1 stack? I'm happy to give more context if needed, and here is a thread on Discord where @josuah and I have been trying to solve this issue:
https://discord.com/channels/720317445772017664/1276785758652338208
Beta Was this translation helpful? Give feedback.
All reactions