1 1.1 uwe /* $NetBSD: bootinfo.h,v 1.1 2006/09/01 21:26:18 uwe Exp $ */ 2 1.1 uwe 3 1.1 uwe /* 4 1.1 uwe * Copyright (c) 1997 5 1.1 uwe * Matthias Drochner. All rights reserved. 6 1.1 uwe * 7 1.1 uwe * Redistribution and use in source and binary forms, with or without 8 1.1 uwe * modification, are permitted provided that the following conditions 9 1.1 uwe * are met: 10 1.1 uwe * 1. Redistributions of source code must retain the above copyright 11 1.1 uwe * notice, this list of conditions and the following disclaimer. 12 1.1 uwe * 2. Redistributions in binary form must reproduce the above copyright 13 1.1 uwe * notice, this list of conditions and the following disclaimer in the 14 1.1 uwe * documentation and/or other materials provided with the distribution. 15 1.1 uwe * 16 1.1 uwe * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 1.1 uwe * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 1.1 uwe * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 1.1 uwe * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 1.1 uwe * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 1.1 uwe * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 1.1 uwe * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 1.1 uwe * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 1.1 uwe * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 1.1 uwe * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 1.1 uwe * 27 1.1 uwe */ 28 1.1 uwe 29 1.1 uwe #ifndef _LANDISK_BOOTINFO_H__ 30 1.1 uwe #define _LANDISK_BOOTINFO_H__ 31 1.1 uwe 32 1.1 uwe struct btinfo_common { 33 1.1 uwe int len; 34 1.1 uwe int type; 35 1.1 uwe }; 36 1.1 uwe 37 1.1 uwe #define BTINFO_BOOTPATH 0 38 1.1 uwe #define BTINFO_BOOTDISK 1 39 1.1 uwe #define BTINFO_NETIF 2 40 1.1 uwe 41 1.1 uwe struct btinfo_bootpath { 42 1.1 uwe struct btinfo_common common; 43 1.1 uwe char bootpath[80]; 44 1.1 uwe }; 45 1.1 uwe 46 1.1 uwe struct btinfo_bootdisk { 47 1.1 uwe struct btinfo_common common; 48 1.1 uwe int labelsector; /* label valid if != -1 */ 49 1.1 uwe struct { 50 1.1 uwe uint16_t type, checksum; 51 1.1 uwe char packname[16]; 52 1.1 uwe } label; 53 1.1 uwe int biosdev; 54 1.1 uwe int partition; 55 1.1 uwe }; 56 1.1 uwe 57 1.1 uwe struct btinfo_netif { 58 1.1 uwe struct btinfo_common common; 59 1.1 uwe char ifname[16]; 60 1.1 uwe unsigned int tag; /* PCI, BIOS format */ 61 1.1 uwe }; 62 1.1 uwe 63 1.1 uwe #define BOOTINFO_MAXSIZE 4096 64 1.1 uwe 65 1.1 uwe struct bootinfo { 66 1.1 uwe int nentries; 67 1.1 uwe char info[BOOTINFO_MAXSIZE - sizeof(int)]; 68 1.1 uwe }; 69 1.1 uwe 70 1.1 uwe #ifdef _KERNEL 71 1.1 uwe void *lookup_bootinfo(int type); 72 1.1 uwe #endif 73 1.1 uwe 74 1.1 uwe #endif /* _LANDISK_BOOTINFO_H__ */ 75