summaryrefslogtreecommitdiffstats
path: root/sys/i386/include
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1995-01-25 21:40:47 +0000
committerbde <bde@FreeBSD.org>1995-01-25 21:40:47 +0000
commit802677cea866a1db7729c2a2ce5668570d364062 (patch)
tree0fe59a9f89cd6b9339c628dc3655fff907c49212 /sys/i386/include
parent152d1bd214d432fa6ecbdc6c6308ce3d2356aaa1 (diff)
downloadFreeBSD-src-802677cea866a1db7729c2a2ce5668570d364062.zip
FreeBSD-src-802677cea866a1db7729c2a2ce5668570d364062.tar.gz
Load the kernel symbol table in the boot loader and not at compile time.
(Boot with the -D flag if you want symbols.) Make it easier to extend `struct bootinfo' without losing either forwards or backwards compatibility. ddb_aout.c: Get the symbol table from wherever the loader put it. Nuke db_symtab[SYMTAB_SPACE]. boot.c: Enable loading of symbols. Align them on a page boundary. Add printfs about the symbol table sizes. Pass the memory sizes to the kernel. Fix initialization of `unit' (it got moved out of the loop). Fix adding the bss size (it got moved inside an ifdef). Initialize serial port when RB_SERIAL is toggled on. Fix comments. Clean up formatting of recently added code. io.c: Clean up formatting of recently added code. netboot/main.c, machdep.c, wd.c: Change names of bootinfo fields. LINT: Nuke SYMTAB_SPACE. Fix comment about DODUMP. Makefile.i386: Nuke use of dbsym. Exclude gcc symbols from kernel unless compiling with -g. Remove unused macro. Fix comments and formatting. genassym.c: Generate defines for some new bootinfo fields. Change names of old ones. locore.s: Copy only the valid part of the `struct bootinfo' passed by the loader. Reserve space for symbol table, if any. machdep.c: Check the memory sizes passed by the loader, if any. Don't use them yet. bootinfo.h: Add a size field so that we can resolve some mismatches between the loader bootinfo and the kernel boot info. The version number is not so good for this because of historical botches and because it's harder to maintain. Add memory size and symbol table fields. Change the names of everything. Hacks to save a few bytes: asm.S, boot.c, boot2.S: Replace `ouraddr' by `(BOOTSEG << 4)'. boot.c: Don't statically initialize `loadflags' to 0. Disable the "REDUNDANT" code that skips the BIOS variables. Eliminate `total'. Combine some more printfs. boot.h, disk.c, io.c, table.c: Move all statically initialzed data to table.c. io.c: Don't put the A20 gate bits in a variable.
Diffstat (limited to 'sys/i386/include')
-rw-r--r--sys/i386/include/bootinfo.h39
1 files changed, 29 insertions, 10 deletions
diff --git a/sys/i386/include/bootinfo.h b/sys/i386/include/bootinfo.h
index b86a034..757e7e4 100644
--- a/sys/i386/include/bootinfo.h
+++ b/sys/i386/include/bootinfo.h
@@ -29,22 +29,41 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bootinfo.h,v 1.2 1994/11/18 05:02:43 phk Exp $
+ * $Id: bootinfo.h,v 1.3 1994/11/18 05:26:52 phk Exp $
*/
#ifndef _MACHINE_BOOTINFO_H_
#define _MACHINE_BOOTINFO_H_
-#define N_BIOS_GEOM 8
-struct bootinfo_t {
- unsigned int version;
- unsigned char *kernelname;
- struct nfs_diskless *nfs_diskless;
- unsigned int n_bios_used;
- unsigned long bios_geom[N_BIOS_GEOM];
+/* Only change the version number if you break compatibility. */
+#define BOOTINFO_VERSION 1
+
+#define N_BIOS_GEOM 8
+
+/*
+ * A zero bootinfo field often means that there is no info available.
+ * Flags are used to indicate the validity of fields where zero is a
+ * normal value.
+ */
+struct bootinfo {
+ unsigned int bi_version;
+ unsigned char *bi_kernelname;
+ struct nfs_diskless *bi_nfs_diskless;
+ /* End of fields that are always present. */
+#define bi_endcommon bi_n_bios_used
+ unsigned int bi_n_bios_used;
+ unsigned long bi_bios_geom[N_BIOS_GEOM];
+ unsigned int bi_size;
+ unsigned char bi_memsizes_valid;
+ unsigned char bi_pad[3];
+ unsigned long bi_basemem;
+ unsigned long bi_extmem;
+ unsigned long bi_symtab;
+ unsigned long bi_esymtab;
};
#ifdef KERNEL
-extern struct bootinfo_t bootinfo;
+extern struct bootinfo bootinfo;
#endif
-#endif /* _MACHINE_BOOTINFO_H_ */
+
+#endif /* !_MACHINE_BOOTINFO_H_ */
OpenPOWER on IntegriCloud