11.14Sthorpej/* $NetBSD: acpi_machdep.h,v 1.14 2019/12/22 15:57:07 thorpej Exp $ */ 21.1Sfvdl 31.1Sfvdl/* 41.1Sfvdl * Copyright 2001 Wasabi Systems, Inc. 51.1Sfvdl * All rights reserved. 61.1Sfvdl * 71.1Sfvdl * Written by Jason R. Thorpe for Wasabi Systems, Inc. 81.1Sfvdl * 91.1Sfvdl * Redistribution and use in source and binary forms, with or without 101.1Sfvdl * modification, are permitted provided that the following conditions 111.1Sfvdl * are met: 121.1Sfvdl * 1. Redistributions of source code must retain the above copyright 131.1Sfvdl * notice, this list of conditions and the following disclaimer. 141.1Sfvdl * 2. Redistributions in binary form must reproduce the above copyright 151.1Sfvdl * notice, this list of conditions and the following disclaimer in the 161.1Sfvdl * documentation and/or other materials provided with the distribution. 171.1Sfvdl * 3. All advertising materials mentioning features or use of this software 181.1Sfvdl * must display the following acknowledgement: 191.1Sfvdl * This product includes software developed for the NetBSD Project by 201.1Sfvdl * Wasabi Systems, Inc. 211.1Sfvdl * 4. The name of Wasabi Systems, Inc. may not be used to endorse 221.1Sfvdl * or promote products derived from this software without specific prior 231.1Sfvdl * written permission. 241.1Sfvdl * 251.1Sfvdl * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 261.1Sfvdl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 271.1Sfvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 281.1Sfvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 291.1Sfvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 301.1Sfvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 311.1Sfvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 321.1Sfvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 331.1Sfvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 341.1Sfvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 351.1Sfvdl * POSSIBILITY OF SUCH DAMAGE. 361.1Sfvdl */ 371.1Sfvdl 381.6Sjruoho#ifndef _X86_ACPI_MACHDEP_H_ 391.6Sjruoho#define _X86_ACPI_MACHDEP_H_ 401.6Sjruoho 411.1Sfvdl/* 421.6Sjruoho * Machine-dependent code for ACPI. 431.1Sfvdl */ 441.1Sfvdl#include <machine/pio.h> 451.3Sjmcneill#include <machine/i82489var.h> 461.3Sjmcneill#include <machine/i82489reg.h> 471.1Sfvdl 481.6SjruohoACPI_STATUS acpi_md_OsInitialize(void); 491.3SjmcneillACPI_PHYSICAL_ADDRESS acpi_md_OsGetRootPointer(void); 501.1Sfvdl 511.1Sfvdl#define acpi_md_OsIn8(x) inb((x)) 521.1Sfvdl#define acpi_md_OsIn16(x) inw((x)) 531.1Sfvdl#define acpi_md_OsIn32(x) inl((x)) 541.1Sfvdl 551.1Sfvdl#define acpi_md_OsOut8(x, v) outb((x), (v)) 561.1Sfvdl#define acpi_md_OsOut16(x, v) outw((x), (v)) 571.1Sfvdl#define acpi_md_OsOut32(x, v) outl((x), (v)) 581.1Sfvdl 591.2SkochiACPI_STATUS acpi_md_OsInstallInterruptHandler(UINT32, 601.12Sbouyer ACPI_OSD_HANDLER, void *, void **, const char *); 611.1Sfvdlvoid acpi_md_OsRemoveInterruptHandler(void *); 621.1Sfvdl 631.1SfvdlACPI_STATUS acpi_md_OsMapMemory(ACPI_PHYSICAL_ADDRESS, UINT32, void **); 641.1Sfvdlvoid acpi_md_OsUnmapMemory(void *, UINT32); 651.1SfvdlACPI_STATUS acpi_md_OsGetPhysicalAddress(void *LogicalAddress, 661.1Sfvdl ACPI_PHYSICAL_ADDRESS *PhysicalAddress); 671.1Sfvdl 681.1SfvdlBOOLEAN acpi_md_OsReadable(void *, UINT32); 691.1SfvdlBOOLEAN acpi_md_OsWritable(void *, UINT32); 701.1Sfvdlvoid acpi_md_OsDisableInterrupt(void); 711.5Sjmcneillvoid acpi_md_OsEnableInterrupt(void); 721.1Sfvdl 731.13Sjmcneillvoid * acpi_md_intr_establish(uint32_t, int, int, int (*)(void *), 741.13Sjmcneill void *, bool, const char *); 751.14Sthorpejvoid acpi_md_intr_mask(void *); 761.14Sthorpejvoid acpi_md_intr_unmask(void *); 771.13Sjmcneillvoid acpi_md_intr_disestablish(void *); 781.13Sjmcneill 791.1Sfvdlint acpi_md_sleep(int); 801.4Sjoergvoid acpi_md_sleep_init(void); 811.9Sjruoho 821.9Sjruohouint32_t acpi_md_pdc(void); 831.8Sjruohouint32_t acpi_md_ncpus(void); 841.11Schsstruct acpi_softc; 851.11Schsvoid acpi_md_callback(struct acpi_softc *); 861.6Sjruoho 871.6Sjruoho#endif /* !_X86_ACPI_MACHDEP_H_ */ 88