1 /******************************************************************************
3 * Name: aclinux.h - OS specific defines, etc. for AROS
5 *****************************************************************************/
10 #if defined(__i386__) || defined(__x86_64__)
11 #define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
18 : "=r" (q32), "=r" (r32) \
19 : "r" (n_hi), "r" (n_lo), "r" (d32) \
22 #define ACPI_SHIFT_RIGHT_64(n_hi, n_lo) \
26 : "=r" (n_hi), "=r" (n_lo) \
27 : "0" (n_hi), "1" (n_lo) \
31 /* Common (in-kernel/user-space) ACPICA configuration */
33 #define ACPI_USE_SYSTEM_CLIBRARY
34 #define ACPI_USE_STANDARD_HEADERS
35 #define ACPI_MUTEX_TYPE ACPI_BINARY_SEMAPHORE
36 #define ACPI_USE_LOCAL_CACHE
39 * Calling conventions:
41 * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads)
42 * ACPI_EXTERNAL_XFACE - External ACPI interfaces
43 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces
44 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces
46 #define ACPI_SYSTEM_XFACE
47 #define ACPI_EXTERNAL_XFACE
48 #define ACPI_INTERNAL_XFACE
49 #define ACPI_INTERNAL_VAR_XFACE
52 #include <proto/exec.h>
54 /* Host-dependent types and defines for AROS ACPICA */
56 #if defined(__x86_64__)
57 #define ACPI_MACHINE_WIDTH 64
58 #elif defined(__i386__)
59 #define ACPI_MACHINE_WIDTH 32
61 #error Unsupported hardware architecture!
68 #define ACPI_FLUSH_CPU_CACHE() CacheClearU()
69 #define ACPI_ACQUIRE_GLOBAL_LOCK(facs,acq) \
70 { ACPI_TABLE_FACS *_facs = facs; \
72 Disable(); if (_facs->GlobalLock == 0) { _facs->GlobalLock=1; ok = TRUE; } Enable(); \
74 #define ACPI_RELEASE_GLOBAL_LOCK(facs,pend) \
75 { ACPI_TABLE_FACS *_facs = facs; \
77 Disable(); if (_facs->GlobalLock == 1) { _facs->GlobalLock=0; ok = TRUE; } Enable(); \
84 #include <libraries/acpica.h>
86 #endif /* __ACAROS_H__ */