Skip to content

AppleAHCIPort: SATA drives on ICH10 AHCI disappear after soft reboot (Mac Pro 5,1, Sequoia) — root cause + fix #2538

@yoy123

Description

@yoy123

Summary

SATA drives connected to the ICH10 AHCI controller (PCI 00:1F.2, device-id 0x3a22) on Mac Pro 5,1 disappear after a soft reboot on macOS Sequoia. The drive only appears after a full shutdown + power-on or SMC reset.

I've identified the root cause chain in AppleAHCIPort and developed a working fix (2 kernel patches + 1 SSDT). Full details, source, and compiled SSDT are at: https://github.com/yoy123/mac-pro-sata-hotplug

Environment

  • Model: Mac Pro 5,1 (MacPro5,1)
  • macOS: Sequoia 15.x (Darwin 24.6.0, kernel 24.x)
  • OCLP: OpenCore Legacy Patcher
  • Drive: WD Red Plus 10TB (WDC WD101EFBX-68B0AN0) in optical bay, ICH10 Port 1
  • Controller: Intel ICH10 AHCI — PCI 00:1F.2, device-id 0x3a22, 6 ports

The secondary AHCI controller (0B:00.0) — which has native hot-plug capability — works fine. Only the ICH10 is affected.

Root Cause

The failure is a three-link chain:

1. No Hot-Plug Threads on ICH10 Ports

AppleAHCIPort checks an AHCI capability flag to decide whether to create hot-plug monitoring threads for each port. The ICH10's ports lack this flag, so no threads are created. This means the only chance for device detection is during the initial port enumeration at boot.

Disassembly (VA 0xb6b2):

testb  $0x44, 0x16d(%rbx)    ; check hot-plug capability bit
je     0xb700                 ; skip thread creation if not set

2. Stale SATA Link After Soft Reboot

The Mac Pro 5,1 does not fully cut SATA bus power during a soft reboot. The SATA PHY link remains established (PxSSTS DET=3) from the previous boot session.

3. Driver Skips COMRESET When Link Is Already Present

In EnablePortOperation, the driver:

  1. Calls SetFRE(true) — enables FIS Receive
  2. Calls WaitForLinkPresent() — finds DET=3 (stale link)
  3. Since link is present → skips HandleComReset() → goes to ScanForDevices()

But PxSIG (Port Signature register) still contains stale data from the previous session. ScanForDevices checks PxSIG — if it's not 0x00000101 (ATA) or 0xEB140101 (ATAPI), it silently skips CreateDevice(). No IOAHCIDevice is published, no disk appears.

Disassembly of EnablePortOperation (VA 0x475e):

callq  SetFRE(true)           ; 0x4734 — enable FIS Receive
callq  WaitForLinkPresent     ; 0x4742
xorb   $0x1, %al              ; 0x4747 — invert: 0 = link present
testb  $0x1, %al              ; 0x475c
je     0x4793                 ; 0x475e — if link present, SKIP HandleComReset
...
callq  HandleComReset         ; 0x4786 — only reached if NO link

After a cold boot, the drive sends a fresh D2H Register FIS during link establishment, populating PxSIG correctly. That's why cold boot always works.

The Fix (3 Components)

Component 1: SSDT — Break Stale SATA Link

An ACPI SSDT that runs at early boot (_INI) and takes ICH10 Port 1 offline (SCTL DET=4 → DET=0). This breaks the stale link so the driver finds no link and triggers its own HandleComReset().

The SSDT intentionally does not issue COMRESET itself — earlier versions (v1–v5) tried that but failed because FRE is off during ACPI init, so the drive's D2H FIS response was lost.

Component 2: Kernel Patch — Force Hot-Plug Thread Creation

NOP the je at VA 0xb6b2 so hot-plug threads are created on all ports regardless of capability flags.

Field Value
Identifier com.apple.driver.AppleAHCIPort
Find (base64) 9oNtAQAARHRG
Replace (base64) 9oNtAQAARJCQ
MinKernel 24.0.0
Count 1

Hex: F6836D010000 44 7446F6836D010000 44 9090

Component 3: Kernel Patch — Force HandleComReset

NOP the je at VA 0x475e so HandleComReset() always runs, even when WaitForLinkPresent() succeeds.

Field Value
Identifier com.apple.driver.AppleAHCIPort
Find (base64) qAF0M4uziAAAAA==
Replace (base64) qAGQkIuziAAAAA==
MinKernel 24.0.0
Count 1

Hex: A801 7433 8BB388000000A801 9090 8BB388000000

Testing

  • Verified working on Mac Pro 5,1 with WD Red Plus 10TB (WDC WD101EFBX-68B0AN0)
  • Drive appears reliably after sudo reboot (soft reboot)
  • Cold boot continues to work as before
  • No regressions observed on other SATA ports or the secondary AHCI controller

Affected Models

Primarily Mac Pro 5,1 (and likely Mac Pro 4,1 with firmware upgrade), as these use the ICH10 AHCI controller. Other Mac models using the same controller may also benefit. The issue is most visible with newer SATA drives that are stricter about initialization handshakes.

Suggested OCLP Integration

These patches could be added conditionally for ICH10-equipped Macs running Sequoia (kernel 24.x+). The kernel patch byte sequences are Sequoia-specific and would need to be verified for other macOS versions.

I'm happy to submit a PR if that would be helpful, or the OCLP team can integrate this however fits best with the existing patch infrastructure.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions