mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 20:56:47 +08:00
arch/risc-v/src/mpfs/mpfs_start.c: Don't boot if DDR is enabled and training fails
Output "X" with showprogress and make a system reset. Silently ignoring failed training is dangerous and will cause random behaviour if DDR is used Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
326183bbbc
commit
b7a1b75a3b
@@ -167,7 +167,19 @@ void __mpfs_start(uint64_t mhartid)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_MPFS_DDR_INIT
|
#ifdef CONFIG_MPFS_DDR_INIT
|
||||||
mpfs_ddr_init();
|
if (mpfs_ddr_init() != 0)
|
||||||
|
{
|
||||||
|
/* We don't allow booting, ddr training failure will cause random
|
||||||
|
* behaviour
|
||||||
|
*/
|
||||||
|
|
||||||
|
showprogress('X');
|
||||||
|
|
||||||
|
/* Reset, but let the progress come out of the uart first */
|
||||||
|
|
||||||
|
up_udelay(1000);
|
||||||
|
up_systemreset();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
showprogress('B');
|
showprogress('B');
|
||||||
|
|||||||
Reference in New Issue
Block a user