<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 22, 2023 at 10:46 AM Kinsey Moore <<a href="mailto:kinsey.moore@oarcorp.com">kinsey.moore@oarcorp.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 22, 2023 at 7:44 AM Sebastian Huber <<a href="mailto:sebastian.huber@embedded-brains.de" target="_blank">sebastian.huber@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 21.09.23 16:59, Kinsey Moore wrote:<br>
> Ok, thanks! I'll take a look and see what I can find.<br>
<br>
Thanks, I did run the test case also on riscv and it worked fine in <br>
uniprocessor and SMP configurations.<br></blockquote><div><br></div><div>Without the patch on SMP, I'm seeing a hang on "B:RtemsIntrReqRaise" on QEMU (latest from RSB). With the patch on SMP, I'm seeing a somewhat different assert from inside _Thread_Handler on line 139.</div><div><br></div><div>It seems related, so I'll keep looking into it.</div></div></div></div></blockquote><div><br></div><div>It looks like the "msr spsel, #" directives are swapped in the wrapper function that gets the non-interrupt stack pointer. This has the result of corrupting the interrupt stack with a value from the non-interrupt stack and leaving the interrupt stack in a state to continue recorrupting the non-interrupt stack. As you can imagine, this causes some problems. Swapping the spsel assembly seems to resolve the issue.</div><div><br></div><div>Kinsey<br></div></div></div>