Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/fpga-subsystem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ permissions:
contents: read

env:
CALIPTRA_MCU_COMMIT: ${{ inputs.mcu-commit || '781d1f68e752b0810b81f9ec0f0cd175391c53a6' }}
CALIPTRA_MCU_COMMIT: ${{ inputs.mcu-commit || '47810a48a4fcf6f80b50bac7a7e6721eb9123d6c' }}

jobs:
check_cache:
Expand Down
16 changes: 11 additions & 5 deletions hw-model/src/model_fpga_subsystem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ pub struct ModelFpgaSubsystem {
}

impl ModelFpgaSubsystem {
fn mci_boot_milestones(&mut self) -> McuBootMilestones {
McuBootMilestones::from((self.mci_flow_status() >> 16) as u16)
}

fn set_bootfsm_break(&mut self, val: bool) {
if val {
self.wrapper
Expand Down Expand Up @@ -1758,10 +1762,6 @@ impl ModelFpgaSubsystem {
(self.mci_flow_status() & 0x0000_ffff) as u16
}

pub fn mci_boot_milestones(&mut self) -> McuBootMilestones {
McuBootMilestones::from((self.mci_flow_status() >> 16) as u16)
}

fn caliptra_axi_bus(&mut self) -> Option<FpgaRealtimeBus<'_>> {
self.mmio.caliptra_axi_bus()
}
Expand Down Expand Up @@ -2339,7 +2339,13 @@ impl HwModel for ModelFpgaSubsystem {
// MCU ROM will wait after reaching the mailbox for this bit before booting RT
gpio.set(current | 1 << 31);

// ironically, we don't need to support this
// Wait for MCU to finish cold boot (including ROM integrity check)
// to avoid mailbox contention with the host.
self.step_until(|m| {
m.mci_boot_milestones()
.contains(McuBootMilestones::COLD_BOOT_FLOW_COMPLETE)
});

Ok(())
}

Expand Down
Loading