Home | History | Annotate | Line # | Download | only in include
bootinfo.h revision 1.6
      1  1.6      phx /*	$NetBSD: bootinfo.h,v 1.6 2010/05/18 15:07:50 phx Exp $	*/
      2  1.1   briggs 
      3  1.1   briggs /*
      4  1.1   briggs  * Copyright (c) 1997
      5  1.1   briggs  *	Matthias Drochner.  All rights reserved.
      6  1.1   briggs  *
      7  1.1   briggs  * Redistribution and use in source and binary forms, with or without
      8  1.1   briggs  * modification, are permitted provided that the following conditions
      9  1.1   briggs  * are met:
     10  1.1   briggs  * 1. Redistributions of source code must retain the above copyright
     11  1.1   briggs  *    notice, this list of conditions and the following disclaimer.
     12  1.1   briggs  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1   briggs  *    notice, this list of conditions and the following disclaimer in the
     14  1.1   briggs  *    documentation and/or other materials provided with the distribution.
     15  1.1   briggs  *
     16  1.1   briggs  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     17  1.1   briggs  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     18  1.1   briggs  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     19  1.1   briggs  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     20  1.1   briggs  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     21  1.1   briggs  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     22  1.1   briggs  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     23  1.1   briggs  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     24  1.1   briggs  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     25  1.1   briggs  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     26  1.1   briggs  *
     27  1.1   briggs  */
     28  1.1   briggs 
     29  1.1   briggs #ifndef	_MACHINE_BOOTINFO_H_
     30  1.4  garbled #define _MACHINE_BOOTINFO_H_
     31  1.4  garbled 
     32  1.4  garbled #define BOOTINFO_MAGIC	0xb007babe
     33  1.1   briggs 
     34  1.1   briggs struct btinfo_common {
     35  1.1   briggs 	int next;		/* offset of next item, or zero */
     36  1.1   briggs 	int type;
     37  1.1   briggs };
     38  1.1   briggs 
     39  1.4  garbled #define BTINFO_MAGIC		1
     40  1.4  garbled #define BTINFO_MEMORY		2
     41  1.4  garbled #define BTINFO_CONSOLE		3
     42  1.4  garbled #define BTINFO_CLOCK		4
     43  1.4  garbled #define BTINFO_BOOTPATH		5
     44  1.4  garbled #define BTINFO_ROOTDEVICE	6
     45  1.5      phx #define BTINFO_NET		7
     46  1.4  garbled 
     47  1.4  garbled struct btinfo_magic {
     48  1.4  garbled 	struct btinfo_common common;
     49  1.4  garbled 	unsigned magic;
     50  1.4  garbled };
     51  1.1   briggs 
     52  1.1   briggs struct btinfo_memory {
     53  1.1   briggs 	struct btinfo_common common;
     54  1.1   briggs 	int memsize;
     55  1.1   briggs };
     56  1.1   briggs 
     57  1.1   briggs struct btinfo_console {
     58  1.1   briggs 	struct btinfo_common common;
     59  1.4  garbled 	char devname[8];
     60  1.1   briggs 	int addr;
     61  1.1   briggs 	int speed;
     62  1.1   briggs };
     63  1.1   briggs 
     64  1.1   briggs struct btinfo_clock {
     65  1.1   briggs 	struct btinfo_common common;
     66  1.1   briggs 	int ticks_per_sec;
     67  1.1   briggs };
     68  1.1   briggs 
     69  1.4  garbled struct btinfo_bootpath {
     70  1.4  garbled 	struct btinfo_common common;
     71  1.4  garbled 	char bootpath[80];
     72  1.4  garbled };
     73  1.4  garbled 
     74  1.4  garbled struct btinfo_rootdevice {
     75  1.4  garbled 	struct btinfo_common common;
     76  1.4  garbled 	char devname[16];
     77  1.4  garbled 	unsigned cookie;
     78  1.4  garbled };
     79  1.4  garbled 
     80  1.5      phx struct btinfo_net {
     81  1.5      phx 	struct btinfo_common common;
     82  1.5      phx 	char devname[16];
     83  1.6      phx 	unsigned cookie;
     84  1.5      phx 	uint8_t mac_address[6];
     85  1.5      phx };
     86  1.5      phx 
     87  1.4  garbled #define BOOTINFO_MAXSIZE 4096
     88  1.4  garbled 
     89  1.1   briggs #ifdef _KERNEL
     90  1.4  garbled void *lookup_bootinfo(int);
     91  1.1   briggs #endif
     92  1.1   briggs 
     93  1.1   briggs #endif	/* _MACHINE_BOOTINFO_H_ */
     94