style: trim three comment blocks under the central guard caps

This commit is contained in:
Matthew Jackson
2026-09-22 20:39:41 -07:00
parent e107c699d1
commit 89f202edbc
3 changed files with 11 additions and 15 deletions
+6 -8
View File
@@ -184,14 +184,12 @@ pub enum Verb {
Poke = 0x0D,
/// **Debug-knock only.** Invokes the firmware's boot function entry with
/// r0=4 to force the cold path (BSS clear + C-runtime data init + full
/// post-init sequence). Recovers a wedged drive without a power cycle
/// (SCSI target briefly returns Aborted Command mid-reboot, then comes
/// back ~5s later; the safe-knock verb chain is re-armed to its power-on
/// defaults). The target VA is baked into the emitted handler at build
/// time (resolved from the boot-init signature = `boot_init_site - 0x10`),
/// so no CDB arguments are carried beyond the verb byte. Refused under
/// the safe [`KNOCK`]; only executed under [`DEBUG_KNOCK`]. See
/// [`build_reboot_cdb`].
/// post-init), recovering a wedged drive without a power cycle. The target
/// briefly returns Aborted Command mid-reboot, then comes back ~5s later
/// with the safe-knock verb chain re-armed to its power-on defaults. The
/// target VA is baked into the handler at build time, so no CDB arguments
/// are carried beyond the verb byte. Refused under the safe [`KNOCK`];
/// only executed under [`DEBUG_KNOCK`]. See [`build_reboot_cdb`].
Reboot = 0x0F,
}
+3 -4
View File
@@ -115,10 +115,9 @@ fn build_call_and_poke_cdb_exact_bytes() {
build_poke_cdb(0x0200_0E40, 0xAA),
[0x3C, 0x0E, 0xDE, 0xB9, 0x0D, 0x02, 0x00, 0x0E, 0x40, 0xAA]
);
// Reboot: verb 0x0F at cdb[4], DEBUG_KNOCK at cdb[2..4], no on-wire target/arg
// (the boot-function-entry VA is baked into the emitted handler at build time).
// Alloc floors at MIN_ALLOC_LEN (0x0040 big-endian at cdb[7..9]) so the drive
// does not abort the data-in before the verb executes.
// Reboot: verb 0x0F at cdb[4], DEBUG_KNOCK at cdb[2..4], no on-wire target
// (the boot-entry VA is baked into the handler at build time). Alloc floors
// at MIN_ALLOC_LEN (0x0040 at cdb[7..9]) so the data-in is not aborted.
assert_eq!(
build_reboot_cdb(),
[0x3C, 0x0E, 0xDE, 0xB9, 0x0F, 0x00, 0x00, 0x00, 0x40, 0x00]
+2 -3
View File
@@ -197,9 +197,8 @@ impl FreemkvUnlocker {
best_effort(self.set(scsi, Feature::Region, REGION_FREE), "region")?;
best_effort(self.set(scsi, Feature::Speed, SPEED_MAX), "speed")?;
// Encryption = off (LOAD-BEARING): the consolidated cert/bus bypass —
// drive acts pre-authenticated (so a bare 0xAD returns the VID with no
// cert/AKE) AND content returns de-bussed. No fallback. The old
// separate Bus lever (wire id 0x07) is retired.
// drive acts pre-authenticated (bare 0xAD returns the VID with no
// cert/AKE) AND content returns de-bussed. No fallback.
match self.set(scsi, Feature::Encryption, STATE_OFF) {
Ok(()) => {}
Err(UnlockError::Transport) => return Err(UnlockError::Transport),