[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


&gt;add check here<br/>&gt;	if (scratch-&gt;boot_hart != -1UL &amp;&amp; sbi_platform_cold_boot_allowed(plat, scratch-&gt;boot_hart)<br/>&gt;		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-&gt;boot_hart != -1UL &amp;&amp; !sbi_platform_cold_boot_allowed(plat, scratch-&gt;boot_hart))?<br/><br/>&gt;&gt; +	if (sbi_platform_cold_boot_allowed(plat, hartid) &amp;&amp; next_mode_supported) {<br/>&gt;&gt; +		if (scratch-&gt;boot_hart == -1) {<br/>&gt;replace -1 with -1UL<br/>&gt;&gt; +			if (atomic_xchg(&amp;coldboot_lottery, 1) == 0)<br/>&gt;&gt; +				coldboot = true;<br/>&gt;&gt; +		} else {<br/>&gt;&gt; +			if (scratch-&gt;boot_hart == hartid)<br/>&gt;&gt; +				coldboot = true;<br/>&gt;&gt; +		}<br/>&gt;&gt;  	}<br/>&gt;&gt;<br/><br/>Thank u.<br/><br/>Regards<br/>Cheng Yang


More information about the opensbi mailing list