1 /* $NetBSD: bioscall.h,v 1.11 2008/04/28 20:23:24 martin Exp $ */
4 * Copyright (c) 1997, 2000 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
8 * by John Kohl and Jason R. Thorpe.
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
32 #ifndef __I386_BIOSCALL_H__
33 #define __I386_BIOSCALL_H__
36 * virtual & physical address of the trampoline
37 * that we use: page 1.
39 #define BIOSTRAMP_BASE PAGE_SIZE
46 u_char biosreg_quarter
[4];
47 u_short biosreg_half
[2];
62 #define AL r_ax.biosreg_quarter[BIOSREG_LO]
63 #define AH r_ax.biosreg_quarter[BIOSREG_HI]
64 #define AX r_ax.biosreg_half[BIOSREG_LO]
65 #define AX_HI r_ax.biosreg_half[BIOSREG_HI]
66 #define EAX r_ax.biosreg_long
68 #define BL r_bx.biosreg_quarter[BIOSREG_LO]
69 #define BH r_bx.biosreg_quarter[BIOSREG_HI]
70 #define BX r_bx.biosreg_half[BIOSREG_LO]
71 #define BX_HI r_bx.biosreg_half[BIOSREG_HI]
72 #define EBX r_bx.biosreg_long
74 #define CL r_cx.biosreg_quarter[BIOSREG_LO]
75 #define CH r_cx.biosreg_quarter[BIOSREG_HI]
76 #define CX r_cx.biosreg_half[BIOSREG_LO]
77 #define CX_HI r_cx.biosreg_half[BIOSREG_HI]
78 #define ECX r_cx.biosreg_long
80 #define DL r_dx.biosreg_quarter[BIOSREG_LO]
81 #define DH r_dx.biosreg_quarter[BIOSREG_HI]
82 #define DX r_dx.biosreg_half[BIOSREG_LO]
83 #define DX_HI r_dx.biosreg_half[BIOSREG_HI]
84 #define EDX r_dx.biosreg_long
86 #define SI r_si.biosreg_half[BIOSREG_LO]
87 #define SI_HI r_si.biosreg_half[BIOSREG_HI]
88 #define ESI r_si.biosreg_long
90 #define DI r_di.biosreg_half[BIOSREG_LO]
91 #define DI_HI r_di.biosreg_half[BIOSREG_HI]
92 #define EDI r_di.biosreg_long
94 #define FLAGS r_flags.biosreg_half[BIOSREG_LO]
95 #define FLAGS_HI r_flags.biosreg_half[BIOSREG_HI]
96 #define EFLAGS r_flags.biosreg_long
98 #define ES r_es.biosreg_half[BIOSREG_LO]
100 void bioscall(int /* function*/ , struct bioscallregs
* /* regs */);
102 #endif /* __I386_BIOSCALL_H__ */