-
Notifications
You must be signed in to change notification settings - Fork 38
DNS: Mailbox test demo #711
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
zhalvorsen
wants to merge
2
commits into
chipsalliance:main-2.1
Choose a base branch
from
zhalvorsen:mailbox-test-demo
base: main-2.1
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
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
with the mailbox and interrupts
Sample output log:
```
Using hardware-model ModelEmulated
InitParamsSummary {
rom_sha384: "b4a8f7d4b941cb40ffce49358e5c647e87017ca540f3a81353d4ad3a5a2c2bbb005e268752ea13110b2b160b7283ce6f",
obf_key: [0xa0a1a2a3, 0xb0b1b2b3, 0xc0c1c2c3, 0xd0d1d2d3, 0xe0e1e2e3, 0xf0f1f2f3, 0xa4a5a6a7, 0xb4b5b6b7],
}
[emulator bmc recovery] Recovery state transition: ReadProtCap -> ReadDeviceStatus
[mcu-rom] Hello from ROM
[mcu-rom] Device lifecycle: Production
[mcu-rom] MCI generic input wires[0]: 00000000
[mcu-rom] MCI generic input wires[1]: 00000000
[mcu-rom] MCI RESET_REASON: 0x00000000
[mcu-rom] Cold boot detected
[mcu-rom] Starting cold boot flow at time 6621
[mcu-rom] Setting Caliptra boot go
[mcu-lcc] Initializing Lifecycle controller...
[mcu-lcc] Lifecycle state: 00000000 (count 0)
Lifecycle controller initialization done
[mcu-rom-otp] Initializing OTP controller...
[mcu-rom-otp] Enabling consistency check period
mcu-rom-otp] Enabling check timeout
[mcu-rom-otp] Disabling check modifications
[mcu-rom-otp] Done init
[mcu-rom] Reading fuses
[mcu-rom-otp] Reading SW tests unlock partition
[mcu-rom-otp] Reading SW manufacturer partition
[mcu-rom-otp] Reading SVN partition
[mcu-rom-otp] Reading vendor test partition
[mcu-rom-otp] Reading vendor hashes manufacturer partition
[mcu-rom-otp] Reading vendor hashes production partition
[mcu-rom-otp] Reading vendor revocations production partition
[mcu-rom-otp] Reading OCP LOCK HEK seeds
[mcu-rom] Initializing I3C
[mcu-rom-i3c] HCI version: 120
[mcu-rom-i3c] Set TTI RESET_CONTROL: 0000003F
[mcu-rom-i3c] Initialize timing registers
[mcu-rom-i3c] Timing registers t_r: 0, t_f: 0, t_hd_dat: 0, t_su_dat: 0, t_high: 0, t_low: 0, t_hd_sta: 0, t_su_sta: 0, t_su_sto: 0, t_free: 200
[mcu-rom-i3c] Setup HCI queue thresholds
[mcu-rom-i3c] Enable the target transaction interface
[mcu-rom-i3c] STBY_CR_CONTROL: 8000d000
[mcu-rom-i3c] STBY_CR_CAPABILITIES: 1000
[mcu-rom-i3c] Setting static address to 3a
[mcu-rom-i3c] Setting virtual device static address to 3b
[mcu-rom-i3c] Set TTI queue thresholds
[mcu-rom-i3c] TTI queue thresholds: 01000101
[mcu-rom-i3c] TTI data buffer thresholds ctrl: 00000000
[mcu-rom-i3c] Reset indirect fifo ctrl
[mcu-rom-i3c] Enable PHY to the bus
[mcu-rom] Waiting for Caliptra to be ready for fuses: true
[mcu-rom] Writing fuses to Caliptra
[mcu-rom] Setting Caliptra mailbox user 0 to CCCCCCCC
[mcu-rom] Locking Caliptra mailbox user 0
[mcu-rom] Setting Caliptra mailbox user 1 to DDDDDDDD
[mcu-rom] Locking Caliptra mailbox user 1
[mcu-rom] Setting fuse user
[mcu-rom] Locking fuse user
[mcu-rom] Setting TRNG user
[mcu-rom] Locking TRNG user
[mcu-rom] Setting DMA user
[mcu-rom] Populating fuses
[mcu-fuse-write] Setting UDS/FE base address to 48
[mcu-fuse-write] Setting UDS/FE DAI idle bit offset to 30 and direct access cmd reg offset to 128
[mcu-fuse-write] Setting vendor PQC type to 3
[mcu-fuse-write] Writing fuse key vendor PK hash: B17CA877666657CCD100E6926C7206B60C995CB68992C6C9BAEFCE728AF05441DEE1FF415ADFC187E1E4EDB4D3B2D909
[mcu-fuse-write] Attempting to write OCP LOCK fuses
[mcu-fuse-write] Finished writing OCP LOCK fuses
[mcu-rom] Setting Caliptra fuse write done
[mcu-rom] Waiting for Caliptra to be ready for mbox
Running Caliptra ROM ...
[state] LifecycleState = Production
[state] DebugLocked = No
[ROM] OCP-LOCK Unsupported
[state] WD Timer not started. Device not locked for debugging
[kat] SHA2-256
ROM Digest: 654136A6AEA7C28BD92362B05E69004938AAEDA91CFB1C6E0EFA9CD323C8B67C
[kat] ++
[kat] sha1
[kat] SHA2-256
[kat] SHA2-384
[kat] SHA2-512
[kat] SHA2-512-ACC
[kat] SHAKE-256
[kat] ECC-384
[kat] ECDH
[kat] HMAC-384Kdf
[kat] HMAC-512Kdf
[kat] HKDF-384
[kat] HKDF-512
[kat] KDF-CMAC
[kat] LMS
[kat] MLDSA87
[kat] AES-256-ECB
[kat] AES-256-CBC
[kat] AES-256-CMAC
[kat] AES-256-CTR
[kat] AES-256-GCM
[kat] --
[cold-reset] ++
[fht] FHT @ 0x5000C800
[idev] ++
[idev] CDI.KEYID = 6
[idev] ECC SUBJECT.KEYID = 7, MLDSA SUBJECT.KEYID = 8
[idev] UDS.KEYID = 0
[mcu-rom] Caliptra is ready for mailbox commands
[mcu-rom] Reading DOT blob
[mcu-rom] DOT blob is empty; skipping DOT flow
[mcu-rom] Sending RI_DOWNLOAD_FIRMWARE command
[mcu-rom] Done sending RI_DOWNLOAD_FIRMWARE command: status 00000006
[idev] Erasing UDS.KEYID = 0
[idev] Sha1 KeyId Algorithm
[idev] Sha1 KeyId Algorithm
[idev] --
[ldev] ++
[ldev] CDI.KEYID = 6
[ldev] ECC SUBJECT.KEYID = 5, MLDSA SUBJECT.KEYID = 4
[ldev] ECC AUTHORITY.KEYID = 7, MLDSA AUTHORITY.KEYID = 8
[ldev] FE.KEYID = 1
[ldev] Deriving DOT_STABLE_IDEV.KEYID = 0
[ldev] Erasing FE.KEYID = 1
[ldev] Deriving DOT_STABLE_LDEV.KEYID = 1
[ldev] Signing Cert with ECC AUTHORITY.KEYID = 7
[ldev] PUB.X = CDDB03100DFF673C57488287904DCEA38C9405CAF58F6658959A1595E03D01C14CD49128C486725DD18AAA2370ED778A
[ldev] PUB.Y = 07EE73B04C2D86E7AE9763B02331B8A0053B065DE9A5B359D6329A16FF0B4ACC827E1165CF634B22D9681A2D0C86D06C
[ldev] SIG.R = 4E430D17468B6CBE6823896BD23A9D53BEA9343C6D34A7B53B12998AF0CE321EF5456AA70F0CC2A879C664DC6A250DA9
[ldev] SIG.S = E0F30153CB831EF1BE0030FA357C21A9331C55A776C73A21E2700C275D8EB46049890939B7F34F85AC06DDE634D808E5
[ldev] Signing Cert with MLDSA AUTHORITY.KEYID = 8
[ldev] --
[fwproc] Wait for Commands...
[fwproc] Recv command 0x52494644
[fwproc] Completing RI_DOWNLOAD_FIRMWARE command
[mcu-rom] Waiting for MCU firmware to be ready
[fwproc] Downloading image from RRI to MCU SRAM
[dma-recovery] Requesting recovery image 0
[dma-recovery] Set device status 3
[emulator bmc recovery] Recovery state transition: ReadDeviceStatus -> WaitForRecoveryStatus
No Image in RRI (0 >= 0)
[emulator bmc recovery] Sending recovery image 0
[emulator bmc recovery] Recovery state transition: WaitForRecoveryStatus -> WaitForRecoveryPending
[dma-recovery] Payload available, 198488 bytes
[emulator bmc recovery] Recovery state transition: WaitForRecoveryPending -> Activate
[fwproc] Received image from the Recovery Interface of size 198488 bytes
[dma-image] SHA384 image digest calculation: source = 365734be00c0000c, length = 1736
[dma-image] SHA384 image digest calculation: source = 365734be00c006d8, length = 96
[dma-image] SHA384 image digest calculation: source = 365734be00c0073c, length = 48
[dma-image] SHA384 image digest calculation: source = 365734be00c023d0, length = 2688
[dma-image] SHA384 image digest calculation: source = 365734be00c040cc, length = 120
[dma-image] SHA384 image digest calculation: source = 365734be00c040cc, length = 160
[dma-image] SHA384 image digest calculation: source = 365734be00c0416c, length = 208
[dma-image] SHA384 image digest calculation: source = 365734be00c0423c, length = 33500
[dma-image] SHA384 image digest calculation: source = 365734be00c0c518, length = 148032
[fwproc] Setting device recovery status to 0x1, image index 0x1, device status 0x3
No Image in RRI (1 >= 1)
[emulator bmc recovery] Recovery state transition: Activate -> WaitForRecoveryStatus
[emulator bmc recovery] Sending recovery image 1
[emulator bmc recovery] Recovery state transition: WaitForRecoveryStatus -> WaitForRecoveryPending
[fwproc] Img verified w/ Vendor ECC Key Idx 0, PQC Key Type: LMS, PQC Key Idx 0, with SVN 0 and effective fuse SVN 0
[fwproc] Load FMC at address 0x40000000 len 33500
[fwproc] Load Runtime at address 0x40009000 len 148032
[fwproc] Initializing chain, length 128 (max 128)
[fwproc] Chain initialized
[afmc] ++
[afmc] ECC Signing Cert w/ AUTHORITY.KEYID = 5
[afmc] MLDSA Signing Cert w/ AUTHORITY.KEYID = 4
[afmc] MLDSA Erase AUTHORITY.KEYID = 4
[afmc] --
[cold-reset] --
[state] Locking Datavault
[state] Locking PCR0, PCR1 and PCR31
[state] Locking ICCM
[exit] Launching FMC @ 0x40000130
Running Caliptra FMC ...
[state] CFI Enabled
[fht] FMC Alias ECC Private Key: 7
[fht] FMC Alias MLDSA Key Pair Seed KV Slot: 8
[alias rt] Extend RT PCRs
[alias rt] Extend RT PCRs Done
[alias rt] Lock RT PCRs
[alias rt] Lock RT PCRs Done
[fht] FMC Alias ECC Private Key: 7
[fht] FMC Alias MLDSA Key Pair Seed KV Slot: 8
[alias rt] Derive CDI
[alias rt] Store it in slot 0x4
[alias rt] Derive Key Pair
[alias rt] Store ECC priv key in slot 0x5 and MLDSA key pair seed in slot 0x9
[alias rt] Derive Key Pair - Done
[alias rt] Signing ECC Cert with AUTHORITY.KEYID = 7
[alias rt] Locking ECC AUTHORITY.KEYID = 7 & FMC CDI = 6
[alias rt] ECC PUB.X = 0912B66403FCA51143D844BC267F20F6D64A69274209DD894624C1BE2307D28B0744935273574A4F2A202C4C9BD37438
[alias rt] ECC PUB.Y = DB8405AECB254D65AFF6F5F40144A25407F8FFFA0539D67F5D164A4CCA84F1D0711AB4F17C77C64E145F58780726F859
[alias rt] ECC SIG.R = AED7CC9E9DFDE4575398718E8A43850ABC33812B532644A89FE014C69339FC8F73ACDAB2B619BD32A863CA626B5AD089
[alias rt] ECC SIG.S = A7BFA23DF60C5A615393094588EB1B01CEA2FE640178DD9DB88BEE8D60AEB922A32EFB238EC7CB1F3B7292BB167AF9F4
[alias rt] Signing MLDSA Cert with AUTHORITY.KEYID = 8
[alias rt] Locking MLDSA AUTHORITY.KEYID = 8 & FMC CDI = 6
Caliptra RT
[state] CFI Enabled
[dma-recovery] Requesting recovery image 1
[dma-recovery] Set device status 3
[dma-recovery] Payload available, 34456 bytes
[dma-recovery] Waiting for activation
[emulator bmc recovery] Recovery state transition: WaitForRecoveryPending -> Activate
[emulator bmc recovery] Recovery state transition: Activate -> WaitForRecoveryStatus
[rt] Uploading MCU firmware
[dma-recovery] Requesting recovery image 2
[dma-recovery] Set device status 3
No Image in RRI (2 >= 2)
[emulator bmc recovery] Sending recovery image 2
[emulator bmc recovery] Recovery state transition: WaitForRecoveryStatus -> WaitForRecoveryPending
[dma-recovery] Payload available, 280832 bytes
[emulator bmc recovery] Recovery state transition: WaitForRecoveryPending -> Activate
[rt] Calculating MCU digest
[dma-image] SHA384 image digest calculation: source = 365734be00c00000, length = 280832
[rt] Verifying MCU digest: 4B0E6E8332F02098346BA639A8FDEA304FBF35D52E64A87B97358A28B707D944DF5DFC59757476C63BD45B528414F450
[rt] Setting MCU firmware ready
[mcu-rom] Firmware is ready
[mcu-rom] Firmware load detected
[mcu-rom] Waiting for Caliptra RT to be ready for runtime mailbox commands
[rt] Setting MCU firmware ready: 00000004000000000000000000000000
[rt] RT listening for mailbox commands...
[mcu-rom] Finished common initialization
[mcu-rom] Resetting to boot firmware
[mcu-rom[MCI] TimerAction::UpdateReset
] ERROR: Still runni[mcu-rom] Hello from ROM
[mcu-rom] Device lifecycle: Production
[mcu-rom] MCI generic input wires[0]: 00000000
[mcu-rom] MCI generic input wires[1]: 00000000
[mcu-rom] MCI RESET_REASON: 0x00000002
[mcu-rom] Firmware boot reset detected
[mcu-rom] Starting fw boot reset flow
[mcu-rom] Jumping to firmware
Warning: PMP non-MMIO region overlap detected!
Existing region (higher priority): 0x40000000 + 0x1cfc8 bytes
New region (lower priority): 0x40000000 + 0x4488c bytes
Overlap: 0x40000000-0x4001cfc8 (0x1cfc8 bytes)
→ Earlier region takes precedence in overlapping area
PMP Regions:
PMPRegionList (16 regions):
Format: [MODE, RWX, LOCK] where:
MODE: TOR=Top-of-Range, NAPOT=Naturally-Aligned-Power-of-Two
RWX: R=Read, W=Write, X=Execute, -=Not-Allowed
LOCK: LOCK=Locked-to-Machine, USER=User-Accessible
PMP Entry Layout: User regions (0..31), Kernel regions ((64-N)..63)
[0]: KernelText(0x40000000..0x4001cfc8) [TOR, R-X, LOCK]
[1]: ReadOnly(0x40000000..0x4004488c) [TOR, R--, LOCK]
[2]: Data(0x4005a000..0x40080080) [TOR, RW-, LOCK]
[3]: Data(0x50000000..0x50004000) [TOR, RW-, LOCK]
[4]: MachineMMIO(0x60000000+0x10000) [NAPOT, RW-, LOCK]
[5]: MachineMMIO(0x20004000+0x1000) [NAPOT, RW-, LOCK]
[6]: MachineMMIO(0x21000000+0x1000000) [NAPOT, RW-, LOCK]
[7]: MachineMMIO(0x30020000+0x40) [NAPOT, RW-, LOCK]
[8]: MachineMMIO(0x30030000+0x800) [NAPOT, RW-, LOCK]
[9]: MachineMMIO(0x70000000+0x200) [NAPOT, RW-, LOCK]
[10]: MachineMMIO(0x70000400+0x100) [NAPOT, RW-, LOCK]
[11]: UserMMIO(0x10000000+0x10000000) [NAPOT, RW-, USER]
[12]: MachineMMIO(0x20008000+0x1000) [NAPOT, RW-, LOCK]
[13]: MachineMMIO(0x2f000000+0x200000) [NAPOT, RW-, LOCK]
[14]: MachineMMIO(0xa4081000+0x1000) [NAPOT, RW-, LOCK]
[15]: MachineMMIO(0x3bfe0000+0x20000) [NAPOT, RW-, LOCK]
Finished setting up PMP
MCU_MBOX_DRIVER: new
[mcu-runtime-veer] Disabling all interrupts
MCU_MBOX_DRIVER: Resetting mbox
MCU_MBOX_DRIVER: enabled interrupts
[mcu-runtime-veer] Enabling all interrupts
[mcu-runtime-i3c] Enabling I3C interrupts
MUX MCTP enable
MCU initialization complete.
Entering main loop.
Loading processes from flash=0x4001D000-0x4004488B into sram=0x40062000-0x4007FFFF
Looking for process binary in flash=0x4001D000-0x4004488B
Loading: process flash=0x4001D000-0x4004488B ram=0x40062000-0x4007FFFF
Loading: user-app [0] flash=0x4001D000-0x4004488C ram=0x40062000-0x4007F50F
Loaded process user-app
Looking for process binary in flash=0x4004488C-0x4004488B
No more processes to load: Not enough flash available for TBF.
Hello world! from SPDM main
Starting MCU_MBOX task...
Starting MCU_MBOX service for integration tests...
SPDM_TASK: Running SPDM-TASK...
[rt] Received command=0x49444550 (IDEP), len=1032
mcu_mbox_responder start
McuMbox.receive_command
McuMbox Subscribed
Kernel syscall: MCU_MBOX_CAPSULE: receive_request
McuMbox Syscall sent
[rt] Received command=0x434d5349 (CMSI), len=1036
[rt] Received command=0x434d5346 (CMSF), len=208
test runtime::test_hek_provisioning::test_provision_first_hek has been running for over 60 seconds
<<< Executing mbox cmd 0x4d435048 (8 bytes) from SoC
Error: Mailbox command timed out
```
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.
No description provided.