acpica port: update to version 2018-08-10

Fixes #2935
This commit is contained in:
Martin Stein 2018-08-20 15:48:39 +02:00 committed by Christian Helmuth
parent 44a8bec56a
commit 023de11dc6
4 changed files with 65 additions and 32 deletions

View File

@ -1 +1 @@
f8a09be26aab3e6c501bebe6991c9b223265df4c
eeabeb0dc87258ecfc57e24d54b036c84b5fcf26

View File

@ -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

View File

@ -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 <stdarg.h>
#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 <stdarg.h>
#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__

View File

@ -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()