Draft
Conversation
|
The mailbox size was reduced to 16KB in PR #3097, but the MAILBOX_SIZE constant in api/src/mailbox.rs still had the old 256KB value. This also incorrectly caused MAX_CM_SHA_INPUT_SIZE to be derived as 256KB-12 instead of the correct 16KB-12. Also rename the local MAILBOX_SIZE in mbox_write_fifo to PASSIVE_MAILBOX_SIZE to clarify it represents the hardware passive mode capacity (256KB) which is distinct from the software-level MAILBOX_SIZE constant. Agent-Logs-Url: https://github.com/chipsalliance/caliptra-sw/sessions/7a0da863-a46e-4291-8130-8567f5525047 Co-authored-by: mhatrevi <38512878+mhatrevi@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix mailbox size constant from 256KB to 16KB
Fix MAILBOX_SIZE constant: 256 KB → 16 KB
Apr 23, 2026
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.
MAILBOX_SIZEinapi/src/mailbox.rswas still set to 256 KB after the mailbox was reduced to 16 KB, causingMAX_CM_SHA_INPUT_SIZE(derived asMAILBOX_SIZE - 12) to be ~262 KB instead of the correct ~16 KB.Changes
api/src/mailbox.rsMAILBOX_SIZE:256 * 1024→16 * 1024, comment updated to matchMAX_CM_SHA_INPUT_SIZE: implicitly fixed to16372(was262132) since it derives fromMAILBOX_SIZEmbox_write_fifolocal constant: renamedMAILBOX_SIZE→PASSIVE_MAILBOX_SIZE(value stays256 * 1024) — this function is called in passive mode for large writes like firmware load and must retain the hardware FIFO capacity, distinct from the software API mailbox size