]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r309400:
authorhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 19 Dec 2016 09:52:32 +0000 (09:52 +0000)
committerhselasky <hselasky@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 19 Dec 2016 09:52:32 +0000 (09:52 +0000)
commita1a6ea63f0fea0499fd6c3df6043bdbae3b6dbea
tree8ca9db35fb2c3f48d410548fc3dfc3b9d66b3a9c
parent159a8c83f0d1628c5cbc7f73056666dfaa84d7df
MFC r309400:
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

git-svn-id: svn://svn.freebsd.org/base/stable/10@310254 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/dev/acpica/acpi_ec.c