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