> Date: Wed, 17 Mar 2021 11:47:25 +0900 (JST)
> From: YASUOKA Masahiko <[email protected]>
>
> On Tue, 16 Mar 2021 16:03:27 -0700
> Rafael Ávila de Espíndola <[email protected]> wrote:
> > Patrick Wildt <[email protected]> writes:
> >
> >> Am Tue, Mar 16, 2021 at 03:25:46PM -0700 schrieb Rafael Ávila de Espíndola:
> >>>
> >>> Patrick Wildt <[email protected]> writes:
> >>>
> >>> > Am Tue, Mar 16, 2021 at 09:24:46AM -0700 schrieb Rafael Ávila de
> >>> > Espíndola:
> >>> >> Patrick Wildt <[email protected]> writes:
> >>> >>
> >>> >> > Am Tue, Mar 16, 2021 at 08:17:09AM -0700 schrieb Rafael Ávila de
> >>> >> > Espíndola:
> >>> >> >> Got the same error this morning after updating to MP#408.
> >>> >> >>
> >>> >> >> Cheers,
> >>> >> >> Rafael
> >>> >> >
> >>> >> > Is this a regression? Did 6.8 work and 6.9-beta broke it? Were you
> >>> >> > already following snapshots and switching from one snapshot to the
> >>> >> > other broke it?
> >>> >>
> >>> >> I was following snapshots, but not very frequently. The last one that I
> >>> >> was using without any problems was from Feb 15 (or at least that is
> >>> >> when
> >>> >> I got the "upgrade log" email).
> >>> >>
> >>> >> Cheers,
> >>> >> Rafael
> >>> >
> >>> > Can this be the cause? There have been only few changes in ACPI, and
> >>> > this definitely does some AML store thing:
> >>> >
> >>> > https://github.com/openbsd/src/commit/c1053d6a5a6ff0c23fa9cda5b6bd2d6feb9d82b6
> >>>
> >>> Yes, that is the one. A patch with
> >>> c1053d6a5a6ff0c23fa9cda5b6bd2d6feb9d82b6,
> >>> abe2aacc6845fd5ce80896a50e770d4116e9f80c and
> >>> 71a585ed804adbdd9d4eee13175b0812699dc34b reverted boots fine, but one
> >>> with just the last two reverted fails in the same way as the snapshot.
> >>>
> >>> Thanks,
> >>> Rafael
> >>>
> >>
> >> Wait, so which one is it?
> >
> > c1053d6a5a6ff0c23fa9cda5b6bd2d6feb9d82b6 is the one that causes the
> > problem.
>
> How about the following diff instead of reverting c1053d6a5a6ff0?
>
> Previous breaks if LocalX itself is an object reference.
ok kettenis@
> Index: sys/dev/acpi/dsdt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/acpi/dsdt.c,v
> retrieving revision 1.260
> diff -u -p -r1.260 dsdt.c
> --- sys/dev/acpi/dsdt.c 10 Mar 2021 22:20:44 -0000 1.260
> +++ sys/dev/acpi/dsdt.c 17 Mar 2021 02:42:36 -0000
> @@ -2961,10 +2961,13 @@ aml_store(struct aml_scope *scope, struc
> aml_rwfield(rhs, 0, rhs->v_field.bitlen, &tmp, ACPI_IOREAD);
> rhs = &tmp;
> }
> + /* Store to LocalX: free value */
> + if (lhs->stack >= AMLOP_LOCAL0 && lhs->stack <= AMLOP_LOCAL7)
> + aml_freevalue(lhs);
>
> lhs = aml_gettgt(lhs, AMLOP_STORE);
>
> - /* Store to LocalX: free value */
> + /* Store to LocalX: free value again */
> if (lhs->stack >= AMLOP_LOCAL0 && lhs->stack <= AMLOP_LOCAL7)
> aml_freevalue(lhs);
> switch (lhs->type) {
>
>