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
Hello, I noticed that in the init_first_hart function, the hart_init function is after some Confirm console functions and start printing.
voidinit_first_hart(uintptr_thartid, uintptr_tdtb)
{
// Confirm console as early as possiblequery_uart(dtb);
query_uart16550(dtb);
query_uart_litex(dtb);
query_htif(dtb);
printm("bbl loader\r\n");
hart_init();
hls_init(0); // this might get called again from parse_config_string
. ...
And the mstatus register is set in hart_init, such as the VS and FS flag bits,which may cause the v-extended instruction in the code before the hart_init function to be recognized as an illegal instruction.
For example, the memset function has a high probability of compiling with v-extended instructions. (Actually, this has happened to me).
Therefore, I think it is necessary to call the hart_init function first to ensure that the mstatus register can be set in time.
The text was updated successfully, but these errors were encountered:
yorange1
changed the title
hart_init should start first, avoid the risk of illegal instructions caused by unset mstatus.
hart_init should call first, avoid the risk of illegal instructions caused by unset mstatus.
Oct 13, 2022
Hello, I noticed that in the
init_first_hart
function, thehart_init
function is after some Confirm console functions and start printing.And the mstatus register is set in hart_init, such as the VS and FS flag bits,which may cause the v-extended instruction in the code before the hart_init function to be recognized as an illegal instruction.
For example, the
memset
function has a high probability of compiling with v-extended instructions. (Actually, this has happened to me).Therefore, I think it is necessary to call the
hart_init
function first to ensure that the mstatus register can be set in time.The text was updated successfully, but these errors were encountered: