mirror of
https://github.com/freemkv/freemkv-unlock.git
synced 2026-10-07 18:13:11 +00:00
freemkv: trim bus-off comment blocks to comment-guard caps
This commit is contained in:
+9
-13
@@ -258,10 +258,9 @@ impl FreemkvUnlocker {
|
|||||||
self.send_state(scsi, subfn::RAW_READ, RAW_READ_CERT_VALID)
|
self.send_state(scsi, subfn::RAW_READ, RAW_READ_CERT_VALID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Raw Read (subfn 0x04) in RAW_READ_DATA_CLEAR (0x03) mode: remove AACS
|
// Raw Read (subfn 0x04) mode 0x03 "data clear": remove AACS in-transit bus
|
||||||
// in-transit BUS encryption so content READ(10) returns the AACS-at-rest
|
// encryption so content READ(10) returns at-rest bytes unwrapped. Best-effort
|
||||||
// bytes unwrapped (the host applies title keys). Issued best-effort as the
|
// trailing step of full_unlock; inert without the 04 03 firmware lever.
|
||||||
// trailing step of full_unlock; inert on firmware without the 04 03 lever.
|
|
||||||
fn set_bus_off(&self, scsi: &mut dyn ScsiTransport) -> std::result::Result<(), UnlockError> {
|
fn set_bus_off(&self, scsi: &mut dyn ScsiTransport) -> std::result::Result<(), UnlockError> {
|
||||||
self.send_state(scsi, subfn::RAW_READ, RAW_READ_DATA_CLEAR)
|
self.send_state(scsi, subfn::RAW_READ, RAW_READ_DATA_CLEAR)
|
||||||
}
|
}
|
||||||
@@ -289,10 +288,9 @@ impl FreemkvUnlocker {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Full freemkv unlock sequence: 01 Identity (hard gate) → 03 Region → 02 Speed
|
// Full freemkv unlock: 01 Identity (hard gate) → 03 Region → 02 Speed (best-
|
||||||
// (best-effort) → 04 01 Raw Read → bare 0xAD VID (both load-bearing, no
|
// effort) → 04 01 Raw Read → bare 0xAD VID (load-bearing) → 04 03 bus-off
|
||||||
// fallback) → 04 03 bus-off (trailing, fully best-effort). See
|
// (trailing, best-effort). See docs/freemkv-abi.md for failure-mode semantics.
|
||||||
// docs/freemkv-abi.md for full failure-mode semantics.
|
|
||||||
fn full_unlock(
|
fn full_unlock(
|
||||||
&self,
|
&self,
|
||||||
scsi: &mut dyn ScsiTransport,
|
scsi: &mut dyn ScsiTransport,
|
||||||
@@ -341,11 +339,9 @@ impl FreemkvUnlocker {
|
|||||||
// LD/Renesas routes). Raw Read already unlocked the drive, so a VID miss
|
// LD/Renesas routes). Raw Read already unlocked the drive, so a VID miss
|
||||||
// must not discard it: only a dead bus propagates (`?`), else `None`.
|
// must not discard it: only a dead bus propagates (`?`), else `None`.
|
||||||
let vid = crate::vid::read_aacs_vid(scsi)?;
|
let vid = crate::vid::read_aacs_vid(scsi)?;
|
||||||
// 04 03 — Data Clear / bus-off: remove in-transit bus encryption so
|
// 04 03 bus-off (trailing, repurposes flag[0x04] after the VID read):
|
||||||
// subsequent content READ(10)s return AACS-at-rest bytes unwrapped.
|
// remove in-transit bus encryption. FULLY best-effort — inert without the
|
||||||
// Trailing (it repurposes flag[0x04] after the VID read) and FULLY
|
// lever, and a failure here never discards an already-obtained unlock.
|
||||||
// best-effort — inert on firmware lacking the 04 03 lever, and a failure
|
|
||||||
// here (even a bus fault) must never discard an already-obtained unlock.
|
|
||||||
if let Err(e) = self.set_bus_off(scsi) {
|
if let Err(e) = self.set_bus_off(scsi) {
|
||||||
tracing::debug!(
|
tracing::debug!(
|
||||||
target: "freemkv::disc",
|
target: "freemkv::disc",
|
||||||
|
|||||||
Reference in New Issue
Block a user