Created
October 20, 2022 18:55
-
-
Save joemiller/9f5698c5634d4a93d101985dc5238365 to your computer and use it in GitHub Desktop.
openbsd 7.1 kernel patch to stop a GFE L6F ACPI interrupt storm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/src/sys/dev/acpi/acpi.c.orig Mon Oct 3 16:26:55 2022 | |
+++ /usr/src/sys/dev/acpi/acpi.c Mon Oct 3 16:30:29 2022 | |
@@ -2269,6 +2269,18 @@ | |
{ | |
struct aml_node *node = arg; | |
uint8_t mask, en; | |
+ | |
+ /* bad bios. mask/ignore the GPE _L6F (0x6f) interrupt */ | |
+ if (gpe == 0x6f && (sc->gpe_table[gpe].flags & GPE_LEVEL)) { | |
+ static unsigned short i; | |
+ if (i == 0) { | |
+ i++; | |
+ printf("acpi_gpe %d %s IGNORING\n", gpe, node->name); | |
+ } | |
+ return (0); | |
+ } | |
+ | |
+ printf("acpi_gpe %d %s\n", gpe, node->name); | |
dnprintf(10, "handling GPE %.2x\n", gpe); | |
aml_evalnode(sc, node, 0, NULL, NULL); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This definitely works, but I don't think it's necessary to push the logic all the way down to the ACPI thread's task function. If you have a known-bad GPE, you can filter it at enable time, and no interrupts will ever be fielded. This covers both boot and resume paths:
As an alternative approach, I'm currently using a diff to detect and stomp on buggy/misbehaving GPEs, so it's safe to deploy to any system without fear of disabling a GPE that is otherwise behaving:
https://gist.github.com/bconway/4ce1748461eb28f2b7c68ddb05dba571
Unsolicited $0.02.