[PATCH] lib:firmware: Select preferred boot hart for cold boot.
Cheng Yang
yangcheng.work at foxmail.com
Tue Jan 23 19:42:36 PST 2024
>add check here<br/>> if (scratch->boot_hart != -1UL && sbi_platform_cold_boot_allowed(plat, scratch->boot_hart)<br/>> sbi_hart_hang();<br/><br/>What this check means is that if the preferred hart does not allow cold boot, will we enter sbi_hart_hang? <br/>So should the conditions for judgment be like if (scratch->boot_hart != -1UL && !sbi_platform_cold_boot_allowed(plat, scratch->boot_hart))?<br/><br/>>> + if (sbi_platform_cold_boot_allowed(plat, hartid) && next_mode_supported) {<br/>>> + if (scratch->boot_hart == -1) {<br/>>replace -1 with -1UL<br/>>> + if (atomic_xchg(&coldboot_lottery, 1) == 0)<br/>>> + coldboot = true;<br/>>> + } else {<br/>>> + if (scratch->boot_hart == hartid)<br/>>> + coldboot = true;<br/>>> + }<br/>>> }<br/>>><br/><br/>Thank u.<br/><br/>Regards<br/>Cheng Yang
More information about the opensbi
mailing list