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