bootinfo.h revision 1.2.90.1 1 1.2.90.1 rmind /* $NetBSD: bootinfo.h,v 1.2.90.1 2011/03/05 20:51:15 rmind Exp $ */
2 1.1 itojun
3 1.2.90.1 rmind /*
4 1.2.90.1 rmind * Copyright (c) 1997, 2000-2004
5 1.2.90.1 rmind * Matthias Drochner. All rights reserved.
6 1.2.90.1 rmind *
7 1.2.90.1 rmind * Redistribution and use in source and binary forms, with or without
8 1.2.90.1 rmind * modification, are permitted provided that the following conditions
9 1.2.90.1 rmind * are met:
10 1.2.90.1 rmind * 1. Redistributions of source code must retain the above copyright
11 1.2.90.1 rmind * notice, this list of conditions and the following disclaimer.
12 1.2.90.1 rmind * 2. Redistributions in binary form must reproduce the above copyright
13 1.2.90.1 rmind * notice, this list of conditions and the following disclaimer in the
14 1.2.90.1 rmind * documentation and/or other materials provided with the distribution.
15 1.2.90.1 rmind *
16 1.2.90.1 rmind * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17 1.2.90.1 rmind * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 1.2.90.1 rmind * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 1.2.90.1 rmind * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20 1.2.90.1 rmind * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 1.2.90.1 rmind * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 1.2.90.1 rmind * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 1.2.90.1 rmind * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 1.2.90.1 rmind * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 1.2.90.1 rmind * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 1.2.90.1 rmind *
27 1.2.90.1 rmind */
28 1.2.90.1 rmind
29 1.2.90.1 rmind #ifndef _MMEYE_BOOTINFO_H_
30 1.2.90.1 rmind #define _MMEYE_BOOTINFO_H_
31 1.2.90.1 rmind
32 1.2.90.1 rmind #define BOOTINFO_MAGIC 0xb007babe
33 1.2.90.1 rmind #define BOOTINFO_SIZE 1024
34 1.2.90.1 rmind
35 1.2.90.1 rmind struct btinfo_common {
36 1.2.90.1 rmind int32_t next; /* offset of next item, or zero */
37 1.2.90.1 rmind int32_t type;
38 1.2.90.1 rmind };
39 1.2.90.1 rmind
40 1.2.90.1 rmind #define BTINFO_MAGIC 1
41 1.2.90.1 rmind #define BTINFO_BOOTDEV 2
42 1.2.90.1 rmind #define BTINFO_BOOTPATH 3
43 1.2.90.1 rmind #define BTINFO_HOWTO 4
44 1.2.90.1 rmind
45 1.2.90.1 rmind struct btinfo_magic {
46 1.2.90.1 rmind struct btinfo_common common;
47 1.2.90.1 rmind int32_t magic;
48 1.2.90.1 rmind };
49 1.2.90.1 rmind
50 1.2.90.1 rmind #define BTINFO_BOOTDEV_LEN 8
51 1.2.90.1 rmind struct btinfo_bootdev {
52 1.2.90.1 rmind struct btinfo_common common;
53 1.2.90.1 rmind char bootdev[BTINFO_BOOTDEV_LEN];
54 1.2.90.1 rmind };
55 1.2.90.1 rmind
56 1.2.90.1 rmind #define BTINFO_BOOTPATH_LEN 80
57 1.2.90.1 rmind struct btinfo_bootpath {
58 1.2.90.1 rmind struct btinfo_common common;
59 1.2.90.1 rmind char bootpath[BTINFO_BOOTPATH_LEN];
60 1.2.90.1 rmind };
61 1.2.90.1 rmind
62 1.2.90.1 rmind struct btinfo_howto {
63 1.2.90.1 rmind struct btinfo_common common;
64 1.2.90.1 rmind
65 1.2.90.1 rmind uint32_t bi_howto;
66 1.2.90.1 rmind };
67 1.2.90.1 rmind
68 1.2.90.1 rmind #ifdef _KERNEL
69 1.2.90.1 rmind void *lookup_bootinfo(unsigned int);
70 1.2.90.1 rmind #endif
71 1.2.90.1 rmind
72 1.2.90.1 rmind #endif /* !_MMEYE_BOOTINFO_H_ */
73