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