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