bootinfo.h revision 66458
1/* $FreeBSD: head/sys/ia64/include/bootinfo.h 66458 2000-09-29 13:46:07Z dfr $ */ 2/* 3 * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. 4 * All rights reserved. 5 * 6 * Author: Chris G. Demetriou 7 * 8 * Permission to use, copy, modify and distribute this software and 9 * its documentation is hereby granted, provided that both the copyright 10 * notice and this permission notice appear in all copies of the 11 * software, derivative works or modified versions, and any portions 12 * thereof, and that both notices appear in supporting documentation. 13 * 14 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" 15 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND 16 * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. 17 * 18 * Carnegie Mellon requests users of this software to return to 19 * 20 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 21 * School of Computer Science 22 * Carnegie Mellon University 23 * Pittsburgh PA 15213-3890 24 * 25 * any improvements or extensions that they make and grant Carnegie the 26 * rights to redistribute these changes. 27 */ 28 29/* 30 * The boot program passes a pointer (in the boot environment virtual 31 * address address space; "BEVA") to a bootinfo to the kernel using 32 * the following convention: 33 * 34 * a0 contains first free page frame number 35 * a1 contains page number of current level 1 page table 36 * if a2 contains BOOTINFO_MAGIC and a4 is nonzero: 37 * a3 contains pointer (BEVA) to bootinfo 38 * a4 contains bootinfo version number 39 * if a2 contains BOOTINFO_MAGIC and a4 contains 0 (backward compat): 40 * a3 contains pointer (BEVA) to bootinfo version 41 * (u_long), then the bootinfo 42 */ 43 44#define BOOTINFO_MAGIC 0xdeadbeeffeedface 45 46struct bootinfo_v1 { 47 u_long ssym; /* 0: start of kernel sym table */ 48 u_long esym; /* 8: end of kernel sym table */ 49 char boot_flags[64]; /* 16: boot flags */ 50 char booted_kernel[64]; /* 80: name of booted kernel */ 51 void *hwrpb; /* 144: hwrpb pointer (BEVA) */ 52 u_long hwrpbsize; /* 152: size of hwrpb data */ 53 int (*cngetc) __P((void)); /* 160: console getc pointer */ 54 void (*cnputc) __P((int)); /* 168: console putc pointer */ 55 void (*cnpollc) __P((int)); /* 176: console pollc pointer */ 56 u_long pad[6]; /* 184: rsvd for future use */ 57 char *envp; /* 232: start of environment */ 58 u_long kernend; /* 240: end of kernel */ 59 u_long modptr; /* 248: FreeBSD module base */ 60 /* 256: total size */ 61}; 62 63/* 64 * Kernel-internal structure used to hold important bits of boot 65 * information. NOT to be used by boot blocks. 66 * 67 * Note that not all of the fields from the bootinfo struct(s) 68 * passed by the boot blocks aren't here (because they're not currently 69 * used by the kernel!). Fields here which aren't supplied by the 70 * bootinfo structure passed by the boot blocks are supposed to be 71 * filled in at startup with sane contents. 72 */ 73struct bootinfo_kernel { 74 u_long ssym; /* start of syms */ 75 u_long esym; /* end of syms */ 76 u_long modptr; /* FreeBSD module pointer */ 77 u_long kernend; /* "end of kernel" from boot code */ 78 char *envp; /* "end of kernel" from boot code */ 79 u_long hwrpb_phys; /* hwrpb physical address */ 80 u_long hwrpb_size; /* size of hwrpb data */ 81 char boot_flags[64]; /* boot flags */ 82 char booted_kernel[64]; /* name of booted kernel */ 83 char booted_dev[64]; /* name of booted device */ 84}; 85 86extern struct bootinfo_kernel bootinfo; 87