mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-20 11:11:24 +00:00
b5d89ca8ad
(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.
70 lines
2.7 KiB
C
70 lines
2.7 KiB
C
/*-
|
|
* Copyright (C) 1994 by Rodney W. Grimes, Milwaukie, Oregon 97222
|
|
* All rights reserved.
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer as
|
|
* the first lines of this file unmodified.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by Rodney W. Grimes.
|
|
* 4. The name of the author may not be used to endorse or promote products
|
|
* derived from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY RODNEY W. GRIMES ``AS IS'' AND
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL RODNEY W. GRIMES BE LIABLE
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
* SUCH DAMAGE.
|
|
*
|
|
* $Id: bootinfo.h,v 1.3 1994/11/18 05:26:52 phk Exp $
|
|
*/
|
|
|
|
#ifndef _MACHINE_BOOTINFO_H_
|
|
#define _MACHINE_BOOTINFO_H_
|
|
|
|
/* 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 bootinfo;
|
|
#endif
|
|
|
|
#endif /* !_MACHINE_BOOTINFO_H_ */
|