acpi_machdep.h revision 1.2
11.2Skochi/*	$NetBSD: acpi_machdep.h,v 1.2 2005/05/02 14:55:12 kochi 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.1Sfvdl
451.1SfvdlACPI_STATUS	acpi_md_OsInitialize(void);
461.1SfvdlACPI_STATUS	acpi_md_OsTerminate(void);
471.1SfvdlACPI_STATUS	acpi_md_OsGetRootPointer(UINT32, ACPI_POINTER *);
481.1Sfvdl
491.1Sfvdl#define	acpi_md_OsIn8(x)	inb((x))
501.1Sfvdl#define	acpi_md_OsIn16(x)	inw((x))
511.1Sfvdl#define	acpi_md_OsIn32(x)	inl((x))
521.1Sfvdl
531.1Sfvdl#define	acpi_md_OsOut8(x, v)	outb((x), (v))
541.1Sfvdl#define	acpi_md_OsOut16(x, v)	outw((x), (v))
551.1Sfvdl#define	acpi_md_OsOut32(x, v)	outl((x), (v))
561.1Sfvdl
571.2SkochiACPI_STATUS	acpi_md_OsInstallInterruptHandler(UINT32,
581.2Skochi		    ACPI_OSD_HANDLER, void *, void **);
591.1Sfvdlvoid		acpi_md_OsRemoveInterruptHandler(void *);
601.1Sfvdl
611.1SfvdlACPI_STATUS	acpi_md_OsMapMemory(ACPI_PHYSICAL_ADDRESS, UINT32, void **);
621.1Sfvdlvoid		acpi_md_OsUnmapMemory(void *, UINT32);
631.1SfvdlACPI_STATUS	acpi_md_OsGetPhysicalAddress(void *LogicalAddress,
641.1Sfvdl		    ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
651.1Sfvdl
661.1SfvdlBOOLEAN		acpi_md_OsReadable(void *, UINT32);
671.1SfvdlBOOLEAN		acpi_md_OsWritable(void *, UINT32);
681.1Sfvdlvoid		acpi_md_OsDisableInterrupt(void);
691.1Sfvdl
701.1Sfvdlint		acpi_md_sleep(int);
711.1Sfvdlvoid		acpi_md_callback(struct device *);
721.1Sfvdl
731.1Sfvdl#ifdef ACPI_MACHDEP_PRIVATE
741.1Sfvdlu_int32_t	acpi_md_get_npages_of_wakecode(void);
751.1Sfvdlvoid		acpi_md_install_wakecode(paddr_t);
761.1Sfvdl#endif
77