Conversation
io96b_mb_init() starts issuing IOSSM mailbox accesses (mailbox header, memory interface info, etc.) without first confirming that the IOSSM firmware has finished initializing its mailbox. If the mailbox is not yet ready, those accesses operate on an uninitialized interface and can return bogus data or hang with no useful diagnostic. The MAILBOX_HEADER register exposes an MB_READY bit (bit 31) that the IOSSM firmware sets once the mailbox is initialized and ready to accept commands. When enabled, poll this bit for every assigned IO96B instance before any mailbox traffic, with a 6s timeout, and hang with a clear message if it never becomes ready. Some IOSSM firmware revisions never assert MB_READY, so an unconditional wait times out and hangs DDR init. Gate the poll behind CONFIG_IO96B_MB_READY (default n). Enable only when the IOSSM firmware sets MB_READY. In the normal boot flow with compatible firmware the check is effectively free: io96b_mb_init() runs after init_mem_cal(), by which point the firmware is already up and MB_READY is observed set on the first read (0 msec). The poll only adds value as a guard against a missing or wedged mailbox. Tested-on: SoCFPGA Agilex5 & Agilex7m SoCDK hardware. Signed-off-by: Chen Huei Lok <chen.huei.lok@altera.com>
lokchenh
force-pushed
the
master_260731_iossm_mailbox_ready
branch
from
August 5, 2026 00:50
52e66c4 to
e0403b7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI Pipeline Test
io96b_mb_init() starts issuing IOSSM mailbox accesses (mailbox header, memory interface info, etc.) without first confirming that the IOSSM firmware has finished initializing its mailbox. If the mailbox is not yet ready, those accesses operate on an uninitialized interface and can return bogus data or hang with no useful diagnostic.
The MAILBOX_HEADER register exposes an MB_READY bit (bit 31) that the IOSSM firmware sets once the mailbox is initialized and ready to accept commands. Poll this bit for every assigned IO96B instance before any mailbox traffic, with a 6s timeout, and hang with a clear message if it never becomes ready.
In the normal boot flow the check is effectively free: io96b_mb_init() runs after init_mem_cal(), by which point the firmware is already up and MB_READY is observed set on the first read (0 msec). The poll only adds value as a guard against a missing or wedged mailbox.
Tested-on: SoCFPGA Agilex5 & Agilex7m SoCDK hardware.
Please do not submit a Pull Request via github. Our project makes use of
mailing lists for patch submission and review. For more details please
see https://u-boot.readthedocs.io/en/latest/develop/sending_patches.html
The only exception to this is in order to trigger a CI loop on Azure prior
to posting of patches.