Skip to content

Conversation

@stevenlee7189
Copy link
Collaborator

Introduce software mailbox driver, which enables the BMC to
communicate with the Root of Trust (RoT) over an I2C target interface.

Execute the following command at the BMC prompt to verify SWMBX functionality:

  • Verify the SWMBX address:
    aspeed-pfr-tool -w 0x13 0x8
    aspeed-pfr-tool -r 0x13
    [Expected output: 0x8]

  • Verify the protected SWMBX address:
    aspeed-pfr-tool -w 0x12 0x8
    aspeed-pfr-tool -r 0x12
    [Expected output: 0x0]

  • Verify the notify functionality:
    aspeed-pfr-tool -w 0x13 0x8
    On Ast1060 console, you should see [NOTIFY] SWMBX: notify triggered on port 0 addr 0x13

  • Verify the FIFO functionality:
    aspeed-pfr-tool -w 0xd 0x1f
    aspeed-pfr-tool -w 0xd 0x2f
    aspeed-pfr-tool -w 0xd 0x3f
    aspeed-pfr-tool -r 0xd
    aspeed-pfr-tool -r 0xd
    aspeed-pfr-tool -r 0xd
    aspeed-pfr-tool -r 0xd
    [Expected output: 0x1f, 0x2f, 0x3f, 0x0]

Introduce software mailbox driver, which enables the BMC to
communicate with the Root of Trust (RoT) over an I2C target interface.

Execute the following command at the BMC prompt to verify SWMBX functionality:
- Verify the SWMBX address:
  aspeed-pfr-tool -w 0x13 0x8
  aspeed-pfr-tool -r 0x13
  [Expected output: 0x8]

- Verify the protected SWMBX address:
  aspeed-pfr-tool -w 0x12 0x8
  aspeed-pfr-tool -r 0x12
  [Expected output: 0x0]

- Verify the notify functionality:
  aspeed-pfr-tool -w 0x13 0x8
  On Ast1060 console, you should see [NOTIFY] SWMBX: notify triggered on port 0 addr 0x13

- Verify the FIFO functionality:
  aspeed-pfr-tool -w 0xd 0x1f
  aspeed-pfr-tool -w 0xd 0x2f
  aspeed-pfr-tool -w 0xd 0x3f
  aspeed-pfr-tool -r 0xd
  aspeed-pfr-tool -r 0xd
  aspeed-pfr-tool -r 0xd
  aspeed-pfr-tool -r 0xd
  [Expected output: 0x1f, 0x2f, 0x3f, 0x0]

Signed-off-by: Steven Lee <[email protected]>
@stevenlee7189
Copy link
Collaborator Author

The PR should be reviewed after the i2c driver is merged.

Originally, the mailbox functional test cases were designed for the DCSCM card.
This update adjust them to work with the ast1060_prot EVB.

Signed-off-by: Steven Lee <[email protected]>
@stevenlee7189
Copy link
Collaborator Author

stevenlee7189 commented Oct 28, 2025

Test Step on ast1060_prot evb:

First PROT module: running the PFR firmware:
https://github.com/AspeedTech-BMC/aspeed-zephyr-project/releases/download/v03.02/ast1060_prot_v03.02.tgz
Second PROT module: running the Rust firmware:
uart_ast10x0_swmbx.zip

When the second PROT module starts, it shows the following log:

####### SWMBX test #######


## SWMBX: Starting up...

[SWMBX] enable_behavior: 0x0 -> 0x7

After the second PROT module boots up, you should see a device with address 0x38 appear on I²C bus 1 of the first PROT module.

uart:~$ iic scan i2c@7e7b0080
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:             -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- 38 -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
1 devices found on i2c@7e7b0080

Then, run the following mailbox test commands from the first PROT module:

  • mailbox read/write test
uart:~$ iic write_byte i2c@7e7b0080 38 13 88
uart:~$ iic read_byte i2c@7e7b0080 38 13
Output: 0x88
  • mailbox fifo test
uart:~$ iic write_byte i2c@7e7b0080 38 d aa
uart:~$ iic write_byte i2c@7e7b0080 38 d bb
uart:~$ iic write_byte i2c@7e7b0080 38 d cc
uart:~$ iic write_byte i2c@7e7b0080 38 d dd
uart:~$ iic read_byte i2c@7e7b0080 38 d
Output: 0xaa
uart:~$ iic read_byte i2c@7e7b0080 38 d
Output: 0xbb
uart:~$ iic read_byte i2c@7e7b0080 38 d
Output: 0xcc
uart:~$ iic read_byte i2c@7e7b0080 38 d
Output: 0xdd
uart:~$ iic read_byte i2c@7e7b0080 38 d
Output: 0x0

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.

1 participant