On Sun, Feb 08, 2026 at 12:18:40PM +0100, Matthieu Herrb wrote:
> On Sun, Feb 08, 2026 at 10:40:53AM +0100, Matthieu Herrb wrote:
> > Hi,
> > 
> > while upgrading my X40 from 7.8 to -current, I found that the kernel
> > from current snapshots panic on boot. here's an AI powered transcript
> > of the screen shot (I did proof read it, it looks like it is correct):
> > 
> > 0x1014), c1(@1 halt()), PSS
> > acpipwrres0 at acpi0: PUBS, resource for USB0, USB1, USB7
> > acpitz0 at acpi0
> > acpitz0: critical temperature is 95 degC
> > panic: pci_make_tag: bad request
> > Stopped at      db_enter+0x4:     popl    %ebp
> > TID    PID     UID     PRFLAGS PFLAGS    CPU     COMMAND
> > * 0     0       0       0x10000  0x200   0       swapper
> > db_enter(d1264a7c,d0f10565,1,2,d1264a80) at db_enter+0x4
> > panic(d0d1a60b,0,d1264b10,d0949fb3,0) at panic+0x76
> > pci_make_tag(0,c7,84,d0a0) at pci_make_tag+0x93
> > aml_rdpciaddr(d3dd9704,d1264b20) at aml_rdpciaddr+0x173
> > acpi_found(d3ddc744,d3d94800,d0a0d9b0,0,d3ddc744) at acpi_found+0xb7
> > aml_walknodes(d3ddc744,0,d0a0d9b0,d3d94800,d0a0d9b0) at aml_walknodes+0x65
> > aml_walknodes(d3ddc784,0,d0a0d9b0,d3d94800,d0a0d9b0) at aml_walknodes+0x39
> > aml_walknodes(d3dd9704,0,d0a0d9b0,d3d94800,d0a0d9b0) at aml_walknodes+0x39
> > aml_walknodes(d3db8584,0,d0a0d9b0,d3d94800,d0a0d9b0) at aml_walknodes+0x39
> > aml_walknodes(d3d9c504,0,d0a0d9b0,d3d94800,0) at aml_walknodes+0x39
> > aml_walknodes(d103c23c,0,d0a0d9b0,d3d94800) at aml_walknodes+0x39
> > acpi_attach_common(d3d94800,f6f90) at acpi_attach_common+0x663
> > acpi_attach(d3d9c000,d3d94800,d1264dd8) at acpi_attach+0x2c
> > config_attach(d3d9c000,d0f200b4,d1264dd8,d07e40c0) at config_attach+0x188
> > https://www.openbsd.org/ddb.html describes the minimum info required in bug
> > reports. Insufficient info makes it difficult to find and fix bugs.
> > ddb>
> > 
> 
> Reverting the following commit makes the machine boot fine.
> 
> commit 0c90e2b526b26d9f50dde7f7712cec107cda3326
> Author: jcs <[email protected]>
> Date:   Sun Nov 23 19:56:24 2025 +0000
> 
>     Make aml_rdpciaddr work better through PCI bridges
>     
>     When looking up the address of a PCI device from which to read for
>     an opregion, walk from the root inward and each time a PCI bridge is
>     encountered, read its bus info register and note its bus id.
>     
>     Previously we were walking outward from the device and only changing
>     buses if there was a _BBN node which is not always the case.
>     
>     This should fix booting of late Intel Macs which have AML that tries
>     to read the PCI class of the SSD after powering up the PCI port in
>     its _PS0 method, waiting in a loop for it to read 1 (Mass Storage).
>     Since we were previously reading the PCI class of the bridge instead
>     and always getting 6, this loop would have to timeout which took
>     many minutes.  Now we are properly reading from the device itself
>     which is on a different bus, and the PCI class reads correctly.
>     
>     feedback from miod
>     ok kettenis

the initial paths don't have _ADR and aren't pci devices

aml_nodename on the nodes that take the path in the diff shows
\\ and \\_SB_

for example:
path[0] = \\_SB_.PCI0.IDE0
path[1] = \\_SB_.PCI0
path[2] = \\_SB_
path[3] = \\

where n starts at 3

Index: sys/dev/acpi/dsdt.c
===================================================================
RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
diff -u -p -r1.278 dsdt.c
--- sys/dev/acpi/dsdt.c 19 Jan 2026 20:37:46 -0000      1.278
+++ sys/dev/acpi/dsdt.c 9 Feb 2026 01:06:55 -0000
@@ -2387,7 +2387,8 @@ aml_rdpciaddr(struct aml_node *pcidev, u
                                addr->dev = 0;
                                addr->fun = 0;
                        }
-               }
+               } else
+                       continue;
 
                if (n == 0)
                        break;

Reply via email to