acsolaris.h revision 34:5471efa2ccbb
1118848Simp/* 2118848Simp * CDDL HEADER START 3118848Simp * 4118848Simp * The contents of this file are subject to the terms of the 5118848Simp * Common Development and Distribution License, Version 1.0 only 6118848Simp * (the "License"). You may not use this file except in compliance 7118848Simp * with the License. 8118848Simp * 9118848Simp * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10118848Simp * or http://www.opensolaris.org/os/licensing. 11118848Simp * See the License for the specific language governing permissions 12118848Simp * and limitations under the License. 13118848Simp * 14118848Simp * When distributing Covered Code, include this CDDL HEADER in each 15118848Simp * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16118848Simp * If applicable, add the following below this CDDL HEADER, with the 17118848Simp * fields enclosed by brackets "[]" replaced with your own identifying 18118848Simp * information: Portions Copyright [yyyy] [name of copyright owner] 19118848Simp * 20118848Simp * CDDL HEADER END 21118848Simp */ 22118848Simp/* 23118848Simp * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24118848Simp * Use is subject to license terms. 25118848Simp */ 26118848Simp 2742956Sdillon#ifndef _ACSOLARIS_H_ 2842956Sdillon#define _ACSOLARIS_H_ 2942956Sdillon 3042956Sdillon#pragma ident "%Z%%M% %I% %E% SMI" 3142956Sdillon 3242956Sdillon#ifdef __cplusplus 3342956Sdillonextern "C" { 3442956Sdillon#endif 3542956Sdillon 3642956Sdillon#include <sys/types.h> 3742956Sdillon#include <sys/sunddi.h> 3842956Sdillon#include <sys/varargs.h> 3942956Sdillon#include <sys/cpu.h> 4042956Sdillon 4142956Sdillon#define strtoul simple_strtoul 4242956Sdillon 4342956Sdillonuint32_t __acpi_acquire_global_lock(uint32_t *); 4442956Sdillonuint32_t __acpi_release_global_lock(uint32_t *); 4542956Sdillonvoid __acpi_wbinvd(void); 4642956Sdillon 4742956Sdillon#ifdef _ILP32 4842956Sdillon#define ACPI_MACHINE_WIDTH 32 4942956Sdillon#elif defined(_LP64) 5042956Sdillon#define ACPI_MACHINE_WIDTH 64 5142956Sdillon#endif 5242956Sdillon 5342956Sdillon#define COMPILER_DEPENDENT_INT64 int64_t 5442956Sdillon#define COMPILER_DEPENDENT_UINT64 uint64_t 5542956Sdillon 5642956Sdillon#define ACPI_PRINTF_LIKE_FUNC 5742956Sdillon#define ACPI_UNUSED_VAR 5842956Sdillon#define ACPI_USE_NATIVE_DIVIDE 5942956Sdillon#define ACPI_FLUSH_CPU_CACHE() (__acpi_wbinvd()) 6042956Sdillon 6142956Sdillon/* 6242956Sdillon * Calling conventions: 6342956Sdillon * 6442956Sdillon * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 6542956Sdillon * ACPI_EXTERNAL_XFACE - External ACPI interfaces 6642956Sdillon * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 6742956Sdillon * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 6842956Sdillon */ 6942956Sdillon#define ACPI_SYSTEM_XFACE 7042956Sdillon#define ACPI_EXTERNAL_XFACE 7142956Sdillon#define ACPI_INTERNAL_XFACE 7242956Sdillon#define ACPI_INTERNAL_VAR_XFACE 7342956Sdillon 7442956Sdillon#define ACPI_ASM_MACROS 7542956Sdillon#define BREAKPOINT3 7642956Sdillon#define ACPI_DISABLE_IRQS() cli() 7742956Sdillon#define ACPI_ENABLE_IRQS() sti() 7842956Sdillon#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) \ 7942956Sdillon ((Acq) = __acpi_acquire_global_lock(GLptr)) 8042956Sdillon 8142956Sdillon#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) \ 8242956Sdillon ((Acq) = __acpi_release_global_lock(GLptr)) 8342956Sdillon 8442956Sdillon#ifdef __cplusplus 8542956Sdillon} 86116182Sobrien#endif 87116182Sobrien 88116182Sobrien#endif /* _ACSOLARIS_H_ */ 8955206Speter