Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
swenson committed Jan 28, 2025
1 parent af5b552 commit e54babc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/src/dma.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl Dma {
self.dma.set(Some(dma));
Ok(result)
} else {
Err(CaliptraError::RUNTIME_INTERNAL) // should never happen
Err(CaliptraError::DRIVER_DMA_INTERNAL) // should never happen
}
}

Expand Down
1 change: 1 addition & 0 deletions error/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ impl CaliptraError {
pub const DRIVER_DMA_FIFO_UNDERRUN: CaliptraError = CaliptraError::new_const(0x0000f002);
pub const DRIVER_DMA_FIFO_OVERRUN: CaliptraError = CaliptraError::new_const(0x0000f003);
pub const DRIVER_DMA_FIFO_INVALID_SIZE: CaliptraError = CaliptraError::new_const(0x0000f004);
pub const DRIVER_DMA_INTERNAL: CaliptraError = CaliptraError::new_const(0x0000f004);

/// Runtime Errors
pub const RUNTIME_INTERNAL: CaliptraError = CaliptraError::new_const(0x000E0001);
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/recovery_flow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ impl RecoveryFlow {
.auth_manifest_image_metadata_col = image_metadata_collection;
// [TODO][CAP2]: capture measurement of Soc manifest?
// [TODO][CAP2]: this should be writing to MCU SRAM directly via AXI
let _mcu_size_bytes = dma_recovery.download_image_to_mbox(SOC_MANIFEST_INDEX)?;
let _mcu_size_bytes = dma_recovery.download_image_to_mbox(MCU_FIRMWARE_INDEX)?;
// [TODO][CAP2]: instruct Caliptra HW to read MCU SRAM and generate the hash (using HW SHA accelerator and AXI mastering capabilities to do this)
// [TODO][CAP2]: use this hash and verify it against the hash in the SOC manifest
// [TODO][CAP2]: after verifying/authorizing the image and if it passes, it will set EXEC/GO bit into the register as specified in the previous command. This register write will also assert a Caliptra interface wire
Expand Down

0 comments on commit e54babc

Please sign in to comment.