Home | History | Annotate | Line # | Download | only in include
apmvar.h revision 1.23.16.1
      1  1.23.16.1   gdamore /*	$NetBSD: apmvar.h,v 1.23.16.1 2006/07/13 17:48:53 gdamore 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.19       jmc 
     42       1.19       jmc #ifndef _LOCORE
     43       1.16  takemura #include <dev/apm/apmio.h>
     44       1.19       jmc #endif /* _LCORE */
     45        1.2       jtk 
     46        1.1       jtk /*
     47        1.3       jtk  * virtual & physical address of the trampoline
     48        1.3       jtk  * that we use: page 1.
     49        1.1       jtk  */
     50       1.17   thorpej #define APM_BIOSTRAMP	PAGE_SIZE
     51        1.1       jtk 
     52       1.19       jmc #ifndef _LOCORE
     53        1.1       jtk /* filled in by apmcall */
     54        1.1       jtk 
     55        1.1       jtk struct apm_connect_info {
     56        1.1       jtk 	u_int apm_code32_seg_base;	/* real-mode style segment selector */
     57        1.1       jtk 	u_int apm_code16_seg_base;
     58        1.1       jtk 	u_int apm_data_seg_base;
     59        1.1       jtk 	u_int apm_entrypt;
     60        1.1       jtk 	u_short	apm_segsel;		/* segment selector for APM */
     61        1.1       jtk 	u_short _pad1;
     62        1.1       jtk 	u_int apm_code32_seg_len;
     63        1.7       jtk 	u_int apm_code16_seg_len;
     64        1.1       jtk 	u_int apm_data_seg_len;
     65        1.1       jtk 	u_int apm_detail;
     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.18  junyoung int apmcall(int function, struct bioscallregs *regs);
     72       1.18  junyoung void bioscall(int function, struct bioscallregs *regs);
     73  1.23.16.1   gdamore int apm_set_powstate(void *, u_int, u_int);
     74       1.18  junyoung void apminit(void);
     75       1.18  junyoung int apm_busprobe(void);
     76        1.1       jtk #endif /* _KERNEL */
     77       1.19       jmc #endif /* _LOCORE */
     78        1.1       jtk #endif /* __i386_apm_h__ */
     79