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