Commit Graph

58 Commits

Author SHA1 Message Date
Rich Murphey 73b2840c90 Reviewed by: Jordan
Submitted by:	Rich

Make conditionals on BIOSWAIT consistent with usage in io.c.

If you had 'BOOTWAIT=0' in your /etc/make.conf then biosboot wouldn't
compile.  It was '#if' in io.c and '#ifdef' in probe_keyboard.c so I
changed the latter to '#if'.

Even if BOOTWAIT is undefined then '#if BOOTWAIT' becomes
'#if 0' so it should compile either way with this change.
1995-02-15 04:17:59 +00:00
David Greenman 8710a63985 Get rid of extra []'s and otherwise fix-up boot prompt. Reordered
boot flags processing to be alpha-beta.
1995-01-28 03:51:39 +00:00
Bruce Evans b5d89ca8ad 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.
1995-01-25 21:40:47 +00:00
Jordan K. Hubbard 8f998cf202 Y.A.B.M (Yet Another Bogus Makefile) 1995-01-24 00:41:50 +00:00
Bill Paul f06a45ddd7 Removed hardcoded definition for RB_SERIAL that I left in my accident
(had it there for testing purposes). RB_SERIAL should be found in
<sys/reboot.h>.
1995-01-20 07:52:42 +00:00
Bill Paul f778c9da00 Submitted by: Bill Paul (wpaul@ctr.columbia.edu)
Obtained from:
bios boot block changed to allow booting from both the attached graphics
display and from a serial port. (A specially compiled serial boot block
is no longer necessary.) The boot block should detect the presence or
absence of a keyboard: if there is no keyboard, COM1 is turned into the
console. This simulates the behavior of the Sun boot PROMs. Unplug your
keyboard, attach a terminal to COM1 and you should be ready to go. :)
1995-01-20 07:48:27 +00:00
Bruce Evans 7010a8abed Save 16 bytes of data by not explicitly initializing to 0. 1994-12-30 07:48:07 +00:00
Joerg Wunsch e72e8750d3 Insert a hook to initialize the serial port at the beginning of
boot().  This is needed so the "serialboot" stuff can share this file,
too.

Everything is #ifdef'ed so it evaluates to nothing when actually been
built in the "biosboot" directory.
1994-12-18 20:30:10 +00:00
Bruce Evans bf67b544a2 Pass the slice number of the boot device to the kernel in the previously
unused bitfields for the adaptor and the controller.  It should go in
the bitfield for the partition but that would not be backwards compatible.
1994-12-18 19:14:19 +00:00
Poul-Henning Kamp 424183f2a4 Implement RB_VERBOSE. This is intended to mean: Print all information which
could be of any use for trouble-shooting problems with boot/devices/drivers.
1994-11-26 09:08:48 +00:00
Jordan K. Hubbard 8c05edbc74 Boy, was THIS buggered up! Calm the compiler by fixing the obvious
syntax errors.
1994-11-18 13:40:19 +00:00
Poul-Henning Kamp 66706b4367 Change the message a little bit... 1994-11-18 10:21:31 +00:00
Poul-Henning Kamp b3c99fe3f3 one ) less. 1994-11-18 06:22:11 +00:00
Poul-Henning Kamp efcdc34fe3 Ask the BIOS about the geometry, and tell the kernel about it. 1994-11-18 05:02:14 +00:00
David Greenman 3dea9c24ac Improved the user interface:
1) Added file list capability via '?'.
2) Arranged usage info to be more unix-like.
3) Fixed backspace over prompt annoyance.
1994-11-07 11:26:30 +00:00
Andrey A. Chernov c897ebc21a Change -O2 to -O
With each gcc version -O2 can cause absolutely unpredicatable things
Second stage boot still fits in allowed size
1994-11-05 21:06:16 +00:00
Jordan K. Hubbard e84bf57e40 Expunge the stain I left upon this code. My '/' fix was utterly
bogus.  Thanks, Boyd!
1994-10-31 18:00:06 +00:00
Rodney W. Grimes a5d34029d5 Removed extra slash between ${DESTDIR} and ${BINDIR}, noticed while working
on Makefile for netboot.
1994-10-28 07:54:13 +00:00
Jordan K. Hubbard dc6e5623e1 Gross hack to make kernel names not starting with '/' start with '/'. 1994-10-26 20:46:05 +00:00
Jordan K. Hubbard 9e8367bd7a Adjust boot message to conform to reality. 1994-10-26 20:22:10 +00:00
Jordan K. Hubbard 73ade464e2 Remove the code for asking for a filesystem floppy. We don't need
it anymore, and neither David nor I can think of a reasonable
mechanism to stick in its place.
1994-10-26 13:46:34 +00:00
Jordan K. Hubbard aa20f6195d Add RB_CONFIG flag. 1994-10-26 13:18:49 +00:00
Poul-Henning Kamp da330b4225 $DESTDIR missing... 1994-10-15 03:59:19 +00:00
Andrey A. Chernov 24c989ac53 Change first CFLAGS+= to CFLAGS= or we got really bad results
especially with -m486 from make.conf
1994-10-07 05:36:01 +00:00
Rodney W. Grimes 9949ebf656 1. BOOTSEG and BOOTSTACK are now set from the Makefile, the boot code has
been relocated to run in the 64k segment at 0x10000 with the stack at
    the top of this segment.  This corrects the problems machines with 512K
    base memory had booting.

2.  startprog routing rewritten to convert the BOOTSEG ss to a KERNELSEG
    ss, this eliminated the last of the >512K memory references.  Additional
    cleanup in here included a better way to copy the arguments to the
    kernel stack.

3.  Elimination of argv and esym cruft saved a few bytes.

4.  Only need to truncate the head.a_entry to a meg boundary once intead
    of every time we used it!  [Saving more bytes].

5.  Addition of version 1 bootinfo structure support.  These boot blocks
    pass the kernel name in to the kernel now.

6.  Removed historical comments about MACH argv stuff, as it is useless now.
1994-10-06 09:41:05 +00:00
Rodney W. Grimes 12fafb2d5a 1. Completely rewritten Makefile that uses bsd.prog.mk more effectively.
2.  Clean up the .S files to use /* */ style comments.

This is a totally cosmetic change, not one byte of the resulting boot
code changes.  But at least it is installed with correct owners and in
the right places, and gets recompiled correctly when things change!
1994-10-02 05:18:26 +00:00
Adam David f89971dfe7 Better documentation, 1ms calibration, default 5 seconds BOOTWAIT
Reviewed by:	adam
Submitted by:	rgrimes
1994-09-20 22:25:00 +00:00
Adam David fcf8309d74 Default wait approx 10 seconds for keypress during boot
Added comment about multiplication factor
1994-09-19 19:54:49 +00:00
Steven Wallace 893f3712e5 Put LDDESTDIR before library listing. 1994-09-18 19:10:11 +00:00
Steven Wallace dfc5d1d4eb Makefile: add ${LDDESTDIR} to linking of boot code so ${DESTDIR}/usr/lib
is used instead of /usr/lib

io.c: add #include <machine/cpufunc.h> as instructed by David Greenman to
avoid inb/outb linking errors.
NOTE:  I just discovered that if GNUC is not used the inline functions will not be expanded from the include file and real inb/outb functions would
be needed.
1994-09-18 07:39:55 +00:00
David Greenman df9ab3049d Removed inclusion of pio.h and cpufunc.h (cpufunc.h is included from
systm.h). Merged functionality of pio.h into cpufunc.h. Cleaned up some
related code.
1994-09-16 13:33:56 +00:00
Bruce Evans 2c22dd40a2 Conditionalize support for my debugger. This normally saves 304 bytes. 1994-08-30 01:38:04 +00:00
Paul Richards c4350ddb46 Removed disk type from disklabel lines, not needed for installing
bootblocks.

Reviewed by:
Submitted by:
1994-08-21 18:15:45 +00:00
Paul Richards b95ed23990 Fixed bootblocks to work with FreeBSD 2.0
1) Fixed up some header locations
2) Replaced list of boot files with /kernel
3) Changed disklabel use in Makefile to conform to 4.4
4) Added size command in Makefile to get close estimate of bootblock
   sizes. Total size of text and data must be below 64K, slightly
   overestimated since a.out header subsequently gets stripped.
5) Various buffer sizes are set to 8192 bytes in sys.c. In 4.4 MAXBSIZE
   is set to 64K which is too big for the bootblocks to deal with.

Submitted by:	Paul Richards
1994-08-21 17:47:26 +00:00
Jordan K. Hubbard 1c28e35f68 Commit a whole cluster of last minute critical (and one cosmetic) fixes
from David Greenman, Bruce Evans and Julian Elischer.

They are:

[vnode pager - David/Bruce]:
  The following patch fixes a problem where some data could be lost in a
delayed-write buffer if the cached buffer was larger than a page. This fix was
provided by Bruce Evans and modified slightly by me.

[st.c - Julian]:
  My fix for "bad request, must be between 0 and 0"

RTFS if you're interested).

[gnu/fpemul - David/Bruce]:
  These changes fix single stepping of emulated FPU instructions.
Previously, the instruction after an emulated instruction was
executed without causing a SIGTRAP ...

The also fix the initial control word being different for the
GPL emulator (it is still wrong for the old emulator) and remove
an unnecessary panic when emulation is not configured (I hope at
least init, sh and reboot will run without floating point.  I
remember only df and mkfs being broken by the lack of FP in 0.0).

[Various fixes described below - Bruce/David]:
sys/i386/boot/boot2.S:
        Yet another attempt to propagate the correct fix for 16 vs
        32-bit mode bugs.  [verified]

sys/i386/i386/db_interface.c:
        Protect against reentering Debugger().

sys/kern/kern_time.c:
        Don't allow 'time.tv_usec == 0' except at clock interrupts.

sys/pcfs/pcfs_fat.c:
        Make it compile without -O.

sys/scsi/sd.c:
        Fix as posted to some freebsd mailing list.
        (changes the order of the assignment of "sectors" because it earlier
          value is needed first -DG)

sys/vm/vm_glue.c:
        Fix stale comments and verbose code.

sys/vm/vm_mmap.c
        Fix off by 1 errors and verbose code.

[From Nate - cosmetic but non-intrusive and useful enough to go in]
sys/i386/isa/isa.c:
Appended you'll find a patch to the NMI error log routine in isa/isa.c.
The below patch just adds some additional information when an NMI occurs
which can help debug the hardware problem.
1994-06-22 05:52:25 +00:00
Jordan K. Hubbard 2e2df8360c Make BOOTWAIT a truly tunable parameter. It was hard-set before. 1994-06-20 04:32:40 +00:00
Adam David 3f9e73d24f Changed delay mechanism to rely more on I/O spinning. If spinning on the
like this is bad news, it will have to be revised.
Shortened some verbose messages for when the kernel is loaded below 640k.
Updated version number.
1994-06-16 03:53:29 +00:00
Jordan K. Hubbard f4c5931839 From Hellmuth Michaelis, reviewed by Bruce Evans: This enables
the keyboard clock rather than incorrectly disabling it.
1994-06-15 19:09:14 +00:00
Adam David f675355835 make BOOTWAIT loopcount parameter available for tuning.
This changes nothing unless f.e. -DBOOTWAIT=0 or -DBOOTWAIT=640000 is used
1994-06-15 18:15:17 +00:00
Rodney W. Grimes f2009cbfdb Touch the $Revision$ string to cause a cvs revision update of the boot
code (ie, should now print Revision 1.13).
1994-06-14 07:31:42 +00:00
Jordan K. Hubbard ac9326b3cc Be paranoid about setting of %dl register for braindead BIOS's,
initializing it to 0 in the floppy boot case.  This allows my Toshiba
1910 laptop to finally boot, and may help out other machines cursed
with early Phoenix BIOS's as well.
1994-06-13 19:27:52 +00:00
Jordan K. Hubbard 9727866aa8 This should fix up the absolute paths to /usr/mdec - just prepended
${DESTDIR} to all the right places (any reason why not?).
1994-06-02 16:50:56 +00:00
Andrey A. Chernov 03afa5ecd8 Make bootblocks fit into 7168 limit 1994-05-30 05:23:53 +00:00
Andrey A. Chernov 7b5cad487c From Bruce:
*	If there is no 386BSD partition, initialize the label sector with
 *	LABELSECTOR instead of with garbage.
 *	Fixed reading of bad sector table.  It is at the end of the 'c'
 *	partition, which is not always at the end of the disk.
1994-05-16 03:06:00 +00:00
Martin Renters 0eb0343191 Change switch statement to two if statements. This saves 208 bytes in
the object file which is enough to bring the size down to the point
where the bootstrap fits into 15 sectors.
1994-05-01 03:53:29 +00:00
Poul-Henning Kamp 13042d1278 Adding bootoption '-r' which is "use compiled in root". This allows me to
boot from a floppy and have root on wd2 for instance.
1994-04-20 22:06:24 +00:00
Rodney W. Grimes 9ad564373e Bump boot block revision to 1.9 by a dummy edit on disk.c and:
>From: bde@kralizec.zeta.org.au (Bruce Evans)
Subject: cache botch in bootstrap
Date: Sun, 20 Feb 94 18:14:35 +1100
The cache in the bootstrap loader didn't allow for the device changing.

This caused surprisingly little trouble - the cache is only for a single
track (or part of a track), and the first access to a new device is
always for an early sector, so there is no problem unless the last access
to the old device was for an early sector.  I saw the problem on a system
with BSD on wd1 and no label on wd0.  Everything worked if the the device
name wd(1,a) was specified before the default of wd(0,a) was tried, but
when the default was tried, it failed on the first sector because there
was no label, and then the first sector on wd0 was always used instead
of the first sector on wd1, so there was apparently no label on wd1
either.

Bruce
1994-02-22 22:59:40 +00:00
Andreas Schulz 908cd9251b Deleted the private cleandir target. It didn't had a rule for the
obj symlink in it and the normal bsd.prog.mk cleandir target does
already the correct thing.
1993-12-11 20:35:15 +00:00
Andrey A. Chernov 6683327ab0 We don't want shared boot, so -Bstatic added to ld options 1993-11-16 02:02:05 +00:00
Rodney W. Grimes 9518d3aea0 >From Charles Hannum
Change movl %es: -2(reg) to use a subl $2,reg when fixing up the IDT
entries for bdb.  This seems to be the best way to go.

Some day soon #ifdef BDB all of Bruces debugger code.
1993-11-13 04:43:25 +00:00