acpica_machdep.h revision 254300
1114902Sscottl/*- 2114902Sscottl * Copyright (c) 2002 Mitsuru IWASAKI 3114902Sscottl * All rights reserved. 4114902Sscottl * 5114902Sscottl * Redistribution and use in source and binary forms, with or without 6114902Sscottl * modification, are permitted provided that the following conditions 7114902Sscottl * are met: 8114902Sscottl * 1. Redistributions of source code must retain the above copyright 9114902Sscottl * notice, this list of conditions and the following disclaimer. 10114902Sscottl * 2. Redistributions in binary form must reproduce the above copyright 11114902Sscottl * notice, this list of conditions and the following disclaimer in the 12114902Sscottl * documentation and/or other materials provided with the distribution. 13114902Sscottl * 14114902Sscottl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15114902Sscottl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16114902Sscottl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17114902Sscottl * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18114902Sscottl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19114902Sscottl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20114902Sscottl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21114902Sscottl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22114902Sscottl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23114902Sscottl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24114902Sscottl * SUCH DAMAGE. 25114902Sscottl * 26114902Sscottl * $FreeBSD: head/sys/ia64/include/acpica_machdep.h 254300 2013-08-13 21:34:03Z jkim $ 27114902Sscottl */ 28114902Sscottl 29119418Sobrien/****************************************************************************** 30119418Sobrien * 31114902Sscottl * Name: acpica_machdep.h - arch-specific defines, etc. 32114902Sscottl * $Revision$ 33119418Sobrien * 34114902Sscottl *****************************************************************************/ 35119997Sps 36114902Sscottl#ifndef __ACPICA_MACHDEP_H__ 37114902Sscottl#define __ACPICA_MACHDEP_H__ 38114902Sscottl 39114902Sscottl#ifdef _KERNEL 40114902Sscottl 41114902Sscottl/* 42114902Sscottl * Calling conventions: 43114902Sscottl * 44114902Sscottl * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) 45114902Sscottl * ACPI_EXTERNAL_XFACE - External ACPI interfaces 46114902Sscottl * ACPI_INTERNAL_XFACE - Internal ACPI interfaces 47114902Sscottl * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces 48114902Sscottl */ 49114902Sscottl#define ACPI_SYSTEM_XFACE 50114902Sscottl#define ACPI_EXTERNAL_XFACE 51114902Sscottl#define ACPI_INTERNAL_XFACE 52114902Sscottl#define ACPI_INTERNAL_VAR_XFACE 53114902Sscottl 54114902Sscottl/* Asm macros */ 55114902Sscottl 56114902Sscottl#define ACPI_ASM_MACROS 57116852Sscottl#define BREAKPOINT3 58117167Sjhb#define ACPI_DISABLE_IRQS() ia64_disable_intr() 59116852Sscottl#define ACPI_ENABLE_IRQS() ia64_enable_intr() 60116852Sscottl 61116852Sscottl#define ACPI_FLUSH_CPU_CACHE() /* XXX ia64_fc()? */ 62116852Sscottl 63114902Sscottl/* Section 5.2.10.1: global lock acquire/release functions */ 64114902Sscottlint acpi_acquire_global_lock(volatile uint32_t *); 65114902Sscottlint acpi_release_global_lock(volatile uint32_t *); 66114902Sscottl#define ACPI_ACQUIRE_GLOBAL_LOCK(GLptr, Acq) do { \ 67114902Sscottl (Acq) = acpi_acquire_global_lock(&((GLptr)->GlobalLock)); \ 68114902Sscottl} while (0) 69114902Sscottl#define ACPI_RELEASE_GLOBAL_LOCK(GLptr, Acq) do { \ 70114902Sscottl (Acq) = acpi_release_global_lock(&((GLptr)->GlobalLock)); \ 71114902Sscottl} while (0) 72114902Sscottl 73114902Sscottlvoid acpi_cpu_c1(void); 74114902Sscottl 75114902Sscottl#endif /* _KERNEL */ 76114902Sscottl 77114902Sscottl#endif /* __ACPICA_MACHDEP_H__ */ 78114902Sscottl