acpi_machdep.h revision 1.3
11.3Sjmcneill/*	$NetBSD: acpi_machdep.h,v 1.3 2007/12/09 20:27:48 jmcneill 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.1Sfvdl/*
391.1Sfvdl * Machine-dependent code for ACPI.  This is provided to the Osd
401.1Sfvdl * portion of the ACPICA.
411.1Sfvdl */
421.1Sfvdl
431.1Sfvdl#include <machine/pio.h>
441.3Sjmcneill#include <machine/i82489var.h>
451.3Sjmcneill#include <machine/i82489reg.h>
461.1Sfvdl
471.1SfvdlACPI_STATUS	acpi_md_OsInitialize(void);
481.1SfvdlACPI_STATUS	acpi_md_OsTerminate(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.2Skochi		    ACPI_OSD_HANDLER, void *, void **);
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.1Sfvdl
721.1Sfvdlint		acpi_md_sleep(int);
731.3Sjmcneillvoid		acpi_md_callback(void);
74