bios32.h revision 1.4.6.1 1 1.4.6.1 mjf /* $NetBSD: bios32.h,v 1.4.6.1 2008/06/02 13:22:49 mjf Exp $ */
2 1.1 fvdl
3 1.1 fvdl /*-
4 1.1 fvdl * Copyright (c) 1999 The NetBSD Foundation, Inc.
5 1.1 fvdl * All rights reserved.
6 1.1 fvdl *
7 1.1 fvdl * This code is derived from software contributed to The NetBSD Foundation
8 1.1 fvdl * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 1.1 fvdl * NASA Ames Research Center.
10 1.1 fvdl *
11 1.1 fvdl * Redistribution and use in source and binary forms, with or without
12 1.1 fvdl * modification, are permitted provided that the following conditions
13 1.1 fvdl * are met:
14 1.1 fvdl * 1. Redistributions of source code must retain the above copyright
15 1.1 fvdl * notice, this list of conditions and the following disclaimer.
16 1.1 fvdl * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 fvdl * notice, this list of conditions and the following disclaimer in the
18 1.1 fvdl * documentation and/or other materials provided with the distribution.
19 1.1 fvdl *
20 1.1 fvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 1.1 fvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 1.1 fvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 1.1 fvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 1.1 fvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 1.1 fvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 1.1 fvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 1.1 fvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 1.1 fvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 1.1 fvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 1.1 fvdl * POSSIBILITY OF SUCH DAMAGE.
31 1.1 fvdl */
32 1.1 fvdl
33 1.1 fvdl /*
34 1.1 fvdl * Copyright (c) 1999, by UCHIYAMA Yasushi
35 1.1 fvdl * All rights reserved.
36 1.1 fvdl *
37 1.1 fvdl * Redistribution and use in source and binary forms, with or without
38 1.1 fvdl * modification, are permitted provided that the following conditions
39 1.1 fvdl * are met:
40 1.1 fvdl * 1. Redistributions of source code must retain the above copyright
41 1.1 fvdl * notice, this list of conditions and the following disclaimer.
42 1.1 fvdl * 2. The name of the developer may NOT be used to endorse or promote products
43 1.1 fvdl * derived from this software without specific prior written permission.
44 1.1 fvdl *
45 1.1 fvdl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
46 1.1 fvdl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47 1.1 fvdl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48 1.1 fvdl * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
49 1.1 fvdl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
50 1.1 fvdl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
51 1.1 fvdl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
52 1.1 fvdl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
53 1.1 fvdl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
54 1.1 fvdl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
55 1.1 fvdl * SUCH DAMAGE.
56 1.1 fvdl */
57 1.1 fvdl
58 1.1 fvdl struct bios32_entry_info {
59 1.1 fvdl paddr_t bei_base;
60 1.1 fvdl psize_t bei_size;
61 1.1 fvdl paddr_t bei_entry;
62 1.1 fvdl };
63 1.1 fvdl
64 1.1 fvdl typedef struct bios32_entry_info *bios32_entry_info_t;
65 1.1 fvdl
66 1.1 fvdl struct bios32_entry {
67 1.3 christos void * offset;
68 1.1 fvdl u_int16_t segment;
69 1.4 perry } __packed;
70 1.1 fvdl
71 1.1 fvdl typedef struct bios32_entry *bios32_entry_t;
72 1.1 fvdl
73 1.1 fvdl #define BIOS32_MAKESIG(a, b, c, d) \
74 1.1 fvdl ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
75 1.1 fvdl
76 1.2 junyoung void bios32_init(void);
77 1.2 junyoung int bios32_service(u_int32_t, bios32_entry_t, bios32_entry_info_t);
78