Commit Graph

41 Commits

Author SHA1 Message Date
Peter Wemm
92948f4701 Save about 60 bytes by #define memcpy __builtin_memcpy and removing
the function we provided.  Restore the Keyboard: yes/no  printf for the
probe diagnostics.  We end up with 40 bytes free.
2002-05-11 21:49:39 +00:00
Peter Wemm
7a163a83da Use a crowbar and duct-tape to make boot2 fit again. This gets it down
to 4 bytes free.  I removed a printf (the Keyboard yes/no) since it is of
marginal value and sed'ed the generated asm output to remove the unwanted
aligns.  There's probably a better way to gain a few extra bytes than
losing the printf.  Shortening strings is probably a better option but this
should get us over the hurdle.
2002-05-11 21:39:59 +00:00
Pierre Beyssac
2b9592079f Code cleanup, no functional change.
Patch adapted from PR.

PR:		i386/36015
Submitted by:	thomas@cuivre.fr.eu.org
MFC after:	1 week
2002-04-11 09:21:10 +00:00
Pierre Beyssac
038148d678 Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR:		i386/36016
Submitted by:	Thomas Quinot <thomas@cuivre.fr.eu.org>
Reviewed by:	rnordier
MFC after:	1 week
2002-03-23 19:40:27 +00:00
Ruslan Ermilov
9662d32c73 Implement -m and -p loader(8) "boot" command options in boot2.
(This is more useful for 4.x where boot blocks can still load
kernels, modulo the PR kern/17422.)
2002-03-13 11:03:36 +00:00
Ian Dowse
870fb18bc1 Oops, the previous revision (1.35) broke booting from floppies
because the buffers we use could end up spanning a 64k boundary.
Unfortunately it causes too much bloat (228 -> 72 bytes free) to
just reinstate the old malloc() function.

Instead, define a structure that contains all 4 buffers which must
not cross 64k boundaries. We allocate a 64k-aligned instance in
main() using the magic that was in the old boot2 malloc() function.
This brings the free space down to 168 bytes, but that is still
better than it was before revision 1.35 (136 bytes).

Reported by:	Mike Brancato <funnyguy@digitalsmackdown.net>
Pointy-hat to:	iedowse
2002-01-17 22:39:19 +00:00
Ian Dowse
e9f9046337 Make the i386 boot2 fully blocksize-agnostic, as has already been
done with boot1 on the alpha. We use 4k buffers regardless of the
actual filesystem block size.

Remove the simple malloc() implementation, as it is no longer used.
2002-01-14 19:39:19 +00:00
Ian Dowse
7e9c85d4ce Increase BSIZEMAX from 8k to 16k, so that we can reliably boot from
filesystems with 16k blocks.
2002-01-09 15:46:17 +00:00
Jonathan Lemon
c80bd6e378 Allow the RBX_DUAL flag to appear in bootinfo. 2001-10-23 20:27:05 +00:00
John Baldwin
b0606ca15f Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect
the first sector of the emulated floppy to contain a valid MS-DOS BPB that
it can modify.  Since boot1 is the first sector of boot.flp, this resulted
in the BIOS overwriting part of boot1: specifically the function used to
read in sectors from the disk.

Submitted by:	Mark Peek <mark@whistle.com>
Submitted by:	Doug Ambrisko <ambrisko@ambrisko.com>
PR:		i386/26382
Obtained from:	NetBSD, OpenBSD (the example BPB)
MFC after:	1 month
2001-07-31 19:50:09 +00:00
David E. O'Brien
5e6220d9d0 * include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.
2001-05-02 23:56:21 +00:00
John Baldwin
8dfe6fb59c - Inline all the functions that are only called once. This results in a
savings of 68 bytes in boot2.
- Also add a comment warning that you can't remove the empty exit()
  function.
2000-07-06 01:51:27 +00:00
Ruslan Ermilov
5737d0e1d4 Treat \t and \n inside /boot.config as whitespaces.
PR:		19215
2000-06-13 13:07:53 +00:00
Ruslan Ermilov
a6120246a2 Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by:	jkh, msmith, sos
Approved by:	jkh
2000-02-09 19:23:46 +00:00
David E. O'Brien
cd37fe517b Return this file to its pre-spammed version. Thanks to some new compiler
optimizations, we can go from 3 bytes free with the spammed version, to
279 bytes free with the full version.
1999-11-14 22:17:06 +00:00
David E. O'Brien
cf49270ac3 Enter complier upgrade mode again. We need to cut 169 bytes from this:
Remove some printf() calls, reduce size of buffers, and abbreviate
	some strings.

Hopefully the boot people will fix this spamage after the cut over to
Gcc 2.95.2 as the system compiler.
1999-11-14 00:41:54 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Robert Nordier
bc53095dd4 Fix use of e_phoff in place of e_phnum. 1999-06-19 20:50:38 +00:00
Robert Nordier
0e5731f9f4 Fix damage introduced in previous commit. 1999-04-05 07:36:30 +00:00
David E. O'Brien
df5ee53868 Remove the string ">>> FreeBSD/i386 BOOT". I need to reduce the size of
boot2 by 16 bytes.  I expect this to be temperary until the boot2 authors
can do the proper fix.
1999-04-04 21:15:41 +00:00
Joerg Wunsch
9859e703f6 Make <DEL> an alternative rubout character for command input; many
serial terminals use this as their default rubout key.
1999-03-31 08:28:42 +00:00
Robert Nordier
391911b768 Check size of partition before using it. 1999-01-29 03:36:42 +00:00
Mike Smith
5d3d992565 Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't
guess this value well in anything other than the simplest of situations.
1999-01-24 00:10:10 +00:00
Robert Nordier
726c0943c0 Drop boot.help support. 1999-01-11 11:36:03 +00:00
Peter Wemm
c03b24b2d8 Damn, I thought I had committed this already, but it seems not.
Move the relocated boot1 and arg transfer space from 0x600/0x800 to
0x700/0x900.  In theory this should make no difference, apart from the fact
that Buslogic controllers happen to use a few bytes at 0x600 for some sort
of scratch space for it's int 0x13 hook (!!!), causing the machine to crash
badly when the boot2 code makes it's callbacks into boot1 for disk IO.

Submitted by:	Robert Nordier <rnordier@freebsd.org>
1999-01-10 13:29:52 +00:00
Robert Nordier
0293eac42c Prevent boot.config being parsed more than once. 1998-11-08 18:37:28 +00:00
Robert Nordier
7ac90f7d65 Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while
loading.  This eliminates noise when loading boot/loader; and when
loading a kernel, they generally flash by too fast to be
intelligible anyway.
1998-11-08 18:29:29 +00:00
Robert Nordier
9888bdcd29 boot1: Eliminate EDD detection and optional use of disk packet
interface.  Do some general consistency fixes and space optimizations.
Use of some freed-up space to defend against possible BIOS misfeatures.

boot2: Revise disk read interface to provide for boot1 changes.  Free
up space for this.
1998-11-08 15:36:35 +00:00
Robert Nordier
c589107988 biosboot compatibility fix: change behavior of backspace in getstr().
Noticed by: abial

Optimize away a few bytes to make space for the above.
1998-10-27 20:16:36 +00:00
Robert Nordier
ae99ddc79e Fix some glitches in the input routine:
Don't display a \b if not acting on it.
Don't process binary zero chars (which result from pressing function
keys, etc. on the PC).
1998-10-17 11:25:05 +00:00
Robert Nordier
918ddbed16 Having probed the keyboard, turn off the -P flag. 1998-10-17 10:35:15 +00:00
Robert Nordier
93d51dcaf9 Treat all options as toggles (ie. -c -c is the same no -c). Since
the boot.config settings are persistent, this seems to provide a
useful override capability, and should break only on broken
boot.config's.

Output a cosmetic newline if booting with no input.
1998-10-17 09:50:09 +00:00
Robert Nordier
3044a22097 biosboot compatibility fix:
If we have a boot.config command, display it.
1998-10-17 09:16:01 +00:00
Robert Nordier
7fa25d805a biosboot compatibility fix:
Read boot.help before parsing boot.config.  We were parsing
boot.config first, which could result in boot.help being read
from a different location (or not found), which would probably
just cause surprise, without being useful.
1998-10-17 09:01:13 +00:00
Robert Nordier
da55c91100 Add serial, dual, and probe-keyboard support. 1998-10-15 20:04:21 +00:00
Robert Nordier
757ee5cca9 Fix flow of control after directory listing; enable EDD support;
cosmetics.
1998-10-13 23:43:38 +00:00
Robert Nordier
b2848194f5 Make v86.ctl default more explicit; simplify read error-handling;
twiddle.
1998-10-13 23:00:47 +00:00
Robert Nordier
c71b9b3c24 Adjust NDEV value.
Optimize reading of system time.
1998-10-13 22:17:05 +00:00
Robert Nordier
fd4afc6487 Change to a 15-sector boot2.
Refine slice-handling.
1998-10-13 21:35:42 +00:00
Robert Nordier
0ad50c1c9d Improve drive recognition and handling. 1998-10-13 17:41:06 +00:00
Robert Nordier
4d8eda2252 New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023;
multiple 0xa5 slices; etc.
1998-10-12 21:16:26 +00:00