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