From 023de11dc657f2e2c3acaece51e42c562b126206 Mon Sep 17 00:00:00 2001 From: Martin Stein Date: Mon, 20 Aug 2018 15:48:39 +0200 Subject: [PATCH] acpica port: update to version 2018-08-10 Fixes #2935 --- repos/libports/ports/acpica.hash | 2 +- repos/libports/ports/acpica.port | 4 +- repos/libports/src/lib/acpica/acpica.patch | 64 ++++++++++++---------- repos/libports/src/lib/acpica/osl.cc | 27 ++++++++- 4 files changed, 65 insertions(+), 32 deletions(-) diff --git a/repos/libports/ports/acpica.hash b/repos/libports/ports/acpica.hash index e2fa92a33e..e2a72369eb 100644 --- a/repos/libports/ports/acpica.hash +++ b/repos/libports/ports/acpica.hash @@ -1 +1 @@ -f8a09be26aab3e6c501bebe6991c9b223265df4c +eeabeb0dc87258ecfc57e24d54b036c84b5fcf26 diff --git a/repos/libports/ports/acpica.port b/repos/libports/ports/acpica.port index 93b542708d..1fb2b44338 100644 --- a/repos/libports/ports/acpica.port +++ b/repos/libports/ports/acpica.port @@ -1,9 +1,9 @@ LICENSE := BSD -VERSION := 20160212 +VERSION := 20180810 DOWNLOADS := acpica.archive URL(acpica) := http://acpica.org/sites/acpica/files/acpica-unix2-$(VERSION).tar.gz -SHA(acpica) := c0c68c7a8e9b1f4f66895b5950023042cb8e619fd92dab288010c8bd023d3270 +SHA(acpica) := 679bac35a761ead4bafbcb5e9e9df3a2acad56622f93409a473a6c00c570b905 DIR(acpica) := src/lib/acpica PATCHES := src/lib/acpica/acpica.patch diff --git a/repos/libports/src/lib/acpica/acpica.patch b/repos/libports/src/lib/acpica/acpica.patch index 1e3a3c1feb..f0c8564d31 100644 --- a/repos/libports/src/lib/acpica/acpica.patch +++ b/repos/libports/src/lib/acpica/acpica.patch @@ -1,23 +1,8 @@ -+++ src/lib/acpica/source/include/platform/acenv.h -@@ -222,7 +222,15 @@ - - /* Unknown environment */ - --#error Unknown target environment -+#ifdef __x86_64__ -+#define ACPI_MACHINE_WIDTH 64 -+#else -+#define ACPI_MACHINE_WIDTH 32 -+#define ACPI_USE_NATIVE_DIVIDE -+#endif -+ -+/* required for va_arg - otherwise below some alternative is defined */ -+#include - #endif - - /*! [End] no source code translation !*/ +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 @@ +@@ -188,6 +188,9 @@ AcpiEvFixedEventInitialize ( UINT32 i; ACPI_STATUS Status; @@ -27,7 +12,7 @@ /* * Initialize the structure that keeps track of fixed event handlers and -@@ -198,6 +201,12 @@ +@@ -198,6 +201,12 @@ AcpiEvFixedEventInitialize ( AcpiGbl_FixedEventHandlers[i].Handler = NULL; AcpiGbl_FixedEventHandlers[i].Context = NULL; @@ -35,12 +20,12 @@ + { + 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) -@@ -257,10 +266,13 @@ +@@ -262,10 +271,13 @@ AcpiEvFixedEventDetect ( */ for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++) { @@ -58,11 +43,10 @@ { /* * Found an active (signalled) event. Invoke global event -@@ -303,12 +315,10 @@ - +@@ -309,11 +321,10 @@ AcpiEvFixedEventDispatch ( ACPI_FUNCTION_ENTRY (); -- + - /* Clear the status bit */ - + /* Re-enable event - kernel disabled it */ @@ -74,10 +58,34 @@ /* * Make sure that a handler exists. If not, report an error +diff --git src/lib/acpica/source/include/platform/acenv.h src/lib/acpica/source/include/platform/acenv.h +index 1ab311d..514b144 100644 +--- src/lib/acpica/source/include/platform/acenv.h ++++ src/lib/acpica/source/include/platform/acenv.h +@@ -239,7 +239,15 @@ + + /* Unknown environment */ + +-#error Unknown target environment ++#ifdef __x86_64__ ++#define ACPI_MACHINE_WIDTH 64 ++#else ++#define ACPI_MACHINE_WIDTH 32 ++#define ACPI_USE_NATIVE_DIVIDE ++#endif ++ ++/* required for va_arg - otherwise below some alternative is defined */ ++#include + #endif + + /*! [End] no source code translation !*/ +diff --git src/lib/acpica/source/include/platform/acgcc.h src/lib/acpica/source/include/platform/acgcc.h +index 584d50f..c1224fb 100644 +--- src/lib/acpica/source/include/platform/acgcc.h +++ src/lib/acpica/source/include/platform/acgcc.h -@@ -44,7 +44,9 @@ - #ifndef __ACGCC_H__ - #define __ACGCC_H__ +@@ -60,7 +60,9 @@ typedef __builtin_va_list va_list; + #endif + #endif +#ifndef ACPI_INLINE #define ACPI_INLINE __inline__ diff --git a/repos/libports/src/lib/acpica/osl.cc b/repos/libports/src/lib/acpica/osl.cc index 5bda7b8bde..9329e5cb44 100644 --- a/repos/libports/src/lib/acpica/osl.cc +++ b/repos/libports/src/lib/acpica/osl.cc @@ -274,7 +274,9 @@ ACPI_STATUS AcpiOsSignal (UINT32, void *) FAIL(AE_BAD_PARAMETER) UINT64 AcpiOsGetTimer (void) - FAIL(0) +{ + return timer_connection().elapsed_us() * 10; +} ACPI_STATUS AcpiOsReadMemory (ACPI_PHYSICAL_ADDRESS, UINT64 *, UINT32) FAIL(AE_BAD_PARAMETER) @@ -288,6 +290,29 @@ ACPI_STATUS AcpiOsRemoveInterruptHandler (UINT32, ACPI_OSD_HANDLER) ACPI_STATUS AcpiOsGetLine (char *, UINT32, UINT32 *) FAIL(AE_BAD_PARAMETER) +ACPI_STATUS +AcpiOsWaitCommandReady ( + void) +{ + FAIL(AE_BAD_PARAMETER) +} + +ACPI_STATUS +AcpiOsNotifyCommandComplete ( + void) +{ + FAIL(AE_BAD_PARAMETER) +} + +ACPI_STATUS +AcpiOsEnterSleep ( + UINT8 SleepState, + UINT32 RegaValue, + UINT32 RegbValue) +{ + FAIL(AE_BAD_PARAMETER) +} + extern "C" { void AcpiAhMatchUuid() FAIL()