Home | History | Annotate | Line # | Download | only in include
apmvar.h revision 1.24.62.1
      1  1.24.62.1      yamt /*	$NetBSD: apmvar.h,v 1.24.62.1 2008/05/16 02:22:37 yamt 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  *
     18        1.8       jtk  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     19        1.8       jtk  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     20        1.8       jtk  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     21        1.8       jtk  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     22        1.8       jtk  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     23        1.8       jtk  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     24        1.8       jtk  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     25        1.8       jtk  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     26        1.8       jtk  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     27        1.8       jtk  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     28        1.1       jtk  * POSSIBILITY OF SUCH DAMAGE.
     29        1.1       jtk  */
     30        1.1       jtk #ifndef __I386_APM_H__
     31        1.1       jtk #define __I386_APM_H__
     32        1.1       jtk 
     33       1.16  takemura #include <dev/apm/apmbios.h>
     34       1.19       jmc 
     35       1.19       jmc #ifndef _LOCORE
     36       1.16  takemura #include <dev/apm/apmio.h>
     37       1.19       jmc #endif /* _LCORE */
     38        1.2       jtk 
     39        1.1       jtk /*
     40        1.3       jtk  * virtual & physical address of the trampoline
     41        1.3       jtk  * that we use: page 1.
     42        1.1       jtk  */
     43       1.17   thorpej #define APM_BIOSTRAMP	PAGE_SIZE
     44        1.1       jtk 
     45       1.19       jmc #ifndef _LOCORE
     46        1.1       jtk /* filled in by apmcall */
     47        1.1       jtk 
     48        1.1       jtk struct apm_connect_info {
     49        1.1       jtk 	u_int apm_code32_seg_base;	/* real-mode style segment selector */
     50        1.1       jtk 	u_int apm_code16_seg_base;
     51        1.1       jtk 	u_int apm_data_seg_base;
     52        1.1       jtk 	u_int apm_entrypt;
     53        1.1       jtk 	u_short	apm_segsel;		/* segment selector for APM */
     54        1.1       jtk 	u_short _pad1;
     55        1.1       jtk 	u_int apm_code32_seg_len;
     56        1.7       jtk 	u_int apm_code16_seg_len;
     57        1.1       jtk 	u_int apm_data_seg_len;
     58        1.1       jtk 	u_int apm_detail;
     59        1.1       jtk };
     60        1.1       jtk 
     61        1.1       jtk #ifdef _KERNEL
     62        1.1       jtk extern struct apm_connect_info apminfo;	/* in locore */
     63        1.1       jtk extern int apmpresent;
     64       1.18  junyoung int apmcall(int function, struct bioscallregs *regs);
     65       1.18  junyoung void bioscall(int function, struct bioscallregs *regs);
     66       1.24  christos int apm_set_powstate(void *, u_int, u_int);
     67       1.18  junyoung void apminit(void);
     68       1.18  junyoung int apm_busprobe(void);
     69        1.1       jtk #endif /* _KERNEL */
     70       1.19       jmc #endif /* _LOCORE */
     71        1.1       jtk #endif /* __i386_apm_h__ */
     72