Skip to content

MCU MBOX protocol updates#132

Merged
clayton8 merged 29 commits intomainfrom
ckuchta-mcu-mbox
Mar 14, 2025
Merged

MCU MBOX protocol updates#132
clayton8 merged 29 commits intomainfrom
ckuchta-mcu-mbox

Conversation

@clayton8
Copy link
Collaborator

  • New MCU MBOX required due to new "third party" access called "Target" user in the spec
  • MCU MBOX SRAM is now fully addressable and has a TARGET_USER programmed by MCU
  • Added MCU MBOX SRAMs to the TB

SOC IFC MBOX feature set does not match MCI's needs, so a new mailbox was needed with a similar feature set.
The major difference is that the SRAM is fully addressable, a new target user, and the interrupts are
slightly different.
Need to avoid Target User being unset by MCU and an SOC agent having
0x0 AXI User getting inadvertant access to the mailbox.
MCI was looking at entire AXI address instead of only the internal
address bits meaning the MBOXes could never be accessed.
The MCI address map chaned with the new MCU Mailbox. This
caused issues with our linker file and how we compiled and
preloaded the MCU SRAM.
MCU MBOX addressing was wrongly implemented assuming address
width was 21 bits. In reality it is 22 bits which forces it to be
aligned to a 0x40_0000 boundary.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new MCU mailbox design with expanded functionalities including a Target user, fully addressable SRAM, and dedicated error and interrupt handling, as well as updating the corresponding testbench and compile configuration.

  • Updated hardware specification documentation with detailed MCU mailbox components and behaviors.
  • Added new compile configuration entries for mailbox RTL files.

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 7 comments.

File Description
docs/CaliptraSSHardwareSpecification.md Added new sections for mailbox features, locking, errors, and address mapping.
src/mci/config/compile.yml Included new mailbox related RTL source files in compile targets.
Comments suppressed due to low confidence (1)

docs/CaliptraSSHardwareSpecification.md:1050

  • Typo detected: "availalbe" should be "available".
| Mailbox data available from SOC             | Asserted when MCU gets lock and assert the EXECUTE register, indicating data is availalbe for MCU.

@clayton8 clayton8 requested review from Nitsirks and Copilot March 13, 2025 00:13
clayton8 and others added 3 commits March 12, 2025 17:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a new MCU Mailbox in both the hardware specification and RTL build configuration, enabling a new "Target" user access mode and fully addressing the SRAM in the mailbox.

  • Updated the hardware specification to include new MCU Mailbox sections (e.g., Target User, Locking, Fully Addressable SRAM).
  • Detailed new error conditions and interactions for mailbox usage and trusted/untrusted AXI users.
  • Updated compile configuration to include the new RTL sources for MCU Mailbox functionality.

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.

File Description
docs/CaliptraSSHardwareSpecification.md Added new MCU Mailbox sections and updated descriptions in the spec.
src/mci/config/compile.yml Included new RTL files for the MCU Mailbox feature in the build config.

clayton8 and others added 3 commits March 12, 2025 17:14
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@clayton8 clayton8 requested a review from Copilot March 13, 2025 00:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds a new MCU Mailbox (MBOX) design and hardware specification to support “third party” access, introducing additional features such as a fully addressable SRAM and a TARGET_USER controlled by the MCU. Key changes include:

  • Expanded documentation within CaliptraSSHardwareSpecification.md covering new mailbox features and error handling.
  • Updates to the compile configuration to include new MCU mailbox source files.

Reviewed Changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 1 comment.

File Description
docs/CaliptraSSHardwareSpecification.md Added sections detailing new MCU Mailbox features including limited trusted AXI users, locking, target user, SRAM clearing, interrupts, errors, and address map.
src/mci/config/compile.yml Updated to include new mailbox related source files in the targets and RTL sections.
Comments suppressed due to low confidence (1)

docs/CaliptraSSHardwareSpecification.md:1016

  • [nitpick] The anchor link 'mcu-mailbox-limited-trusted-AXI-user' is inconsistent with the plural form used elsewhere; consider updating it to '#mcu-mailbox-limited-trusted-axi-users' for consistency.
Target users must be an [MCU Mailbox trusted user](mcu-mailbox-limited-trusted-AXI-user)

clayton8 and others added 7 commits March 12, 2025 17:17
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…dress.

RDL had MCU SRAM correctly mapped to 0xC0_0000 but RTL and
linker files had it mapped to 0xA0_0000. Due to size of SRAM
and MBOX SRAMs it must start at 0xC0_0000.

mcu_cptra_bringup.c had MCU SRAM address hard coded instead of using
*.h file generated by RDL.
Co-authored-by: Caleb <11879229+calebofearth@users.noreply.github.com>
@clayton8 clayton8 changed the title Add new MCU MBOX to design and HW spec MCU MBOX protocol updates Mar 13, 2025
During a warm reset data can leak via the SRAM. To prevent this
we are giving MCU the MBOX after MCI reset is released and
the MCU needs to set up DLEN and release the MBOX causing the
SRAM to be zeroed out.
calebofearth
calebofearth previously approved these changes Mar 14, 2025
@calebofearth calebofearth self-requested a review March 14, 2025 20:01
@clayton8 clayton8 merged commit a2a3cec into main Mar 14, 2025
6 checks passed
@clayton8 clayton8 deleted the ckuchta-mcu-mbox branch March 14, 2025 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants