Home | History | Annotate | Line # | Download | only in include
bootinfo.h revision 1.7
      1  1.7      phx /*	$NetBSD: bootinfo.h,v 1.7 2010/05/20 19:27:25 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.7      phx #define BTINFO_PRODFAMILY	8
     47  1.4  garbled 
     48  1.4  garbled struct btinfo_magic {
     49  1.4  garbled 	struct btinfo_common common;
     50  1.4  garbled 	unsigned magic;
     51  1.4  garbled };
     52  1.1   briggs 
     53  1.1   briggs struct btinfo_memory {
     54  1.1   briggs 	struct btinfo_common common;
     55  1.1   briggs 	int memsize;
     56  1.1   briggs };
     57  1.1   briggs 
     58  1.1   briggs struct btinfo_console {
     59  1.1   briggs 	struct btinfo_common common;
     60  1.4  garbled 	char devname[8];
     61  1.1   briggs 	int addr;
     62  1.1   briggs 	int speed;
     63  1.1   briggs };
     64  1.1   briggs 
     65  1.1   briggs struct btinfo_clock {
     66  1.1   briggs 	struct btinfo_common common;
     67  1.1   briggs 	int ticks_per_sec;
     68  1.1   briggs };
     69  1.1   briggs 
     70  1.4  garbled struct btinfo_bootpath {
     71  1.4  garbled 	struct btinfo_common common;
     72  1.4  garbled 	char bootpath[80];
     73  1.4  garbled };
     74  1.4  garbled 
     75  1.4  garbled struct btinfo_rootdevice {
     76  1.4  garbled 	struct btinfo_common common;
     77  1.4  garbled 	char devname[16];
     78  1.4  garbled 	unsigned cookie;
     79  1.4  garbled };
     80  1.4  garbled 
     81  1.5      phx struct btinfo_net {
     82  1.5      phx 	struct btinfo_common common;
     83  1.5      phx 	char devname[16];
     84  1.6      phx 	unsigned cookie;
     85  1.5      phx 	uint8_t mac_address[6];
     86  1.5      phx };
     87  1.5      phx 
     88  1.7      phx struct btinfo_prodfamily {
     89  1.7      phx 	struct btinfo_common common;
     90  1.7      phx 	char name[24];
     91  1.7      phx };
     92  1.7      phx 
     93  1.4  garbled #define BOOTINFO_MAXSIZE 4096
     94  1.4  garbled 
     95  1.1   briggs #ifdef _KERNEL
     96  1.4  garbled void *lookup_bootinfo(int);
     97  1.1   briggs #endif
     98  1.1   briggs 
     99  1.1   briggs #endif	/* _MACHINE_BOOTINFO_H_ */
    100