You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling PK with the latest GCC v15 with architecture RV64GCV the compiler uses vector instructions for uart init before mstatus.VS is properly set which causes illegal instruction error in spike.
I assume gcc uses vector calling convention now, since compiling with -fno-tree-vectorize does not fix the issue.
The PK make script needs to set proper compiler flags for disabling vectorisation and vector calling convention (which I am not aware of) or needs to set mstatus ASAP before any compiler generated code gets executed.
What I did as a temporary fix in minit.c:
void init_first_hart(uintptr_t hartid, uintptr_t dtb)
{
// set mstatus first
mstatus_init();
// Confirm console as early as possible
query_uart(dtb);
query_uart16550(dtb);
query_uart_litex(dtb);
query_htif(dtb);
...
and removed the line
if (supports_extension('V'))
The text was updated successfully, but these errors were encountered:
When compiling PK with the latest GCC v15 with architecture RV64GCV the compiler uses vector instructions for uart init before
mstatus.VS
is properly set which causes illegal instruction error in spike.See the instruction sequence:
I assume gcc uses vector calling convention now, since compiling with
-fno-tree-vectorize
does not fix the issue.The PK make script needs to set proper compiler flags for disabling vectorisation and vector calling convention (which I am not aware of) or needs to set mstatus ASAP before any compiler generated code gets executed.
What I did as a temporary fix in
minit.c
:and removed the line
The text was updated successfully, but these errors were encountered: