Skip to content

Commit

Permalink
[fix] ROM README.md update (#900)
Browse files Browse the repository at this point in the history
  • Loading branch information
mhatrevi authored Oct 11, 2023
1 parent 9f365d1 commit 0dfb4e5
Show file tree
Hide file tree
Showing 9 changed files with 1,702 additions and 673 deletions.
253 changes: 147 additions & 106 deletions rom/dev/README.md

Large diffs are not rendered by default.

853 changes: 723 additions & 130 deletions rom/dev/doc/svg/cold-reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
817 changes: 538 additions & 279 deletions rom/dev/doc/svg/rom-dice.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
194 changes: 165 additions & 29 deletions rom/dev/doc/svg/unknown-reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
209 changes: 105 additions & 104 deletions rom/dev/doc/svg/update-reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 17 additions & 16 deletions rom/dev/doc/svg/warm-reset.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion rom/dev/src/flow/cold_reset/fmc_alias.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl FmcAliasLayer {
// We use the value of PCR0 as the measurement for deriving the CDI.
let mut measurement = env.pcr_bank.read_pcr(PCR_ID_FMC_CURRENT);

// Derive the DICE CDI from decrypted UDS
// Derive the DICE CDI from the measurement
let result = Self::derive_cdi(env, &measurement, KEY_ID_ROM_FMC_CDI);
measurement.0.zeroize();
result?;
Expand Down
8 changes: 4 additions & 4 deletions rom/dev/src/flow/cold_reset/idev_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl InitDevIdLayer {
// Decrypt the UDS
Self::decrypt_uds(env, KEY_ID_UDS)?;

// Decrypt the Filed Entropy
// Decrypt the Field Entropy
Self::decrypt_field_entropy(env, KEY_ID_FE)?;

// Clear Deobfuscation Engine Secrets
Expand Down Expand Up @@ -100,7 +100,7 @@ impl InitDevIdLayer {
env.soc_ifc.flow_status_set_ready_for_firmware();
}

// Write IDevID pub to FHT
// Write IDevID public key to FHT
env.persistent_data.get_mut().fht.idev_dice_pub_key = output.subj_key_pair.pub_key;

cprintln!("[idev] --");
Expand Down Expand Up @@ -208,7 +208,7 @@ impl InitDevIdLayer {
//
// Generate the CSR if requested via Manufacturing Service Register
//
// A flag is asserted via JTAG interface to enble the generation of CSR
// A flag is asserted via JTAG interface to enable the generation of CSR
if !env.soc_ifc.mfg_flag_gen_idev_id_csr() {
return Ok(());
}
Expand Down Expand Up @@ -248,7 +248,7 @@ impl InitDevIdLayer {
key_pair.priv_key as u8
);

// Sign the the `To Be Signed` portion
// Sign the `To Be Signed` portion
let mut sig =
Crypto::ecdsa384_sign_and_verify(env, key_pair.priv_key, &key_pair.pub_key, tbs.tbs());
let sig = okmutref(&mut sig)?;
Expand Down
6 changes: 2 additions & 4 deletions rom/dev/src/flow/cold_reset/ldev_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl LocalDevIdLayer {
// Generate the `To Be Signed` portion of the CSR
let tbs = LocalDevIdCertTbs::new(&params);

// Sign the the `To Be Signed` portion
// Sign the `To Be Signed` portion
cprintln!(
"[ldev] Signing Cert with AUTHORITY.KEYID = {}",
auth_priv_key as u8
Expand All @@ -178,8 +178,6 @@ impl LocalDevIdLayer {
let sig = okmutref(&mut sig)?;

// Clear the authority private key
//To-Do : Disabling The Print Temporarily
//cprintln!("[ldev] Erasing AUTHORITY.KEYID = {}", auth_priv_key as u8);
env.key_vault.erase_key(auth_priv_key).map_err(|err| {
sig.zeroize();
err
Expand All @@ -200,7 +198,7 @@ impl LocalDevIdLayer {
env.data_vault.set_ldev_dice_signature(sig);
sig.zeroize();

// Lock the Local Device ID public keys in data vault until
// Lock the Local Device ID public key in data vault until
// cold reset
env.data_vault.set_ldev_dice_pub_key(pub_key);

Expand Down

0 comments on commit 0dfb4e5

Please sign in to comment.