bios32.h revision 1.2 1 1.2 junyoung /* $NetBSD: bios32.h,v 1.2 2003/10/27 13:43:48 junyoung 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 * 3. All advertising materials mentioning features or use of this software
20 1.1 fvdl * must display the following acknowledgement:
21 1.1 fvdl * This product includes software developed by the NetBSD
22 1.1 fvdl * Foundation, Inc. and its contributors.
23 1.1 fvdl * 4. Neither the name of The NetBSD Foundation nor the names of its
24 1.1 fvdl * contributors may be used to endorse or promote products derived
25 1.1 fvdl * from this software without specific prior written permission.
26 1.1 fvdl *
27 1.1 fvdl * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
28 1.1 fvdl * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29 1.1 fvdl * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30 1.1 fvdl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
31 1.1 fvdl * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 1.1 fvdl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 1.1 fvdl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 1.1 fvdl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 1.1 fvdl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 1.1 fvdl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 1.1 fvdl * POSSIBILITY OF SUCH DAMAGE.
38 1.1 fvdl */
39 1.1 fvdl
40 1.1 fvdl /*
41 1.1 fvdl * Copyright (c) 1999, by UCHIYAMA Yasushi
42 1.1 fvdl * All rights reserved.
43 1.1 fvdl *
44 1.1 fvdl * Redistribution and use in source and binary forms, with or without
45 1.1 fvdl * modification, are permitted provided that the following conditions
46 1.1 fvdl * are met:
47 1.1 fvdl * 1. Redistributions of source code must retain the above copyright
48 1.1 fvdl * notice, this list of conditions and the following disclaimer.
49 1.1 fvdl * 2. The name of the developer may NOT be used to endorse or promote products
50 1.1 fvdl * derived from this software without specific prior written permission.
51 1.1 fvdl *
52 1.1 fvdl * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
53 1.1 fvdl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
54 1.1 fvdl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
55 1.1 fvdl * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
56 1.1 fvdl * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
57 1.1 fvdl * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
58 1.1 fvdl * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59 1.1 fvdl * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
60 1.1 fvdl * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
61 1.1 fvdl * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 1.1 fvdl * SUCH DAMAGE.
63 1.1 fvdl */
64 1.1 fvdl
65 1.1 fvdl struct bios32_entry_info {
66 1.1 fvdl paddr_t bei_base;
67 1.1 fvdl psize_t bei_size;
68 1.1 fvdl paddr_t bei_entry;
69 1.1 fvdl };
70 1.1 fvdl
71 1.1 fvdl typedef struct bios32_entry_info *bios32_entry_info_t;
72 1.1 fvdl
73 1.1 fvdl struct bios32_entry {
74 1.1 fvdl caddr_t offset;
75 1.1 fvdl u_int16_t segment;
76 1.1 fvdl } __attribute__((__packed__));
77 1.1 fvdl
78 1.1 fvdl typedef struct bios32_entry *bios32_entry_t;
79 1.1 fvdl
80 1.1 fvdl #define BIOS32_MAKESIG(a, b, c, d) \
81 1.1 fvdl ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
82 1.1 fvdl
83 1.2 junyoung void bios32_init(void);
84 1.2 junyoung int bios32_service(u_int32_t, bios32_entry_t, bios32_entry_info_t);
85