Home | History | Annotate | Line # | Download | only in include
apmvar.h revision 1.16
      1  1.16  takemura /*	$NetBSD: apmvar.h,v 1.16 2002/10/14 02:08:39 takemura Exp $	*/
      2   1.8       jtk /*-
      3   1.8       jtk  * Copyright (c) 1995 The NetBSD Foundation, Inc.
      4   1.8       jtk  * All rights reserved.
      5   1.8       jtk  *
      6   1.8       jtk  * This code is derived from software contributed to The NetBSD Foundation
      7   1.8       jtk  * by John Kohl.
      8   1.8       jtk  *
      9   1.8       jtk  * Redistribution and use in source and binary forms, with or without
     10   1.8       jtk  * modification, are permitted provided that the following conditions
     11   1.8       jtk  * are met:
     12   1.8       jtk  * 1. Redistributions of source code must retain the above copyright
     13   1.8       jtk  *    notice, this list of conditions and the following disclaimer.
     14   1.8       jtk  * 2. Redistributions in binary form must reproduce the above copyright
     15   1.8       jtk  *    notice, this list of conditions and the following disclaimer in the
     16   1.8       jtk  *    documentation and/or other materials provided with the distribution.
     17   1.8       jtk  * 3. All advertising materials mentioning features or use of this software
     18   1.8       jtk  *    must display the following acknowledgement:
     19   1.8       jtk  *        This product includes software developed by the NetBSD
     20   1.8       jtk  *        Foundation, Inc. and its contributors.
     21   1.8       jtk  * 4. Neither the name of The NetBSD Foundation nor the names of its
     22   1.8       jtk  *    contributors may be used to endorse or promote products derived
     23   1.8       jtk  *    from this software without specific prior written permission.
     24   1.8       jtk  *
     25   1.8       jtk  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     26   1.8       jtk  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27   1.8       jtk  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28   1.8       jtk  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     29   1.8       jtk  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30   1.8       jtk  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31   1.8       jtk  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32   1.8       jtk  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33   1.8       jtk  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34   1.8       jtk  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35   1.1       jtk  * POSSIBILITY OF SUCH DAMAGE.
     36   1.1       jtk  */
     37   1.1       jtk #ifndef __I386_APM_H__
     38   1.1       jtk #define __I386_APM_H__
     39   1.1       jtk 
     40  1.16  takemura #include <dev/apm/apmbios.h>
     41  1.16  takemura #include <dev/apm/apmio.h>
     42   1.2       jtk 
     43   1.1       jtk /*
     44   1.3       jtk  * virtual & physical address of the trampoline
     45   1.3       jtk  * that we use: page 1.
     46   1.1       jtk  */
     47   1.3       jtk #define APM_BIOSTRAMP	NBPG
     48   1.1       jtk 
     49   1.1       jtk /* filled in by apmcall */
     50   1.1       jtk 
     51   1.1       jtk struct apm_connect_info {
     52   1.1       jtk 	u_int apm_code32_seg_base;	/* real-mode style segment selector */
     53   1.1       jtk 	u_int apm_code16_seg_base;
     54   1.1       jtk 	u_int apm_data_seg_base;
     55   1.1       jtk 	u_int apm_entrypt;
     56   1.1       jtk 	u_short	apm_segsel;		/* segment selector for APM */
     57   1.1       jtk 	u_short _pad1;
     58   1.1       jtk 	u_int apm_code32_seg_len;
     59   1.7       jtk 	u_int apm_code16_seg_len;
     60   1.1       jtk 	u_int apm_data_seg_len;
     61   1.1       jtk 	u_int apm_detail;
     62   1.1       jtk };
     63   1.1       jtk 
     64   1.1       jtk struct apm_attach_args {
     65   1.1       jtk 	char *aaa_busname;
     66   1.1       jtk };
     67   1.1       jtk 
     68   1.1       jtk #ifdef _KERNEL
     69   1.1       jtk extern struct apm_connect_info apminfo;	/* in locore */
     70   1.1       jtk extern int apmpresent;
     71  1.12     perry int apmcall __P((int function, struct bioscallregs *regs));
     72  1.12     perry void bioscall __P((int function, struct bioscallregs *regs));
     73  1.12     perry void apm_cpu_busy __P((void));
     74  1.12     perry void apm_cpu_idle __P((void));
     75  1.12     perry void apminit __P((void));
     76   1.1       jtk int apm_set_powstate __P((u_int devid, u_int powstate));
     77  1.12     perry int apm_busprobe __P((void));
     78   1.1       jtk #endif /* _KERNEL */
     79   1.1       jtk #endif /* __i386_apm_h__ */
     80