From 880b70c54592709a98d551337f078760df8649d6 Mon Sep 17 00:00:00 2001 From: wawa Date: Mon, 11 Feb 2019 00:50:56 +0000 Subject: [PATCH] update acpica to version 20190108. (NicJA) git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@55677 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- arch/all-pc/acpica/acpica-unix-20190108-aros.diff | 103 ++++++++++++++++++++++ arch/all-pc/acpica/mmakefile.src | 2 +- 2 files changed, 104 insertions(+), 1 deletion(-) create mode 100644 arch/all-pc/acpica/acpica-unix-20190108-aros.diff diff --git a/arch/all-pc/acpica/acpica-unix-20190108-aros.diff b/arch/all-pc/acpica/acpica-unix-20190108-aros.diff new file mode 100644 index 0000000000..25518e46d3 --- /dev/null +++ b/arch/all-pc/acpica/acpica-unix-20190108-aros.diff @@ -0,0 +1,103 @@ +diff -ruN acpica-unix-20190108/source/include/platform/acaros.h acpica-unix-20190108.aros/source/include/platform/acaros.h +--- acpica-unix-20190108/source/include/platform/acaros.h 1970-01-01 01:00:00.000000000 +0100 ++++ acpica-unix-20190108.aros/source/include/platform/acaros.h 2018-09-21 15:22:45.699532372 +0100 +@@ -0,0 +1,86 @@ ++/****************************************************************************** ++ * ++ * Name: acaros.h - OS specific defines, etc. for AROS ++ * ++ *****************************************************************************/ ++ ++#ifndef __ACAROS_H__ ++#define __ACAROS_H__ ++ ++#if defined(__i386__) || defined(__x86_64__) ++#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \ ++ asm volatile ( \ ++ "mov %2, %%edx\n" \ ++ "mov %3, %%eax\n" \ ++ "div %4\n" \ ++ "mov %%eax, %0\n" \ ++ "mov %%edx, %1\n" \ ++ : "=r" (q32), "=r" (r32) \ ++ : "r" (n_hi), "r" (n_lo), "r" (d32) \ ++ : "%eax", "%edx" ); ++ ++#define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \ ++ asm volatile ( \ ++ "shr $1, %0\n" \ ++ "rcr $1, %1\n" \ ++ : "=r" (n_hi), "=r" (n_lo) \ ++ : "0" (n_hi), "1" (n_lo) \ ++ ); ++#endif ++ ++/* Common (in-kernel/user-space) ACPICA configuration */ ++ ++#ifndef ACPI_USE_SYSTEM_CLIBRARY ++#define ACPI_USE_SYSTEM_CLIBRARY ++#endif ++#define ACPI_USE_STANDARD_HEADERS ++#define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE ++#define ACPI_USE_LOCAL_CACHE ++ ++/* Use native AROS version of AcpiOsAllocateZeroed */ ++#define USE_NATIVE_ALLOCATE_ZEROED ++ ++/* ++ * Calling conventions: ++ * ++ * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) ++ * ACPI_EXTERNAL_XFACE - External ACPI interfaces ++ * ACPI_INTERNAL_XFACE - Internal ACPI interfaces ++ * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces ++ */ ++#define ACPI_SYSTEM_XFACE ++#define ACPI_EXTERNAL_XFACE ++#define ACPI_INTERNAL_XFACE ++#define ACPI_INTERNAL_VAR_XFACE ++ ++#include ++#include ++ ++/* Host-dependent types and defines for AROS ACPICA */ ++ ++#if (__WORDSIZE==64) ++#define ACPI_MACHINE_WIDTH 64 ++#else ++#define ACPI_MACHINE_WIDTH 32 ++#define ACPI_32BIT_PHYSICAL_ADDRESS ++#endif ++ ++#ifndef __cdecl ++#define __cdecl ++#endif ++ ++#define ACPI_FLUSH_CPU_CACHE() CacheClearU() ++#define ACPI_ACQUIRE_GLOBAL_LOCK(facs,acq) \ ++ { ACPI_TABLE_FACS *_facs = facs; \ ++ BOOLEAN ok = FALSE; \ ++ Disable(); if (_facs->GlobalLock == 0) { _facs->GlobalLock=1; ok = TRUE; } Enable(); \ ++ acq = ok; } ++#define ACPI_RELEASE_GLOBAL_LOCK(facs,pend) \ ++ { ACPI_TABLE_FACS *_facs = facs; \ ++ BOOLEAN ok = FALSE; \ ++ Disable(); if (_facs->GlobalLock == 1) { _facs->GlobalLock=0; ok = TRUE; } Enable(); \ ++ pend = ok; } ++ ++#include ++ ++#endif /* __ACAROS_H__ */ +diff -ruN acpica-unix-20190108/source/include/platform/acenv.h acpica-unix-20190108.aros/source/include/platform/acenv.h +--- acpica-unix-20190108/source/include/platform/acenv.h 2018-08-10 16:49:24.000000000 +0100 ++++ acpica-unix-20190108.aros/source/include/platform/acenv.h 2018-09-21 14:56:06.593884036 +0100 +@@ -335,6 +335,9 @@ + #elif defined(__QNX__) + #include "acqnx.h" + ++#elif defined(__AROS__) ++#include "acaros.h" ++ + /* + * EFI applications can be built with -nostdlib, in this case, it must be + * included after including all other host environmental definitions, in diff --git a/arch/all-pc/acpica/mmakefile.src b/arch/all-pc/acpica/mmakefile.src index 614bb805b6..071bb54900 100644 --- a/arch/all-pc/acpica/mmakefile.src +++ b/arch/all-pc/acpica/mmakefile.src @@ -7,7 +7,7 @@ DEBUG_ACPI=no ACPICAREPOSITORIES := \ https://acpica.org/sites/acpica/files https://mirrors.omniosce.org/acpica ACPICAPACKAGE := acpica -ACPICAVERSION := 20180810 +ACPICAVERSION := 20190108 ACPICAARCHBASE := $(ACPICAPACKAGE)-unix-$(ACPICAVERSION) ACPICASRCDIR := $(PORTSDIR)/acpica/$(ACPICAARCHBASE) -- 2.11.4.GIT