1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _ACSOLARIS_H_ 28 #define _ACSOLARIS_H_ 29 30 #pragma ident "%Z%%M% %I% %E% SMI" 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #include <sys/types.h> 37 #include <sys/sunddi.h> 38 #include <sys/varargs.h> 39 #include <sys/cpu.h> 40 41 #define strtoul simple_strtoul 42 43 uint32_t __acpi_acquire_global_lock(uint32_t *); 44 uint32_t __acpi_release_global_lock(uint32_t *); 45 void __acpi_wbinvd(void); 46 47 #ifdef _ILP32 48 #define ACPI_MACHINE_WIDTH 32 49 #elif defined(_LP64) 50 #define ACPI_MACHINE_WIDTH 64 51 #endif 52 53 #define COMPILER_DEPENDENT_INT64 int64_t 54 #define COMPILER_DEPENDENT_UINT64 uint64_t 55 56 #define ACPI_PRINTF_LIKE_FUNC 57 #define ACPI_UNUSED_VAR 58 #define ACPI_USE_NATIVE_DIVIDE 59 #define ACPI_FLUSH_CPU_CACHE() (__acpi_wbinvd()) 60 61 /* 62 * Calling conventions: 63 * 64 * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 65 * ACPI_EXTERNAL_XFACE - External ACPI interfaces 66 * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 67 * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 68 */ 69 #define ACPI_SYSTEM_XFACE 70 #define ACPI_EXTERNAL_XFACE 71 #define ACPI_INTERNAL_XFACE 72 #define ACPI_INTERNAL_VAR_XFACE 73 74 #define ACPI_ASM_MACROS 75 #define BREAKPOINT3 76 #define ACPI_DISABLE_IRQS() cli() 77 #define ACPI_ENABLE_IRQS() sti() 78 #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ 79 ((Acq) = __acpi_acquire_global_lock(GLptr)) 80 81 #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ 82 ((Acq) = __acpi_release_global_lock(GLptr)) 83 84 #ifdef __cplusplus 85 } 86 #endif 87 88 #endif /* _ACSOLARIS_H_ */ 89