mirror of
https://github.com/freemkv/freemkv-unlock.git
synced 2026-10-07 18:13:11 +00:00
style: trim three comment blocks under the central guard caps
This commit is contained in:
+6
-8
@@ -184,14 +184,12 @@ pub enum Verb {
|
|||||||
Poke = 0x0D,
|
Poke = 0x0D,
|
||||||
/// **Debug-knock only.** Invokes the firmware's boot function entry with
|
/// **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
|
/// 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
|
/// post-init), recovering a wedged drive without a power cycle. The target
|
||||||
/// (SCSI target briefly returns Aborted Command mid-reboot, then comes
|
/// briefly returns Aborted Command mid-reboot, then comes back ~5s later
|
||||||
/// back ~5s later; the safe-knock verb chain is re-armed to its power-on
|
/// with the safe-knock verb chain re-armed to its power-on defaults. The
|
||||||
/// defaults). The target VA is baked into the emitted handler at build
|
/// target VA is baked into the handler at build time, so no CDB arguments
|
||||||
/// time (resolved from the boot-init signature = `boot_init_site - 0x10`),
|
/// are carried beyond the verb byte. Refused under the safe [`KNOCK`];
|
||||||
/// so no CDB arguments are carried beyond the verb byte. Refused under
|
/// only executed under [`DEBUG_KNOCK`]. See [`build_reboot_cdb`].
|
||||||
/// the safe [`KNOCK`]; only executed under [`DEBUG_KNOCK`]. See
|
|
||||||
/// [`build_reboot_cdb`].
|
|
||||||
Reboot = 0x0F,
|
Reboot = 0x0F,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,10 +115,9 @@ fn build_call_and_poke_cdb_exact_bytes() {
|
|||||||
build_poke_cdb(0x0200_0E40, 0xAA),
|
build_poke_cdb(0x0200_0E40, 0xAA),
|
||||||
[0x3C, 0x0E, 0xDE, 0xB9, 0x0D, 0x02, 0x00, 0x0E, 0x40, 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
|
// Reboot: verb 0x0F at cdb[4], DEBUG_KNOCK at cdb[2..4], no on-wire target
|
||||||
// (the boot-function-entry VA is baked into the emitted handler at build time).
|
// (the boot-entry VA is baked into the handler at build time). Alloc floors
|
||||||
// Alloc floors at MIN_ALLOC_LEN (0x0040 big-endian at cdb[7..9]) so the drive
|
// at MIN_ALLOC_LEN (0x0040 at cdb[7..9]) so the data-in is not aborted.
|
||||||
// does not abort the data-in before the verb executes.
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
build_reboot_cdb(),
|
build_reboot_cdb(),
|
||||||
[0x3C, 0x0E, 0xDE, 0xB9, 0x0F, 0x00, 0x00, 0x00, 0x40, 0x00]
|
[0x3C, 0x0E, 0xDE, 0xB9, 0x0F, 0x00, 0x00, 0x00, 0x40, 0x00]
|
||||||
|
|||||||
+2
-3
@@ -197,9 +197,8 @@ impl FreemkvUnlocker {
|
|||||||
best_effort(self.set(scsi, Feature::Region, REGION_FREE), "region")?;
|
best_effort(self.set(scsi, Feature::Region, REGION_FREE), "region")?;
|
||||||
best_effort(self.set(scsi, Feature::Speed, SPEED_MAX), "speed")?;
|
best_effort(self.set(scsi, Feature::Speed, SPEED_MAX), "speed")?;
|
||||||
// Encryption = off (LOAD-BEARING): the consolidated cert/bus bypass —
|
// Encryption = off (LOAD-BEARING): the consolidated cert/bus bypass —
|
||||||
// drive acts pre-authenticated (so a bare 0xAD returns the VID with no
|
// drive acts pre-authenticated (bare 0xAD returns the VID with no
|
||||||
// cert/AKE) AND content returns de-bussed. No fallback. The old
|
// cert/AKE) AND content returns de-bussed. No fallback.
|
||||||
// separate Bus lever (wire id 0x07) is retired.
|
|
||||||
match self.set(scsi, Feature::Encryption, STATE_OFF) {
|
match self.set(scsi, Feature::Encryption, STATE_OFF) {
|
||||||
Ok(()) => {}
|
Ok(()) => {}
|
||||||
Err(UnlockError::Transport) => return Err(UnlockError::Transport),
|
Err(UnlockError::Transport) => return Err(UnlockError::Transport),
|
||||||
|
|||||||
Reference in New Issue
Block a user