x86: remove special GPE handling nova <-> acpica

Remove handling of ACPI (SCI) interrupt from kernel and thereby let the
handling of the ACPI irq exclusively to an Genode driver. On Genode the ACPICA
library+app handles the ACPI irq, where we can now remove the contrib patches
related to the synchronization between NOVA kernel and ACPICA library.

Fixes #4479
This commit is contained in:
Alexander Boettcher 2022-04-21 10:00:07 +02:00 committed by Christian Helmuth
parent 65d7b3e652
commit f6fedd5348
4 changed files with 3 additions and 63 deletions

View File

@ -1 +1 @@
36430efef054479ea2cc06f2052a85a09e9bf232
6a1f0e6e6386e60748607c3c460c51a36a162307

View File

@ -4,7 +4,7 @@ DOWNLOADS := nova.git
# r10 branch
URL(nova) := https://github.com/alex-ab/NOVA.git
REV(nova) := d7804f2125ad9ba1b86ad983261f72bdc1c0cfe7
REV(nova) := 7e3b5d3916825fb32e011cff4ee9b09ecdcb8d05
DIR(nova) := src/kernel/nova
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))

View File

@ -1 +1 @@
eabee3c47ec115b80e21ae830bbdd4faf705200f
cd5027ca2f274e0274219109ac8b3908fd9ed681

View File

@ -1,63 +1,3 @@
diff --git src/lib/acpica/source/components/events/evevent.c src/lib/acpica/source/components/events/evevent.c
index cec39cb..2a8e3a6 100644
--- src/lib/acpica/source/components/events/evevent.c
+++ src/lib/acpica/source/components/events/evevent.c
@@ -188,6 +188,9 @@ AcpiEvFixedEventInitialize (
UINT32 i;
ACPI_STATUS Status;
+ /* read enabled events by kernel and don't disable them */
+ UINT32 FixedEnable;
+ (void) AcpiHwRegisterRead (ACPI_REGISTER_PM1_ENABLE, &FixedEnable);
/*
* Initialize the structure that keeps track of fixed event handlers and
@@ -198,6 +201,12 @@ AcpiEvFixedEventInitialize (
AcpiGbl_FixedEventHandlers[i].Handler = NULL;
AcpiGbl_FixedEventHandlers[i].Context = NULL;
+ if (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask)
+ {
+ AcpiOsPrintf (" Genode: SKIP disabling event '%u'(%x) - enabled by kernel!\n", i, AcpiGbl_FixedEventInfo[i].EnableBitMask);
+ continue;
+ }
+
/* Disable the fixed event */
if (AcpiGbl_FixedEventInfo[i].EnableRegisterId != 0xFF)
@@ -262,10 +271,13 @@ AcpiEvFixedEventDetect (
*/
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{
- /* Both the status and enable bits must be on for this event */
-
- if ((FixedStatus & AcpiGbl_FixedEventInfo[i].StatusBitMask) &&
- (FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
+ /* kernel 'signals' the fixed event by disabling it in the enable
+ * register. Check for events, that have registered handlers and that
+ * are disabled in the enable register. If found, re-enable event.
+ */
+ if (AcpiGbl_FixedEventInfo[i].EnableBitMask &&
+ AcpiGbl_FixedEventHandlers[i].Handler &&
+ !(FixedEnable & AcpiGbl_FixedEventInfo[i].EnableBitMask))
{
/*
* Found an active (signalled) event. Invoke global event
@@ -309,11 +321,10 @@ AcpiEvFixedEventDispatch (
ACPI_FUNCTION_ENTRY ();
- /* Clear the status bit */
-
+ /* Re-enable event - kernel disabled it */
(void) AcpiWriteBitRegister (
- AcpiGbl_FixedEventInfo[Event].StatusRegisterId,
- ACPI_CLEAR_STATUS);
+ AcpiGbl_FixedEventInfo[Event].EnableRegisterId,
+ ACPI_ENABLE_EVENT);
/*
* Make sure that a handler exists. If not, report an error
diff --git src/lib/acpica/source/include/acpixf.h src/lib/acpica/source/include/acpixf.h
index 3a823a3..abc2900 100644
--- src/lib/acpica/source/include/acpixf.h