Home | History | Annotate | Line # | Download | only in include
bioscall.h revision 1.4
      1 /*	$NetBSD: bioscall.h,v 1.4 1998/10/01 02:00:37 jtk Exp $ */
      2 /*
      3  *  Copyright (c) 1997 John T. Kohl
      4  *  All rights reserved.
      5  *
      6  *  Redistribution and use in source and binary forms, with or without
      7  *  modification, are permitted provided that the following conditions
      8  *  are met:
      9  *  1. Redistributions of source code must retain the above copyright
     10  *     notice, this list of conditions and the following disclaimer.
     11  *  2. Redistributions in binary form must reproduce the above copyright
     12  *     notice, this list of conditions and the following disclaimer in the
     13  *     documentation and/or other materials provided with the distribution.
     14  *  3. The name of the author may not be used to endorse or promote products
     15  *     derived from this software without specific prior written permission.
     16  *
     17  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR `AS IS'' AND ANY EXPRESS OR
     18  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
     19  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
     20  * DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
     21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
     22  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
     23  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     24  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
     25  * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
     26  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     27  * POSSIBILITY OF SUCH DAMAGE.
     28  *
     29  */
     30 #ifndef __I386_BIOSCALL_H__
     31 #define __I386_BIOSCALL_H__
     32 
     33 /*
     34  * virtual & physical address of the trampoline
     35  * that we use: page 1.
     36  */
     37 #define BIOSTRAMP_BASE	NBPG
     38 
     39 #ifndef _LOCORE
     40 typedef union bios_register {
     41 	struct {
     42 		u_short hw_lo;
     43 		u_short hw_hi;
     44 	} halfword;
     45 	u_int longword;
     46 } bios_reg;
     47 
     48 struct bioscallregs {
     49     bios_reg r_ax;
     50     bios_reg r_bx;
     51     bios_reg r_cx;
     52     bios_reg r_dx;
     53     bios_reg r_si;
     54     bios_reg r_di;
     55     bios_reg r_flags;
     56 };
     57 #define AX r_ax.halfword.hw_lo
     58 #define AX_HI r_ax.halfword.hw_hi
     59 #define EAX r_ax.longword
     60 #define BX r_bx.halfword.hw_lo
     61 #define BX_HI r_bx.halfword.hw_hi
     62 #define EBX r_bx.longword
     63 #define CX r_cx.halfword.hw_lo
     64 #define CX_HI r_cx.halfword.hw_hi
     65 #define ECX r_cx.longword
     66 #define DX r_dx.halfword.hw_lo
     67 #define DX_HI r_dx.halfword.hw_hi
     68 #define EDX r_dx.longword
     69 #define SI r_si.halfword.hw_lo
     70 #define SI_HI r_si.halfword.hw_hi
     71 #define ESI r_si.longword
     72 #define DI r_di.halfword.hw_lo
     73 #define DI_HI r_di.halfword.hw_hi
     74 #define EDI r_di.longword
     75 #define FLAGS r_flags.halfword.hw_lo
     76 #define FLAGS_HI r_flags.halfword.hw_hi
     77 #define EFLAGS r_flags.longword
     78 
     79 void bioscall __P((int /* function*/ , struct bioscallregs * /* regs */));
     80 #endif
     81 #endif /* __I386_BIOSCALL_H__ */
     82