From: Timo Myyrä Subject: Re: ahci(4): Disable PMP for AMD AHCI controler To: Jan Klemkow Cc: Mike Larkin , Jonathan Matthew , tech@openbsd.org Date: Fri, 24 Jul 2026 12:17:37 +0300 On Fri, Jul 24 2026, Jan Klemkow wrote: > On Thu, Jul 23, 2026 at 08:52:21PM -0700, Mike Larkin wrote: >> On Thu, Jul 23, 2026 at 08:50:09PM -0700, Mike Larkin wrote: >> > On Tue, Jul 21, 2026 at 02:32:46PM +0200, Jan Klemkow wrote: >> > > On Tue, Jul 21, 2026 at 05:02:04AM -0700, Mike Larkin wrote: >> > > > On Tue, Jul 21, 2026 at 09:39:22AM +0200, Jan Klemkow wrote: >> > > > > On Tue, Jul 21, 2026 at 09:55:50AM +1000, Jonathan Matthew wrote: >> > > > > > On Mon, Jul 20, 2026 at 08:17:33PM +0200, Jan Klemkow wrote: >> > > > > > > The AMD AHCI controller advertises port multiplier support but probing >> > > > > > > for a PMP on each port costs 10 seconds of timeouts per disk at attach >> > > > > > > time. We should disable it, like we do it for Intel. >> > > > > > >> > > > > > What systems does this controller appear in? >> > > > > >> > > > > ASRock Rack TURIND8-2L2T mainboard with an AMD EPYC 9115 processor. >> > > > > I'm not sure in which component contains the SATA controller. >> > > > > >> > > > > > Do you know if port multipliers actually work with it? >> > > > > >> > > > > No, I don't have hardware to test the SATA port multiplier function. >> > > > > Do you know what I would need to test it? >> > > > > >> > > > >> > > > I think I have one of these on my EPYC 7773X ASUS machine. Please hold off >> > > > until I have a chance to test cos that's got all my storage attached to it :) >> > > >> > > Could you also check on your machine, if it hangs for 10s for every port >> > > at this attach stage? >> > > >> > > ahci2 at pci15 dev 0 function 0 "AMD FCH AHCI" rev 0x93: msi, AHCI 1.3.1 >> > > ahci2: port 0: 6.0Gb/s >> > > ahci2: port 1: 6.0Gb/s >> > > ahci2: port 2: 6.0Gb/s >> > > ahci2: port 3: 6.0Gb/s >> > >> > With this diff none of my ahci* attach. >> > >> > Without the diff, it does take 10s between attaches, but at least it works. >> >> I guess technically I should say: >> >> "no sd* on ahci* attaches" >> >> The ahci does attach but it just immediately skips every sd(4) as if nothing is >> present. > > Thanks for testing Mike! > > I thought the PMP feature were outdated and obsolete. So, the right > solution is to fix the PMP attachment algorithm. > > Which hardware do you use in this setup? Which Mainboard and how are > your disks being connected to you mainboard? Do you have a special > backplane for the disks in you case? Or do you use a special sata > controller? Can you send me a dmesg of you storage system? > > Thanks, > Jan I'll hijack this a bit, I quickly tested this on my Lenovo E485 laptop and seemed to hit same issue that sd* attached during boot. The boot process stops to think at ahci step for a while so improvement to it would be welcome. Here's current dmesg from this laptop. timo OpenBSD 8.0-beta (GENERIC.MP) #48: Mon Jul 20 11:32:13 MDT 2026 deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP real mem = 16733204480 (15958MB) avail mem = 16202395648 (15451MB) random: good seed from bootblocks mpath0 at root scsibus0 at mpath0: 256 targets mainbus0 at root bios0 at mainbus0: SMBIOS rev. 3.1 @ 0x986eb000 (62 entries) bios0: vendor LENOVO version "R0UET81W (1.61 )" date 03/17/2022 bios0: LENOVO 20KUCTO1WW efi0 at bios0: UEFI 2.6 efi0: Lenovo rev 0x1610 acpi0 at bios0: ACPI 5.0 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP SSDT SSDT CRAT CDIT SSDT TPM2 UEFI MSDM BATB HPET APIC MCFG SBST WSMT VFCT IVRS FPDT SSDT SSDT SSDT BGRT UEFI SSDT acpi0: wakeup devices GPP0(S3) GPP1(S3) GPP2(S3) GPP3(S3) GPP4(S3) GPP5(S3) GPP6(S3) GP17(S3) XHC0(S3) XHC1(S3) GP18(S3) LID_(S3) SLPB(S3) acpitimer0 at acpi0: 3579545 Hz, 32 bits acpihpet0 at acpi0: 14318180 Hz acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.00 MHz, 17-11-00, patch 0810100b cpu0: cpuid 1 edx=178bfbff ecx=76d8320b cpu0: cpuid 6 eax=4 ecx=1 cpu0: cpuid 7.0 ebx=209c01a9 cpu0: cpuid d.1 eax=f cpu0: cpuid 80000001 edx=2fd3fbff ecx=35c233ff cpu0: cpuid 80000007 edx=6599 cpu0: cpuid 80000008 ebx=1007 cpu0: cpuid 8000001F eax=f ecx=f cpu0: 32KB 64b/line 8-way D-cache, 64KB 64b/line 4-way I-cache, 512KB 64b/line 8-way L2 cache, 4MB 64b/line 16-way L3 cache cpu0: smt 0, core 0, package 0, type P mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges cpu0: apic clock running at 25MHz cpu0: mwait min=64, max=64, C-substates=1.1, IBE cpu1 at mainbus0: apid 1 (application processor) cpu1: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.00 MHz, 17-11-00, patch 0810100b cpu1: smt 1, core 0, package 0, type SP tsc: cpu0/cpu1: sync test failed timecounter: active counter changed: tsc -> acpihpet0 cpu2 at mainbus0: apid 2 (application processor) cpu2: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.00 MHz, 17-11-00, patch 0810100b cpu2: smt 0, core 1, package 0, type P cpu3 at mainbus0: apid 3 (application processor) cpu3: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.01 MHz, 17-11-00, patch 0810100b cpu3: smt 1, core 1, package 0, type SP cpu4 at mainbus0: apid 4 (application processor) cpu4: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.00 MHz, 17-11-00, patch 0810100b cpu4: smt 0, core 2, package 0, type P cpu5 at mainbus0: apid 5 (application processor) cpu5: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.01 MHz, 17-11-00, patch 0810100b cpu5: smt 1, core 2, package 0, type SP cpu6 at mainbus0: apid 6 (application processor) cpu6: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.00 MHz, 17-11-00, patch 0810100b cpu6: smt 0, core 3, package 0, type P cpu7 at mainbus0: apid 7 (application processor) cpu7: AMD Ryzen 5 2500U with Radeon Vega Mobile Gfx, 2000.01 MHz, 17-11-00, patch 0810100b cpu7: smt 1, core 3, package 0, type SP ioapic0 at mainbus0: apid 32 pa 0xfec00000, version 21, 24 pins, can't remap ioapic1 at mainbus0: apid 33 pa 0xfec01000, version 21, 32 pins, can't remap acpimcfg0 at acpi0 acpimcfg0: addr 0xf8000000, bus 0-63 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus 1 (GPP0) acpiprt2 at acpi0: bus 2 (GPP1) acpiprt3 at acpi0: bus 3 (GPP2) acpiprt4 at acpi0: bus -1 (GPP3) acpiprt5 at acpi0: bus -1 (GPP4) acpiprt6 at acpi0: bus 4 (GPP5) acpiprt7 at acpi0: bus -1 (GPP6) acpiprt8 at acpi0: bus 5 (GP17) acpiprt9 at acpi0: bus 6 (GP18) acpiec0 at acpi0 acpibtn0 at acpi0: PWRB acpipci0 at acpi0 PCI0: 0x00000010 0x00000011 0x00000000 acpicmos0 at acpi0 acpibat0 at acpi0: BAT0 model "5810W138" serial 13057 type LION oem "SMP" acpiac0 at acpi0: AC unit online acpithinkpad0 at acpi0: version 2.0 "LEN0071" at acpi0 not configured "LEN2060" at acpi0 not configured "SMB0001" at acpi0 not configured acpibtn1 at acpi0: LID_(wakeup) acpibtn2 at acpi0: SLPB(wakeup) "PNP0C14" at acpi0 not configured "PNP0C14" at acpi0 not configured "PNP0C14" at acpi0 not configured tpm0 at acpi0 TPM_ 2.0 (TIS) addr 0xfed40000/0x5000, device 0x0000104a rev 0x4e "USBC000" at acpi0 not configured acpicpu0 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu1 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu2 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu3 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu4 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu5 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu6 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpicpu7 at acpi0: C2(0@400 io@0x414), C1(0@1 mwait), PSS acpipwrres0 at acpi0: P0ST, resource for SATA acpipwrres1 at acpi0: P3ST, resource for SATA acpivideo0 at acpi0: VGA_ acpivout0 at acpivideo0: LCD_ cpu0: 2000 MHz: speeds: 2000 1700 1600 MHz pci0 at mainbus0 bus 0 ksmn0 at pci0 dev 0 function 0 "AMD 17h/1xh Root Complex" rev 0x00 "AMD 17h/1xh IOMMU" rev 0x00 at pci0 dev 0 function 2 not configured pchb0 at pci0 dev 1 function 0 "AMD 17h PCIE" rev 0x00 ppb0 at pci0 dev 1 function 1 "AMD 17h/1xh PCIE" rev 0x00: msi pci1 at ppb0 bus 1 nvme0 at pci1 dev 0 function 0 "Lenovo NVMe" rev 0x00: msix, NVMe 1.2 nvme0: LENSE20256GMSP34MEAT2TA, firmware 2.6.8341, serial 1227066205564 scsibus1 at nvme0: 2 targets, initiator 0 sd0 at scsibus1 targ 1 lun 0: sd0: 244198MB, 512 bytes/sector, 500118192 sectors ppb1 at pci0 dev 1 function 2 "AMD 17h/1xh PCIE" rev 0x00: msi pci2 at ppb1 bus 2 re0 at pci2 dev 0 function 0 "Realtek 8168" rev 0x10: RTL8168GU/8111GU (0x5080), msi, address e8:6a:64:33:83:cc rgephy0 at re0 phy 7: RTL8251, rev. 0 ppb2 at pci0 dev 1 function 3 "AMD 17h/1xh PCIE" rev 0x00: msi pci3 at ppb2 bus 3 sdhc0 at pci3 dev 0 function 0 "O2 Micro 0Z8621 SD/MMC" rev 0x01: msi sdhc0: SDHC 4.00, 50 MHz base clock sdmmc0 at sdhc0: 4-bit, sd high-speed, mmc high-speed, ddr52, dma ppb3 at pci0 dev 1 function 6 "AMD 17h/1xh PCIE" rev 0x00: msi pci4 at ppb3 bus 4 iwm0 at pci4 dev 0 function 0 "Intel Dual Band Wireless-AC 8265" rev 0x78, msi pchb1 at pci0 dev 8 function 0 "AMD 17h PCIE" rev 0x00 ppb4 at pci0 dev 8 function 1 "AMD 17h/1xh PCIE" rev 0x00 pci5 at ppb4 bus 5 amdgpu0 at pci5 dev 0 function 0 "ATI Radeon Vega" rev 0xc4 drm0 at amdgpu0 amdgpu0: msi azalia0 at pci5 dev 0 function 1 "ATI Radeon Vega HD Audio" rev 0x00: msi azalia0: no supported codecs ccp0 at pci5 dev 0 function 2 "AMD 17h/1xh Crypto" rev 0x00 xhci0 at pci5 dev 0 function 3 "AMD 17h/1xh xHCI" rev 0x00: msix, xHCI 1.10 usb0 at xhci0: USB revision 3.0 uhub0 at usb0 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 addr 1 xhci1 at pci5 dev 0 function 4 "AMD 17h/1xh xHCI" rev 0x00: msix, xHCI 1.10 usb1 at xhci1: USB revision 3.0 uhub1 at usb1 configuration 1 interface 0 "AMD xHCI root hub" rev 3.00/1.00 addr 1 azalia1 at pci5 dev 0 function 6 "AMD 17h/1xh HD Audio" rev 0x00: msi azalia1: codecs: Conexant/0x5111 audio0 at azalia1 ppb5 at pci0 dev 8 function 2 "AMD 17h/1xh PCIE" rev 0x00 pci6 at ppb5 bus 6 ahci0 at pci6 dev 0 function 0 "AMD FCH AHCI" rev 0x61: msi, AHCI 1.3.1 ahci0: port 0: 6.0Gb/s scsibus2 at ahci0: 32 targets sd1 at scsibus2 targ 0 lun 0: naa.50025388400c34c6 sd1: 488386MB, 512 bytes/sector, 1000215216 sectors, thin piixpm0 at pci0 dev 20 function 0 "AMD FCH SMBus" rev 0x61: SMI iic0 at piixpm0 admtemp0 at iic0 addr 0x18: Xeon admtemp1 at iic0 addr 0x1a: Xeon spdmem0 at iic0 addr 0x50: 8GB DDR4 SDRAM PC4-19200 SO-DIMM with thermal sensor spdmem1 at iic0 addr 0x52: 8GB DDR4 SDRAM PC4-19200 SO-DIMM with thermal sensor iic1 at piixpm0 pcib0 at pci0 dev 20 function 3 "AMD FCH LPC" rev 0x51 pchb2 at pci0 dev 24 function 0 "AMD 17h/1xh Data Fabric" rev 0x00 pchb3 at pci0 dev 24 function 1 "AMD 17h/1xh Data Fabric" rev 0x00 pchb4 at pci0 dev 24 function 2 "AMD 17h/1xh Data Fabric" rev 0x00 pchb5 at pci0 dev 24 function 3 "AMD 17h/1xh Data Fabric" rev 0x00 pchb6 at pci0 dev 24 function 4 "AMD 17h/1xh Data Fabric" rev 0x00 pchb7 at pci0 dev 24 function 5 "AMD 17h/1xh Data Fabric" rev 0x00 pchb8 at pci0 dev 24 function 6 "AMD 17h/1xh Data Fabric" rev 0x00 pchb9 at pci0 dev 24 function 7 "AMD 17h/1xh Data Fabric" rev 0x00 isa0 at pcib0 isadma0 at isa0 pckbc0 at isa0 port 0x60/5 irq 1 irq 12 pckbd0 at pckbc0 (kbd slot) wskbd0 at pckbd0: console keyboard pms0 at pckbc0 (aux slot) wsmouse0 at pms0 mux 0 wsmouse1 at pms0 mux 0 pms0: Synaptics clickpad, firmware 8.16, 0x1e2b1 0x940300 0x373740 0xf016a3 0x12e800 pcppi0 at isa0 port 0x61 spkr0 at pcppi0 vmm0 at mainbus0: SVM/RVI efifb at mainbus0 not configured iwm0: restrict all mbufs to low memory vscsi0 at root scsibus3 at vscsi0: 256 targets softraid0 at root scsibus4 at softraid0: 256 targets sd2 at scsibus4 targ 1 lun 0: sd2: 227678MB, 512 bytes/sector, 466284711 sectors root on sd2a (88532b67c09ce3ee.a) swap on sd2b dump on sd2b iwm0: hw rev 0x230, fw ver 36.ca7b901d.0, address 68:ec:c5:ad:9a:cb amdgpu0: RAVEN GC 9.1.0 8 CU rev 0x01 amdgpu0: 1920x1080, 32bpp wsdisplay0 at amdgpu0 mux 1: console (std, vt100 emulation), using wskbd0 wsdisplay0: screen 1-5 added (std, vt100 emulation) uhidev0 at uhub0 port 2 configuration 1 interface 0 "Kensington Kensington Slimblade Trackball" rev 2.00/1.00 addr 2 uhidev0: iclass 3/1 ums0 at uhidev0: 4 buttons, Z dir wsmouse2 at ums0 mux 0 uhub0: device problem, disabling port 1 uhub2 at uhub0 port 1 configuration 1 interface 0 "Texas Instruments product 0x8442" rev 2.10/1.00 addr 3 uhidev1 at uhub2 port 3 configuration 1 interface 0 "Keyboardio Atreus" rev 1.10/0.00 addr 4 uhidev1: iclass 3/1 ukbd0 at uhidev1: 8 variable keys, 6 key codes wskbd1 at ukbd0 mux 1 wskbd1: connecting to wsdisplay0 uhidev2 at uhub2 port 3 configuration 1 interface 1 "Keyboardio Atreus" rev 1.10/0.00 addr 4 uhidev2: iclass 3/0, 5 report ids ums1 at uhidev2 reportid 2: 5 buttons, Z and W dir wsmouse3 at ums1 mux 0 uhid0 at uhidev2 reportid 3: input=2, output=0, feature=0 ucc0 at uhidev2 reportid 4: 672 usages, 20 keys, array wskbd2 at ucc0 mux 1 wskbd2: connecting to wsdisplay0 ukbd1 at uhidev2 reportid 5: 128 variable keys, 0 key codes wskbd3 at ukbd1 mux 1 wskbd3: connecting to wsdisplay0 uhidev3 at uhub2 port 3 configuration 1 interface 2 "Keyboardio Atreus" rev 1.10/0.00 addr 4 uhidev3: iclass 3/0 uhid1 at uhidev3: input=32, output=32, feature=0 uhidev4 at uhub2 port 5 configuration 1 interface 0 "Texas Instruments product 0x82ff" rev 2.01/2.00 addr 5 uhidev4: iclass 3/0 uhid2 at uhidev4: input=1027, output=1028, feature=2 uaudio0 at uhub2 port 4 configuration 1 interface 1 "HIFIMAN HIFIMAN-EF500" rev 2.00/2.01 addr 6 uaudio0: class v2, high-speed, async, channels: 2 play, 0 rec, 3 ctls audio1 at uaudio0 uaudio0: sync play xfer, err = 6