> + sec2_falcon.reset(bar)?;
> + sec2_falcon.dma_load(bar, &booter_loader)?;
> + let wpr_handle = wpr_meta.dma_handle();
> + let (mbox0, mbox1) = sec2_falcon.boot(
> + bar,
> + Some(wpr_handle as u32),
> + Some((wpr_handle >> 32) as u32),
> + )?;
> + dev_dbg!(
> + pdev.as_ref(),
> + "SEC2 MBOX0: {:#x}, MBOX1{:#x}\n",
> + mbox0,
> + mbox1
> + );
You should add something like this:
if mbox0 != 0 {
dev_err!(pdev.as_ref(), "Booter-load failed with error {:#x}\n",
mbox0);
return Err(ENODEV);
}
Booter returns an error code in MBOX0, and it's very handy to display that code
if it's non-zero.