Commit Graph

172 Commits

Author SHA1 Message Date
Justin T. Gibbs
a9c5dbb88d Adjust for sd->da and the loss of od. 1998-09-15 09:59:58 +00:00
Mike Smith
194b64e83d Correct an irritating documentation error.
(get_diskinfo is unnecessarily obfuscated)
1998-08-04 00:39:45 +00:00
Alexander Langer
f7aad78d24 Typo fix: teh --> (the|they) 1998-07-30 02:27:41 +00:00
Bill Paul
ab48ff6913 Add workaround to allow the FreeBSD boot block to work on
Kapok Computer Co. notebook with AMI 'WinBIOS' which seems to insist
on having a short jump and nop as the first instructions in the
boot sector code. The prevailing theory is that the BIOS is doing
some sort of boot sector virus detection and refusing to run any
boot block that doesn't start with the same instruction sequence as
MS-DOG boot sector code. If this is the case, it would be nice if it
actually printed an error message to this effect instead of just
saying 'FAILED.'

This workaround has no effect on the boot sector code other than to
increase its size by three bytes.
1998-07-02 15:36:35 +00:00
Joseph Koshy
dce52a9c00 Install ${DESTDIR}/boot.help during `make distribution'.
PR: 6063
Submitted by: Doug <Studded@dal.net>
1998-05-27 12:13:18 +00:00
Eivind Eklund
22263dd149 Make this handle -j<large>, and avoid .depend pointing at /usr/include. 1998-03-07 10:48:15 +00:00
Eivind Eklund
5b4636a600 Make bootblock building independent of /usr/include if relative
includes are available.
1998-02-15 21:38:19 +00:00
Bruce Evans
b8c7cb30ab Don't set even parity uselessly in the line control register (parity
is not enabled).

Saved a few bytes by reusing the line control register bits and not
loading the speed in the wrong (cpu) register.
1998-02-01 22:39:24 +00:00
Kazutaka YOKOTA
2c2491393e Make RAWBOOT functional again; don't read boot.config' and boot.help'
if RAWBOOT is defined.
Reviewed by: bde
Submitted by: Takeshi Amaike <amaike@iri.co.jp>
1998-02-01 05:24:24 +00:00
Mike Smith
0b771fd153 Symlink bootblocks for 'wfd' disks as well. 1998-01-27 16:56:43 +00:00
Bruce Evans
d92b2035e3 Fixed cosmetic bugs:
- wrong name in .file statement.
- stale comment about CONSPEED.
- style bugs in comments.
- inconsistent defaulting of operand sizes (should never depend on default).
- inconsistent choosing between je and jz (should always use je).
1998-01-01 13:01:31 +00:00
Joerg Wunsch
3bb99eb225 Finally, implement a mini-parser for RockRidge alternative filenames,
so the filenames can be displayed and selected in full beauty.  If RR
is present, the match is now case-sensitive, if RR is missing, the
match is case-insensitive (as it used to be before).
1997-12-04 21:52:47 +00:00
Poul-Henning Kamp
e1fa905ad4 Add a missing prototype.
Nagged about by:	joerg
1997-09-24 07:44:34 +00:00
Poul-Henning Kamp
e6dcdf4dd1 Remove pbzero(), things we load zero their own bss.
Make VESA_SUPPORT default
1997-08-31 06:11:26 +00:00
Poul-Henning Kamp
dd9346ce01 Oops, boot2 got too big. make VESA_SUPPORT nondefault. 1997-07-31 11:30:30 +00:00
Poul-Henning Kamp
d9f5f52664 Add support for booting in VESA 0x102 videomode. Corresponding patches to
syscons are being reviewed by sos.
1997-07-31 08:07:54 +00:00
Bruce Evans
5f0539ec6c Saved a few bytes by omitting frame pointers, using byte-sized
instructions more (many cases were already intended to be byte-sized
but were missing prefixes so gas assembled them bogusly), and
rearranging a loop to test at the end.
1997-07-13 15:24:15 +00:00
Joerg Wunsch
f88ef34060 Make this compile again under -current. The modifications to io.c
and bios.S were small enough and have been merged back into their
respective files in biosboot/, conditionalized on CDBOOT.  Other
files might be merged at a later stage.

Caveat emptor: i cannot test this right now.
1997-07-12 10:23:31 +00:00
Bruce Evans
080cec3cc4 Fixed description of -cv. 1997-07-05 02:08:09 +00:00
Philippe Charnier
91463ae299 Fix 2 typos. 1997-06-16 06:32:51 +00:00
Bruce Evans
fec712543d Load the kernel config file where userconfig (with option USERCONFIG_BOOT)
will see it.  The name of the file is obtained by appending ".config"
to the name of the kernel file.  If the file doesn't exist, then an
annoying message is printed.

Reduced the command line buffer size yet again from 4096 to 1024.  It is
oversized to defend against overrun in gets(), but data space is starting
to run out so the buffer size can't be as grossly oversized as before.
1997-06-14 10:00:42 +00:00
Bruce Evans
e49dd0c779 This should have been committed with the changes to boot.c yesterday.
- Added support for "dual" internal/serial consoles (-D flag).  If -D is set,
  then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-10 01:40:32 +00:00
Bruce Evans
de2cf96615 - Added support for "dual" internal/serial consoles (-D flag). If -D is set,
then all i/o from the boot blocks is to and from both the internal console
  and the serial console.  -D has no effect on the kernel (-h decides the
  kernel serial console as usual).  -D should normally be set in /boot.config.
- Get help messages from /boot.help.  You should copy boot.help from the
  biosboot directory to the root directory on the boot drive when you
  install new boot blocks.
- New, less invasive keyboard probe.  Enable keyboard probe dynamically (-P
  flag).  Should probably never be used (use -h instead).
- Fixed/improved initialization from boot.config.  It didn't interact correctly
  with the NAMEBLOCK option, and the initialization of the drive/unit/partition
  didn't stick when a non-default kernel name was entered.
- Don't reset or forget the default drive/unit/... or kernel name so often.
- Set the default kernel name to something unbootable after `?'.
- Display the defaults better.
- Removed PROBE_KEYBOARD_LOCK option (use -h instead).,
- Removed BOOT_FORCE_COMCONSOLE option (use device flag 0x20 instead).
- Removed -a (RB_HALT) flag.  This flag is only used for reboots.
Submitted by:	about 2/3 by yokota
1997-06-09 05:10:56 +00:00
Bruce Evans
f79e6ee387 Staticize. 1997-05-27 16:26:39 +00:00
Bruce Evans
906265bada Removed some useless code:
- gcc assumes that %ecx and %edx are clobbered (due to calling
  conventions), thus there is no need for saving/restoring those two
  registers.
- %es is reset to default value by real_to_prot, thus there is no need
  for saving/restorig that register.
Submitted by:	tegge
1997-05-16 10:40:00 +00:00
Bruce Evans
72fa3798b4 Removed LDADD=-lc and associated DPADD. libc would probably break
things if it were actually used.
1997-04-25 19:38:01 +00:00
Bruce Evans
c24b67b188 Don't attempt to read past EOF.
Saved enough bytes to make room for this bloat (testing poff < inode.i_size
takes 56 bytes!) by copying fs to a local variable.
1997-03-15 16:49:51 +00:00
Bruce Evans
051fc6fab1 Fixed setting of default kernel name when there is no boot.config file.
Didn't fix a more serious problem when boot.config is empty - read()
can't handle empty files.

Reported by:	Chris Timmons <skynyrd@opus.cts.cwu.edu>
1997-03-12 18:48:31 +00:00
Bruce Evans
bdca44f670 Added -mno-486 to CFLAGS to force smaller code in case someone compiles
with CC="cc -m486".  This doesn't fix PR2381, since PR2381 is for 2.1.x.
1997-03-05 15:43:03 +00:00
Peter Wemm
6875d25465 Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are not
ready for it yet.
1997-02-22 09:48:43 +00:00
Bruce Evans
b0a5b85d06 Fixed biosboot to compile with Lite2. <sys/lock.h> is now a prerequisite
for <ufs/ufs/inode.h>.
1997-02-18 15:09:39 +00:00
Bruce Evans
8363c19687 Get defaults for the boot device (and flags) from the file
"boot.config" (relative to the root directory on the 'a' partition
on the first BSD slice) if it exists.  If it doesn't exist, then
the only visible changes should be that the kernel name isn't reset
to "/kernel" after looking it up fails and that the default name
is now "kernel".

The new function readfile() can be used for other things:
- reading help messages.
- reading splash screens.
- reading userconfig info.
1997-02-13 13:15:47 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Bruce Evans
07addd421e Initialize the upper 16 bits of the memory sizes properly (to 0).
They were garbage that happened to be 0 in many cases.  (real_to_prot()
happens to leave the value of the real-mode %cr0 in %eax and the
memory-size BIOS calls usually don't touch the upper bits of %eax.
The upper 16 bits of %cr0 are usually 0 at boot time, at least on
486's.

Should be in 2.2.
1996-12-18 15:38:23 +00:00
Bruce Evans
9d12c4da86 Give up early for empty partitions. The offset for an empty
partition is 0, which is outside the slice unless the disk is
dangerously dedicated.  There is little error checking later, and
following garbage metadata outside the slice usually caused crashes,
Empty 'a' partitions are fairly easy to create by cloning the label
for the whole disk.

Fixed a missing newline in a related error message.
1996-12-10 14:07:42 +00:00
Nate Williams
c80383505d Update the bootblocks to use the new definitions that changed in the
recent psm/syscons/kbdio code update.

Submitted by:	Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp>
1996-12-03 03:32:15 +00:00
Peter Wemm
34429f3d2d Fix my previous (untested) commit. The probe routine now appears to work
again.

Something needs to be done about this in 2.2, since the code there doesn't
even compile anymore since the syscons/kbdio/psm merge into 2.2.
1996-11-24 08:06:01 +00:00
Peter Wemm
f2a58aec0a Make this compile again after the syscons/psm/kbdio changes that removed
the keyboard IO port definitions from <machine/console.h>.

Note: I do not have a machine available to test this yet,  I sent this
for review to several people who have not replied.

This is also totally busted in 2.2, which has half of the syscons/psm/kbdio
changes in it.  This really desperately needs to be tested and fixed
in 2.2 as well.
1996-11-23 07:38:25 +00:00
Bruce Evans
2e2d9bc760 Preserve %esi and %edi for all BIOS calls. This is probably only necessary
for get_diskinfo(), whose BIOS call sets %es:%edi in some cases, although
most documentation says that it doesn't change %edi in the cases that
happened to matter (for hard disks).

This shall be in 2.1.6 and 2.2.

Submitted by:	Tor.Egge@idt.ntnu.no
		(except I kept the unnecessary preservation of %edx and %ecx)
1996-11-11 14:03:33 +00:00
Paul Traina
6564e095d3 Rationalize support for serial consoles running at baud rates other than 9600
baud.  This isn't particularly beautiful, but neither is it disgustingly
gross.
1996-11-02 02:24:39 +00:00
Paul Traina
972a3f282a Expose the control mechanism for serial console boot so that the default
shipped with freebsd can be changed without modifying the Makefiles directly.

Creates:	BOOT_FORCE_COMCONSOLE
		BOOT_PROBE_KEYBOARD
		BOOT_PROBE_KEYBOARD_LOCK
		BOOT_COMCONSOLE			(port value for console)
1996-10-14 17:25:53 +00:00
Bruce Evans
14c0bb7c89 Oops, PROBE_KEYBOARD_LOCK wasn't supposed to be enabled by default. 1996-10-14 12:37:47 +00:00
Bruce Evans
50ec4d5916 Added option PROBE_KEYBOARD_LOCK which gives a serial console if the
keyboard is locked.
1996-10-08 22:41:34 +00:00
Bruce Evans
4fd6d53a24 Saved about 160 bytes by using the gcc-2.7 alignment options. 1996-10-08 22:35:48 +00:00
Bruce Evans
5bac261e76 Print the dos device number for read failures. 1996-10-08 22:31:31 +00:00
Bruce Evans
86f17a898e Removed unused arg to badsect(). It wasted 16 bytes.
Staticized badsect().

Avoid warning for benign signed vs unsigned comparison.
1996-10-08 22:25:22 +00:00
Bruce Evans
3eeeca733b Use the same warning flags as for the kernel. This causes surprisingly
few warnings.
1996-10-08 22:18:34 +00:00
Paul Traina
b3f3fea5fd Fix a couple of bugs causing false positives 1996-09-26 20:52:13 +00:00
Bruce Evans
0c8ea4d48c Eliminated includes of the "temporary" backwards compatibility header
<sys/dir.h> in applications.  Maintained existing (inadequate) ifdefs
for dir.h vs dirent.h in libdialog, amd and rarpd, but didn't add any
new ones.
1996-09-24 08:08:11 +00:00
Bruce Evans
2e82980a4c Moved instantiation of `poff' to sys.c. It is no longer used in disk.c.
Saved a few bytes by copying `dosdev' and/or `name' to local variables.
This optimization (for dosdev) was done in one place before but this
was lost in the devread() cleanup.   This optimization (for dosdev)
can almost be done by bogusly declaring dosdev as const, but gcc still
often space-pessimizes code like the following:

	extern const int dosdev; ... foo(dosdev); bar(dosdev);

gcc often doesn't bother to copy dosdev to a temporary local because
the local would have to be preserved in memory across the call to
foo().  OTOH, for

	extern int dosdev; ... auto int dosdev_copy = dosdev; ...
		foo(dosdev_copy); bar(dosdev_copy);

the copy must be made because foo() might alter dosdev.
1996-09-14 07:41:00 +00:00