Commit Graph

113 Commits

Author SHA1 Message Date
Andrey A. Chernov
a6f2461bdf Add g option to usage line 1996-08-28 18:33:15 +00:00
Paul Traina
f8f0b4798e Support for GDB remote debug protocol.
Sponsored by: Juniper Networks, Inc. <pst@jnx.com>
1996-08-27 19:45:58 +00:00
Bruce Evans
ec275eb27f Moved the definition of DEBUGMSG() from asm.h to start.S. This macro
is only appropriate to use in the special environment of start.S (real
mode plus some conventions about not saving registers), and asm.h is
supposed to be for generic macros.

Removed some unnecessary parentheses.
1996-07-12 05:42:02 +00:00
Bruce Evans
18f63e25c1 Moved the definition of `bsize' out of a DO_BAD144 ifdef so that this
compiles when DO_BAD144 is not defined.
1996-07-12 05:35:47 +00:00
Bruce Evans
1cc273db90 Moved the definition of dflt_name to the correct file (table.c is only for
explicitly initialized data) and made it conditional on NAMEBLOCK.
1996-07-12 05:25:47 +00:00
Bruce Evans
b830e63502 Fixed some speling, punctuation.. and spac ing errors. 1996-07-12 05:17:37 +00:00
Julian Elischer
c9f36013e5 make the NAMEBLOCK changes conditional on that preprocessor variable,
and add more documentation of the option in the Makefile
also CORRECT the variable mentioned in the README.
1996-07-09 02:28:20 +00:00
Julian Elischer
9ed24653f7 Obtained from: Whistle Communications
Add code to the boot blocks to allow the user to place default boot strings
on block 1 of the disk (2nd block), should the correct magic numbers be present.

If the correct options are used it will 'delete' the name used from block1,
thereby assuring that if the boot fails it won't be stuck in an infinite loop.

the boot strings are set by the utility "nextboot"
(not yet checked in, but being tested.)
By default these changes should have no effect on existing installations
and if compiled without the NAMEBLOCK option should be essentially identical
to the old ones.
1996-07-05 19:55:05 +00:00
Bruce Evans
a7c6885b3a Fixed BOOT_HD_BIAS. 1996-05-11 04:27:24 +00:00
Poul-Henning Kamp
f8845af0db First pass at cleaning up macros relating to pages, clusters and all that. 1996-05-02 10:43:17 +00:00
Bruce Evans
494908b12c Fixed timeouts. I broke them in rev.1.17 for the FORCE_COMCONSOLE and
(interactively set RB_SERIAL) && BOOTWAIT (serial i/o) cases.
1996-04-30 23:43:25 +00:00
Jordan K. Hubbard
39cef8f8cb Document how to drop into DDB from a serial console. 1996-04-13 11:57:18 +00:00
Bruce Evans
0166c5c6b4 Allow specifying the BIOS drive number. Removed the hd drive type.
hd essentially wired the FreeBSD drive number to 0 without changing
the BIOS drive number.  Now the numbers can be specified independently.

Replaced the BOOT_HD compile time flag with with BOOT_HD_BIAS.  Defining
the new flag as 1 should give the same behaviour as defining the old
flag as anything.  I haven't tested defining these flags.
1996-04-07 14:28:05 +00:00
Bruce Evans
bb859b2bb8 Saved 14 bytes by avoiding gas braindamage and 8 bytes by better
instruction selection, for a total of 16 bytes after padding.  Whee.
1996-03-08 07:27:52 +00:00
Bruce Evans
cc494d0cce Probe the keyboard if PROBE_KEYBOARD is defined instead of when `notyet'
is defined and FORCE_COMCONSOLE isn't defined.

Don't compile any keyboard probing code if PROBE_KEYBOARD isn't defined.

Makefile:
Removed -I paths.  They weren't used, and the one to /sys hasn't worked
since the source directory was moved down one level.
1996-03-08 06:29:07 +00:00
Bruce Evans
27253a3d9c Made the timeouts in gets() machine-independent. Use the BIOS tick
counter instead of the BIOS time call to save space.

Reworked the anti-noise timeout to avoid duplicating code.  The timeout
in the outer loop is now restarted after every noise timeout, so it is
now possible for the total timeout to be infinite; previously, the maximum
total timeout was 150000 seconds.
1996-03-08 06:11:33 +00:00
Bruce Evans
0ae65c1a2b Load %fs with the flat data segment selector while in protected mode.
This will be used for convenient access to the BIOS variables.
1996-03-08 05:43:46 +00:00
Bruce Evans
c50f3ecf5a Fixed restoring segment descriptors in prot_to_real(). The descriptors
must have limit 0xffff and attribute G = 0 (byte granularity) as well
as other properties that they already had (see e.g., the Intel i486
manual section 22.5).  Not restoring them broke Ctrl-Alt-Del in the
bootstrap for my ASUS P55TP4XE system, probably because the Award BIOS
does anti-tracing stuff involving inaccessible %esp's.

asm.S:
Don't use lret in prot_to_real().  This reduces the risk of using an
incompletely intialized stack segment and saves space.

Submitted by:	"K.Higashino" <a00303@cc.hc.keio.ac.jp> (on 13 Jan 1995!)
		reworked by me
1996-03-08 05:15:54 +00:00
Joerg Wunsch
017ef5fdc2 Create symlinks for vnboot and bootvn, too. 1996-02-03 21:12:27 +00:00
Joerg Wunsch
85373d20b1 Implement an optional TIMEOUT value while entering the boot parameter
string.  This avoids indefinite hangs e.g. when used on a noisy serial
console.  It's not turned on by default.
1996-01-21 11:30:12 +00:00
Joerg Wunsch
301c758249 Document the ``BOOT_HD'' make option for the bootblocks. 1996-01-06 23:37:10 +00:00
Andrey A. Chernov
eb8421526c Remove -fno-strength-reduce, gcc bug recently fixed 1996-01-05 19:28:55 +00:00
Andrey A. Chernov
1d5aafcd70 Add -fno-strength-reduce to neutralize possible bad effect of -O2
specified directly
1995-10-10 21:11:22 +00:00
Bruce Evans
72b3459d61 Add comments about the bogus zeroing of the drive number for floppies
and the bogus dummy partition table.
1995-09-16 13:51:20 +00:00
Bruce Evans
45c7e5044d Fix recent breakage of non-floppies with 36 sectors/track.
Disable support for not looking at the label when booting from fd2d
(15-sector floppies in drive 2) and fd2b (other floppies in drive 2).
1995-09-16 13:03:59 +00:00
Nate Williams
e21fd30049 When confronted with a drive that says there are 36 sectors/track,
ignore and set it to 18 sectors/track.  This allows FreeBSD to boot with
2.88MB floppies which are used in older ThinkPads.

Submitted by:	Random Net person whose name I lost
1995-09-16 05:02:37 +00:00
Julian Elischer
623463ca4a Cosmetic changes to make a comment more nearly reflect reality 1995-09-03 05:36:13 +00:00
Joerg Wunsch
ea76f9453e First part of importing the Japanese `od' driver.
Claim the major numbers (before sombedoy else jumps in again and
claims the slots for his foocd driver :-), install all the hooks that
are required.

While i've been at this, i've cleaned up some of the routines at the
end of i386/conf.c; all the importers of the latest CDROM drivers
forgot to fill in the appropriate information.  The `ata' driver
(vapourware?) does only occupy a slot in the bdevsw[] array, btw.

The actual import of the code does require a minor change in the SCSI
subsystem, and i want to have this reviewed by Peter first, so it will
be deferred for some days.  The driver is already working for me
though.

Submitted by:	akiyama@kme.mei.co.jp (Shunsuke Akiyama)
1995-08-19 15:59:35 +00:00
Bruce Evans
9c0dc173cc Change install' to ${INSTALL}' so that default install flags can be
specified in the top level Makefiles.
1995-07-25 00:37:58 +00:00
Joerg Wunsch
f6027d9b3d this avaids the "lineoverflow" which you'll always get at 80 column
displays at bootup

Reviewed by:
Submitted by:	graichen@omega.physik.fu-berlin.de (Thomas Graichen)
Obtained from:
1995-07-22 22:32:49 +00:00
Joerg Wunsch
0f72d204e6 Reset defaults in case of boot() is looping several times (e.g. the
user has entered a bogus kernel name in the first place).

Also fix the broken #ifdef FORCE_COMCONSOLE, it has been disabled by
accident.  (NB: the keyboard probe remains disabled however.)

Few cosmetic fixes (declare functions to be void instead of int),
while i've been at this.

Pointed out by: wosch@cs.tu-berlin.de (Wolfram Schneider), for the init bug
1995-06-25 14:02:57 +00:00
Andrey A. Chernov
525cb41eb5 1) Enable boot from root partition which end > cyl 1023, it isn't criminal
2) Produce hard error when Bread attempts to read cyl >1023
Reviewed by: bde
1995-06-23 01:42:42 +00:00
Rodney W. Grimes
d3628763db Merge RELENG_2_0_5 into HEAD 1995-06-11 19:33:05 +00:00
Rodney W. Grimes
9b2e535452 Remove trailing whitespace. 1995-05-30 08:16:23 +00:00
Poul-Henning Kamp
75e21a4e1e Now I could finally test this change: bad144 is now relative to the
partition.
1995-05-21 03:27:13 +00:00
Poul-Henning Kamp
303fd456bf Use spc, not spt, DUH! Thanks Bruce!
Submitted by:	bde
1995-05-11 16:19:50 +00:00
Poul-Henning Kamp
0f15ab39ec Make disk.c smart enough to handle disk with "OnTrack Disk manager".
Make it complain if people try to boot from a partition which extends
past 1024 cylinders.  This is better than a random reset...
1995-05-08 02:02:56 +00:00
Julian Elischer
220112c567 Submitted by: bde@freebsd.org 1995-04-21 22:20:34 +00:00
Bruce Evans
8da0f3b87a Make some functions static like they always should have been.
Change the interfaces of these functions to save space.  The code
that takes the least amount of space is often the opposite to what
you might expect.  E.g., it helps to waste a few bytes passing
pointers so that the compiler can't see that certain addresses
are identical (gcc likes to waste space by reloading fat constants
even when the constant is already in a register).

Rewrite getbootdev() to save 80 bytes of space and to make it less
ugly.  32 bytes were saved simply by omitting the continue statements
in the pseudo-switch.
1995-04-21 16:50:32 +00:00
Bruce Evans
34951155ae Update the pseudo-prototype for serial_putc() to match the actual prototype. 1995-04-21 16:30:18 +00:00
Bruce Evans
a9ef92e638 Never pass char or short args to functions. This saves 64 bytes of
recently introduced bloat in just 2 calls to biosread(), although
very little in calls to putc() and serial_putc().  Gcc produces
amazingly bad code for unnecessary conversions.  E.g., if it has
`int x' in register %edx and wants to pass a char, then it could
simply push %edx and access only one byte in the callee.  Instead,
it sometimes unnecessarily spills %edx; it always sign extends
%edx and pushes the result.

Remove useless `extern' in function prototypes.

Remove unused declaration of `end'.

Declare pbzero() and pcpy() like the library bzero and bcopy().

Declare printf() properly.
1995-04-21 16:07:12 +00:00
Joerg Wunsch
9c6e0c69be . Make Poul's boot2 overflow warning less noisy in case the blocks
do fit, and beeping in case of an overflow.

.  Drop a comment about the ``FORCE_COMCONSOLE'' option into
   README.serial.

.  Increase the name buffer for the root directory from 100 bytes
   to 8 KB;  this is in no way ideal, but (IMHO) the best that can
   be done by now.  People did encounter problems with their root
   dir name listing overflowing the allocated buffer space.  Once
   we've got the three-stage boot, we should implement some basic
   malloc().  Swap space is already getting tight now, perhaps the
   swap should go into another 64 KB segment instead.

.  Make the keyboard probe less paranoid.  It should not give up in
   case of a keyboard that's continuously demanding RESEND's.  Even
   though the keyboard reset apparently has not been reported to be
   complete, it's at the very least proven that there IS something
   like a keyboard available.

   This solves problems with the ``Gateway-2000 AllKey programmable''
   (sp?) keyboard, that experienced a total hang with the previous
   probe.

   Thanks goes to Scott Blachowicz <scott@statsci.com> for his
   extensive testing of my various interim (debugging) bootblocks
   to get this working.
1995-04-20 23:15:10 +00:00
Julian Elischer
c9755763d9 Add an option to make it easy to default to the hd1 mode
also save a few bytes
1995-04-20 23:05:23 +00:00
Poul-Henning Kamp
3226e381f8 Added a check so compilation fails if the bootblocks are too big.
replaces a switch with ifs to reduce size.
1995-04-20 18:36:14 +00:00
Poul-Henning Kamp
16b560a716 Added -C option to set RB_CDROM, so that we use our cdrom as root. 1995-04-20 06:08:27 +00:00
Joerg Wunsch
afb7eb14a5 Remove the #ifdef REDUNDANT crud. This could be looked up in CVS by
interested parties.

Make the loader refuse to load anything below 1 MB -- we didn't
support it since FreeBSD 2.0R.  Avoid gratuitously wiping out the BIOS
variables or the loader.
1995-04-16 13:02:52 +00:00
Joerg Wunsch
15c99149f8 Boot block cleanup.
o Fix the keyboard probe to properly wait for the ready bit before
sending a command to the keyboard controller.  This should avoid the
problems some people are experiencing where the boot blocks hang the
system during keyboard probe.  (It does solve it for me.)

o Fix a bug that effectively prevented the boot blocks from ever
passing control to the serial console.  [while(--retries) instead of
while(retries--)]

o Gratuitously reduced the keyboard probe timeout from 500 to 5
seconds. :)

o Introduced a new option ``FORCE_COMCONSOLE'' as a commented-out
example in the Makefile, to force the usage of a serial console
regardless of a keyboard being connected or not.

o Moved all external declarations to boot.h, declared all functions
there, and ANSIfied all function declarations/definitions.
(printf() remains bogus, however -- i'm too lazy to fix this.)
We're in the ninetees, dunno why we should still support compilers
from the 70's.
1995-04-14 21:26:53 +00:00
Bill Paul
8a03631b28 According to a Usenet posting forward to me by Jordan, there's
at least one user out there who's system won't autoboot from the
serial console because of what sounds like 'phantom keystrokes'
making the timeout timer trip. I've tried to solve this by
adding an extra call to init_serial() right before the 'Boot:'
prompt is printed (done only if RB_SERIAL is set) to hopefully
make sure that the input buffer is clear. Unfortunately, the fellow
is in Germany and I haven't heard back from him yet. I haven't
been able to duplicate this problem on my hardware, so this is
a stab in the dark. At the very least, it shouldn't hurt anything.
1995-04-14 01:35:59 +00:00
Poul-Henning Kamp
c57e984258 Don't install /usr/mdec/boot
Install the biosboot as /usr/mdec/boot[12]
Make the traditional links from [swf]dboot and boot[swf]d to boot[12] files.
Install dosboot as /usr/mdec/boot/fbsdboot.exe
1995-03-28 19:22:43 +00:00
Poul-Henning Kamp
9346bafa46 And all serial chars with 0x7f to discard parity bits. 1995-03-19 06:10:32 +00:00