Date: Sat, 3 Dec 2016 22:10:58 +0100 From: Oliver Pinter <oliver.pinter@hardenedbsd.org> To: Hans Petter Selasky <hselasky@freebsd.org>, jkim@freebsd.org Cc: freebsd-acpi@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: svn commit: r309400 - head/sys/dev/acpica Message-ID: <CAPQ4ffuAnq8GxKpy%2Bp2dobOZS2p5NBAe64HpU2S%2BokWcnjh2Bg@mail.gmail.com> In-Reply-To: <CAPQ4ffsYKN2F4m99nFMuaj3F9_DhpwMPR5E%2Bpco2hZcHBcA1qQ@mail.gmail.com> References: <201612020821.uB28L8s2000195@repo.freebsd.org> <CAPQ4ffu38KhH2WkeV8H8uwX9BDKf_x2SuF36X-3cA4%2BJZ1XQWQ@mail.gmail.com> <CAPQ4fftNO3-kDh4BjYV0RBGDFftwtVUoyaeQse4aW9zennX1Bg@mail.gmail.com> <CAPQ4ffsYKN2F4m99nFMuaj3F9_DhpwMPR5E%2Bpco2hZcHBcA1qQ@mail.gmail.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Sat, Dec 3, 2016 at 9:58 PM, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote: > On 12/3/16, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote: >> On 12/3/16, Oliver Pinter <oliver.pinter@hardenedbsd.org> wrote: >>> On Fri, Dec 2, 2016 at 9:21 AM, Hans Petter Selasky >>> <hselasky@freebsd.org> wrote: >>>> Author: hselasky >>>> Date: Fri Dec 2 08:21:08 2016 >>>> New Revision: 309400 >>>> URL: https://svnweb.freebsd.org/changeset/base/309400 >>>> >>>> Log: >>>> Fix for endless recursion in the ACPI GPE handler during boot. >>>> >>>> When handling a GPE ACPI interrupt object the EcSpaceHandler() >>>> function can be called which checks the EC_EVENT_SCI bit and then >>>> recurse on the EcGpeQueryHandler() function. If there are multiple GPE >>>> events pending the EC_EVENT_SCI bit will be set at the next call to >>>> EcSpaceHandler() causing it to recurse again via the >>>> EcGpeQueryHandler() function. This leads to a slow never ending >>>> recursion during boot which prevents proper system startup, because >>>> the EC_EVENT_SCI bit never gets cleared in this scenario. >>>> >>>> The behaviour is reproducible with the ALASKA AMI in combination with >>>> a newer Skylake based mainboard in the following way: >>>> >>>> Enter BIOS and adjust the clock one hour forward. Save and exit the >>>> BIOS. System fails to boot due to the above mentioned bug in >>>> EcGpeQueryHandler() which was observed recursing multiple times. >>>> >>>> This patch adds a simple recursion guard to the EcGpeQueryHandler() >>>> function and also also adds logic to detect if new GPE events occurred >>>> during the execution of EcGpeQueryHandler() and then loop on this >>>> function instead of recursing. >>>> >>>> Reviewed by: jhb >>>> MFC after: 2 weeks >>>> >>>> Modified: >>>> head/sys/dev/acpica/acpi_ec.c >>> >>> >>> I have similar error since the latest BIOS update on my gigabyte >>> H170N-Wifi board. The curiosity of the BIOS update was after upgrading >>> to this version, there are no possibility to rollback to older >>> version. >>> >>> The other weird thing, is that MFCing back this patch does not help. I >>> get stucked lock in acmtx mutex, as you >>> could see from the attached log. The other interesting is the ACPI >>> error at boot time: >>> >>> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release >>> (20160527/utmutex-386) >>> [1] ACPI Error: Could not release AML Interpreter mutex >>> (20160527/exutils-147) >>> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release >>> (20160527/utmutex-386) >>> [1] ACPI Error: Could not release AML Interpreter mutex >>> (20160527/exutils-147) >>> [1] cpu1: <ACPI CPU> on acpi0 >>> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release >>> (20160527/utmutex-386) >>> [1] ACPI Error: Could not release AML Interpreter mutex >>> (20160527/exutils-147) >>> [1] ACPI Error: Mutex [0x0] is not acquired, cannot release >>> (20160527/utmutex-386) >>> [1] ACPI Error: Could not release AML Interpreter mutex >>> (20160527/exutils-147) >>> >>> (This error is on 10-STABLE.) >>> >> >> After backported the last to ACPICA update to 10-STABLE with this >> patch, the issue reducated to this warning message: > > Attached the two backport. > >> >> [1] acpi0: Power Button (fixed) >> [1] ACPI Error: Method parse/execution failed [\134_SB.PCI0.IOTR._CRS] >> (Node 0xfffff80006592f00), AE_AML_NO_RESOURCE_END_TAG >> (20161117/psparse-560) >> [1] ACPI Error: Method execution failed [\134_SB.PCI0.IOTR._CRS] (Node >> 0xfffff80006592f00), AE_AML_NO_RESOURCE_END_TAG (20161117/uteval-111) >> [1] can't fetch resources for \134_SB_.PCI0.IOTR - >> AE_AML_NO_RESOURCE_END_TAG >> >> but the lockup has gone. ;) >> CC: ACPI and AMD64 >> >> [trim] >> [-- Attachment #2 --] 7zXZ ִF ! t/] #т.T5(_[qߢ_ lL%YLBi[}Ϳu˷% ^8!ZT^ 1ˆ+'9! WFΠw6H6kC:sf,${kLQ5BiSCR#,@LgbX {ݻB_͞!.v6U!)<+cR -ez^Ο:Iݜ'C@cƫ5m$ff[} FnǨjPd}NZ6ܵm lZY \OuHr{1_NAqnp_t%[HDe fn #l 6XȸCŧkVh*a i9=FV#$*6~^ pKȠCBdsЈT.v{Lpg5˂\fE-γOň͡ol)䨈k"KQf7~ڰ]DĴH;moHGy.0j:RAQx^ZBZ>`hsʘff5K䫖.H>"3VQM8#"?w8d~!FW#)@7%4A~ZvÀaf;!C=4o~x'Ӌf("6y:p (gJmp=2E$'ؤzB0;m9߯{+&,Iі.s b_g} 0Wi bʭԧbG,Jvp7) @=aZNIw1ôOr&'6&aY}}G_wӶ]fO=, yN$tda$^h4wF {VFvpJ!yߐ6ݯ!٬)HlT5n 2~̹]QεEN9z{a&r-g-2TՕ_R$@0o3{ qU"b^,ѹ^ Iv ~Ӗj!j<!q$caQ!Ђ }ҰoV6y ]p[,{{^jJh>XÉ#V9 2l\VЋ\@E*0\\=gb9H67JK}8@Z!QEJgRڄh-aBJNP^h=Iz "-{?$n"cɯ˻e{Φ4P/⬬Ac1/hE2o0رr' 'VU ep B7(R\];Hg Xj,@Oos<? }e g,yQ1XVTu<L $& rB6."t;!AVSמ)[$8*7-@-WBX*M#5uN3Y9Bmo5!@ZX`@2oijJ]}^($G);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