134Ssmall /* 234Ssmall * CDDL HEADER START 334Ssmall * 434Ssmall * The contents of this file are subject to the terms of the 51560Smyers * Common Development and Distribution License (the "License"). 61560Smyers * You may not use this file except in compliance with the License. 734Ssmall * 834Ssmall * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 934Ssmall * or http://www.opensolaris.org/os/licensing. 1034Ssmall * See the License for the specific language governing permissions 1134Ssmall * and limitations under the License. 1234Ssmall * 1334Ssmall * When distributing Covered Code, include this CDDL HEADER in each 1434Ssmall * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1534Ssmall * If applicable, add the following below this CDDL HEADER, with the 1634Ssmall * fields enclosed by brackets "[]" replaced with your own identifying 1734Ssmall * information: Portions Copyright [yyyy] [name of copyright owner] 1834Ssmall * 1934Ssmall * CDDL HEADER END 2034Ssmall */ 210Sstevel@tonic-gate /* 22*9980SDana.Myers@Sun.COM * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 230Sstevel@tonic-gate * Use is subject to license terms. 240Sstevel@tonic-gate */ 250Sstevel@tonic-gate 2634Ssmall #ifndef _ACSOLARIS_H_ 2734Ssmall #define _ACSOLARIS_H_ 280Sstevel@tonic-gate 290Sstevel@tonic-gate #ifdef __cplusplus 300Sstevel@tonic-gate extern "C" { 310Sstevel@tonic-gate #endif 320Sstevel@tonic-gate 330Sstevel@tonic-gate #include <sys/types.h> 340Sstevel@tonic-gate #include <sys/sunddi.h> 350Sstevel@tonic-gate #include <sys/varargs.h> 360Sstevel@tonic-gate #include <sys/cpu.h> 37*9980SDana.Myers@Sun.COM #include <sys/thread.h> 380Sstevel@tonic-gate 390Sstevel@tonic-gate #define strtoul simple_strtoul 400Sstevel@tonic-gate 417851SDana.Myers@Sun.COM uint32_t __acpi_acquire_global_lock(void *); 427851SDana.Myers@Sun.COM uint32_t __acpi_release_global_lock(void *); 430Sstevel@tonic-gate void __acpi_wbinvd(void); 440Sstevel@tonic-gate 450Sstevel@tonic-gate #ifdef _ILP32 460Sstevel@tonic-gate #define ACPI_MACHINE_WIDTH 32 470Sstevel@tonic-gate #elif defined(_LP64) 480Sstevel@tonic-gate #define ACPI_MACHINE_WIDTH 64 490Sstevel@tonic-gate #endif 500Sstevel@tonic-gate 510Sstevel@tonic-gate #define COMPILER_DEPENDENT_INT64 int64_t 520Sstevel@tonic-gate #define COMPILER_DEPENDENT_UINT64 uint64_t 530Sstevel@tonic-gate 54*9980SDana.Myers@Sun.COM #define ACPI_THREAD_ID kthread_t * 552623Smyers 560Sstevel@tonic-gate #define ACPI_PRINTF_LIKE_FUNC 570Sstevel@tonic-gate #define ACPI_UNUSED_VAR 580Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE 590Sstevel@tonic-gate #define ACPI_FLUSH_CPU_CACHE() (__acpi_wbinvd()) 600Sstevel@tonic-gate 611560Smyers #define ACPI_DISASSEMBLER 622623Smyers #define ACPI_PACKED_POINTERS_NOT_SUPPORTED 631560Smyers 640Sstevel@tonic-gate /* 650Sstevel@tonic-gate * Calling conventions: 660Sstevel@tonic-gate * 670Sstevel@tonic-gate * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 680Sstevel@tonic-gate * ACPI_EXTERNAL_XFACE - External ACPI interfaces 690Sstevel@tonic-gate * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 700Sstevel@tonic-gate * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 710Sstevel@tonic-gate */ 720Sstevel@tonic-gate #define ACPI_SYSTEM_XFACE 730Sstevel@tonic-gate #define ACPI_EXTERNAL_XFACE 740Sstevel@tonic-gate #define ACPI_INTERNAL_XFACE 750Sstevel@tonic-gate #define ACPI_INTERNAL_VAR_XFACE 760Sstevel@tonic-gate 770Sstevel@tonic-gate #define ACPI_ASM_MACROS 780Sstevel@tonic-gate #define BREAKPOINT3 790Sstevel@tonic-gate #define ACPI_DISABLE_IRQS() cli() 800Sstevel@tonic-gate #define ACPI_ENABLE_IRQS() sti() 817851SDana.Myers@Sun.COM #define ACPI_ACQUIRE_GLOBAL_LOCK(Facs, Acq) \ 827851SDana.Myers@Sun.COM ((Acq) = __acpi_acquire_global_lock(Facs)) 830Sstevel@tonic-gate 847851SDana.Myers@Sun.COM #define ACPI_RELEASE_GLOBAL_LOCK(Facs, Acq) \ 857851SDana.Myers@Sun.COM ((Acq) = __acpi_release_global_lock(Facs)) 860Sstevel@tonic-gate 870Sstevel@tonic-gate #ifdef __cplusplus 880Sstevel@tonic-gate } 890Sstevel@tonic-gate #endif 900Sstevel@tonic-gate 9134Ssmall #endif /* _ACSOLARIS_H_ */ 92