> Date: Mon, 20 Dec 2021 15:10:42 +0100
> From: Anton Lindqvist <an...@basename.se>
> 
> On Mon, Dec 20, 2021 at 01:19:54PM +0000, cipher-hea...@riseup.net wrote:
> > I booted into bsd.rd to grep in /var/log/messages when I last ran 
> > sysupgrade:
> > 
> > Dec 19 22:11:48 0 sysupgrade: installed new /bsd.upgrade. Old kernel 
> > version: OpenBSD 7.0-current (GENERIC.MP) #135: Tue Nov 30 17:39:34 MST 
> > 2021     
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > Dec  1 20:17:52 0 sysupgrade: installed new /bsd.upgrade. Old kernel 
> > version: OpenBSD 7.0-current (GENERIC.MP) #106: Fri Nov 19 10:43:11 MST 
> > 2021     
> > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> > 
> > Below is the error message at boot, typed manually, and double-checked
> > (omitted the file system checks before wd0e which were all clean, and the
> > generic instructions after 'dbb.html describes')
> > 
> > --------------------------------------------------------------------------------
> > 
> > dev/wd0e (afcec7a171c4b011.e): file system is clean; not checking
> > uvm_fault(0xfffffd807eaa7220, 0x0, 0, 1) -> e
> > kernel: page fault trap, code=0
> > Stopped at      comopen+0x710:  movq     0(%rax),%r11
> >     TID     PID     UID     PRFLAGS         PFLAGS  CPU     COMMAND
> > *189345             37957   0       0x3             0       2K      ttyflags
> > comopen(800,5,2000,ffff8000fffeed20) at comopen+0x710
> > spec_open(ffff800042489638) at spec_open+0xd6
> > VOP_OPEN(fffffd806e86f568,5,fffffd807ee7af00,ffff8000fffeed20) at 
> > VOP_OPEN+0x53
> > vn_open(ffff800042489850,5,0) at vn_open+0x271
> > doopenat(ffff8000fffeed20,ffffff9c,7f7ffffe2bd0,4,0,ffff800042489a20) at 
> > doopenat+0x1cd
> > syscall(ffff800042489a90) at syscall+0x374
> > Xsyscall() at Xsyscall+0x128
> > end of kernel
> > end trace frame: 0x7f7ffffe2bc0, count: 8
> > https://www.openbsd.org/dbb.html describes...
> > ...
> > ddb{2}> 
> 
> Probably caused by the recent change to attach com over acpi. Looking at
> your disassembled acpi tables, I see two com devices which lacks a
> corresponding _PRS node:
> 
> 
>       Device (UAR1)
>       {
>               Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial 
> Port */)  // _HID: Hardware ID
>               Name (_UID, One)  // _UID: Unique ID
>       }
>       Device (UAR2)
>       {
>               Name (_HID, EisaId ("PNP0501") /* 16550A-compatible COM Serial 
> Port */)  // _HID: Hardware ID
>               Name (_UID, 0x02)  // _UID: Unique ID
>       }
> 
> It think we're better of doing the sanity check during match and not
> attach. This will hopefully cause com to attach over isa as seen in your
> old dmesg.

So ok kettenis@ on that diff

> diff --git sys/dev/acpi/com_acpi.c sys/dev/acpi/com_acpi.c
> index 12e61288181..eeda6a82bef 100644
> --- sys/dev/acpi/com_acpi.c
> +++ sys/dev/acpi/com_acpi.c
> @@ -63,6 +63,8 @@ com_acpi_match(struct device *parent, void *match, void 
> *aux)
>       struct acpi_attach_args *aaa = aux;
>       struct cfdata *cf = match;
>  
> +     if (aaa->aaa_naddr < 1 || aaa->aaa_nirq < 1)
> +             return 0;
>       return acpi_matchhids(aaa, com_hids, cf->cf_driver->cd_name);
>  }
>  
> @@ -77,16 +79,6 @@ com_acpi_attach(struct device *parent, struct device 
> *self, void *aux)
>       sc->sc_node = aaa->aaa_node;
>       printf(" %s", sc->sc_node->name);
>  
> -     if (aaa->aaa_naddr < 1) {
> -             printf(": no registers\n");
> -             return;
> -     }
> -
> -     if (aaa->aaa_nirq < 1) {
> -             printf(": no interrupt\n");
> -             return;
> -     }
> -
>       printf(" addr 0x%llx/0x%llx", aaa->aaa_addr[0], aaa->aaa_size[0]);
>       printf(" irq %d", aaa->aaa_irq[0]);
>  
> 
> 

Reply via email to