18e56767dSsmall /* 28e56767dSsmall * CDDL HEADER START 38e56767dSsmall * 48e56767dSsmall * The contents of this file are subject to the terms of the 5*30082d0cSmyers * Common Development and Distribution License (the "License"). 6*30082d0cSmyers * You may not use this file except in compliance with the License. 78e56767dSsmall * 88e56767dSsmall * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 98e56767dSsmall * or http://www.opensolaris.org/os/licensing. 108e56767dSsmall * See the License for the specific language governing permissions 118e56767dSsmall * and limitations under the License. 128e56767dSsmall * 138e56767dSsmall * When distributing Covered Code, include this CDDL HEADER in each 148e56767dSsmall * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 158e56767dSsmall * If applicable, add the following below this CDDL HEADER, with the 168e56767dSsmall * fields enclosed by brackets "[]" replaced with your own identifying 178e56767dSsmall * information: Portions Copyright [yyyy] [name of copyright owner] 188e56767dSsmall * 198e56767dSsmall * CDDL HEADER END 208e56767dSsmall */ 217c478bd9Sstevel@tonic-gate /* 22*30082d0cSmyers * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 237c478bd9Sstevel@tonic-gate * Use is subject to license terms. 247c478bd9Sstevel@tonic-gate */ 257c478bd9Sstevel@tonic-gate 268e56767dSsmall #ifndef _ACSOLARIS_H_ 278e56767dSsmall #define _ACSOLARIS_H_ 287c478bd9Sstevel@tonic-gate 297c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 307c478bd9Sstevel@tonic-gate 317c478bd9Sstevel@tonic-gate #ifdef __cplusplus 327c478bd9Sstevel@tonic-gate extern "C" { 337c478bd9Sstevel@tonic-gate #endif 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate #include <sys/types.h> 367c478bd9Sstevel@tonic-gate #include <sys/sunddi.h> 377c478bd9Sstevel@tonic-gate #include <sys/varargs.h> 387c478bd9Sstevel@tonic-gate #include <sys/cpu.h> 397c478bd9Sstevel@tonic-gate 407c478bd9Sstevel@tonic-gate #define strtoul simple_strtoul 417c478bd9Sstevel@tonic-gate 427c478bd9Sstevel@tonic-gate uint32_t __acpi_acquire_global_lock(uint32_t *); 437c478bd9Sstevel@tonic-gate uint32_t __acpi_release_global_lock(uint32_t *); 447c478bd9Sstevel@tonic-gate void __acpi_wbinvd(void); 457c478bd9Sstevel@tonic-gate 467c478bd9Sstevel@tonic-gate #ifdef _ILP32 477c478bd9Sstevel@tonic-gate #define ACPI_MACHINE_WIDTH 32 487c478bd9Sstevel@tonic-gate #elif defined(_LP64) 497c478bd9Sstevel@tonic-gate #define ACPI_MACHINE_WIDTH 64 507c478bd9Sstevel@tonic-gate #endif 517c478bd9Sstevel@tonic-gate 527c478bd9Sstevel@tonic-gate #define COMPILER_DEPENDENT_INT64 int64_t 537c478bd9Sstevel@tonic-gate #define COMPILER_DEPENDENT_UINT64 uint64_t 547c478bd9Sstevel@tonic-gate 557c478bd9Sstevel@tonic-gate #define ACPI_PRINTF_LIKE_FUNC 567c478bd9Sstevel@tonic-gate #define ACPI_UNUSED_VAR 577c478bd9Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE 587c478bd9Sstevel@tonic-gate #define ACPI_FLUSH_CPU_CACHE() (__acpi_wbinvd()) 597c478bd9Sstevel@tonic-gate 60*30082d0cSmyers #define ACPI_MISALIGNMENT_NOT_SUPPORTED 61*30082d0cSmyers #define ACPI_DISASSEMBLER 62*30082d0cSmyers 637c478bd9Sstevel@tonic-gate /* 647c478bd9Sstevel@tonic-gate * Calling conventions: 657c478bd9Sstevel@tonic-gate * 667c478bd9Sstevel@tonic-gate * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 677c478bd9Sstevel@tonic-gate * ACPI_EXTERNAL_XFACE - External ACPI interfaces 687c478bd9Sstevel@tonic-gate * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 697c478bd9Sstevel@tonic-gate * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 707c478bd9Sstevel@tonic-gate */ 717c478bd9Sstevel@tonic-gate #define ACPI_SYSTEM_XFACE 727c478bd9Sstevel@tonic-gate #define ACPI_EXTERNAL_XFACE 737c478bd9Sstevel@tonic-gate #define ACPI_INTERNAL_XFACE 747c478bd9Sstevel@tonic-gate #define ACPI_INTERNAL_VAR_XFACE 757c478bd9Sstevel@tonic-gate 767c478bd9Sstevel@tonic-gate #define ACPI_ASM_MACROS 777c478bd9Sstevel@tonic-gate #define BREAKPOINT3 787c478bd9Sstevel@tonic-gate #define ACPI_DISABLE_IRQS() cli() 797c478bd9Sstevel@tonic-gate #define ACPI_ENABLE_IRQS() sti() 807c478bd9Sstevel@tonic-gate #define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ 817c478bd9Sstevel@tonic-gate ((Acq) = __acpi_acquire_global_lock(GLptr)) 827c478bd9Sstevel@tonic-gate 837c478bd9Sstevel@tonic-gate #define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ 847c478bd9Sstevel@tonic-gate ((Acq) = __acpi_release_global_lock(GLptr)) 857c478bd9Sstevel@tonic-gate 867c478bd9Sstevel@tonic-gate #ifdef __cplusplus 877c478bd9Sstevel@tonic-gate } 887c478bd9Sstevel@tonic-gate #endif 897c478bd9Sstevel@tonic-gate 908e56767dSsmall #endif /* _ACSOLARIS_H_ */ 91