Commit Graph

424 Commits

Author SHA1 Message Date
joerg
95b1857c43 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
dcs
b2e52f1a24 Revert bootinfo to 1.4 and use a different solution to NULL m_args
instead (don't copy).
1999-03-20 14:13:09 +00:00
dcs
b41a7f02e6 Fix a couple of nasty errors in the README. 1999-03-20 12:25:43 +00:00
kato
d83781af0d Sync with sys/boot/i386/loader/version revision 1.4. 1999-03-19 15:59:56 +00:00
kato
728c36bfac Sync with sys/boot/i386/libi386/bootinfo.c revision 1.18. 1999-03-19 15:58:05 +00:00
dcs
d3b84f11bb Avoid copying m_args if none exists. (Perhaps this is a better solution,
Doug?)
1999-03-18 14:36:22 +00:00
kato
c170b460ee Install the manual page in sys/boot/i386/loader.
Sumbmitted by:	Takahashi Yoshihiro <nyan@dd.catv.ne.jp>
1999-03-18 13:42:21 +00:00
dfr
f25890bcd7 Don't choke in MOD_ARGS() if mp->m_args is NULL. 1999-03-18 11:00:48 +00:00
chuckr
0abcd1c4e0 This is a temporary README file, to help those trying to experiment
with the new boot loader configuration process.  I got a lot of
help from Daniel Sobral, and both Dan and I got help from Mike
Smith.  This really belongs in Warner's UPDATING, but he's not
been answering his email recently, so that will wait a little.

Robert Nordier also gave me a lot of help, but he hasn't seen the
last version, and can't be blamed for my errors.

Approved by:	jkh

Reviewed by:	Mike Smith
1999-03-17 23:44:19 +00:00
dcs
d21e58825e Version bump: kvm & dictionary size. 1999-03-17 23:05:46 +00:00
dcs
36d677ddca Disable trace! until it gets fixed. 1999-03-17 23:03:36 +00:00
dcs
e0b0c16056 The man page, version 0.1. 1999-03-15 08:52:23 +00:00
dcs
d7a94099c2 Remove redundant code. 1999-03-15 08:08:20 +00:00
dcs
9d1de518fd Replace /kernel.config with /boot/kernel.conf. 1999-03-14 21:57:49 +00:00
msmith
a44b9fcf4f Fix syntax for boot command
Noticed by:	Ruslan Ermilov <ru@ucb.crimea.ua>
1999-03-14 19:55:01 +00:00
kato
a90c408555 Sync with sys/boot/i386/loader/Makefile revision 1.30. 1999-03-10 13:41:44 +00:00
kato
4d9824476a Sync with sys/boot/i386/libi386/bootinfo.c revision 1.17. 1999-03-10 13:40:29 +00:00
dcs
219e83e854 Install new loader.rc stuff. 1999-03-10 03:34:14 +00:00
dcs
035b6d42a9 New loader.rc stuff.
Reviewed by:	jkh
1999-03-09 14:06:55 +00:00
dcs
f97128dce1 Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
1999-03-08 11:05:52 +00:00
dcs
f497066d82 Increase ficl's dictionary size, in preparation for the newer loader.rc. 1999-03-08 11:00:02 +00:00
dcs
650aa84def Fix a number of memory leaks and other memory-related disorders.
Also, unbreak the breakage introduced at the last revision of module.c.
This changes the semantics of mod_searchfile() (and mod_searchmodule())
to make the caller's responsibility freeing the buffer returned. This
is different from other functions in loader's code, and was done as a
fix for kern/9631. If someone wants to revert this to the original
behavior, don't forget to fix kern/9631 in another way.

This should also fix bin/10462, which was introduced as a result of the
first try at kern/9631 (module.c last revision).

PR:		bin/10462
Submitted by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp>
1999-03-08 10:32:39 +00:00
kato
36f56421d5 Make loader be able to load 1.2MB fd on machines w/ 1.44MB fdd.
Sumbmitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:38:12 +00:00
kato
c3798acc2d Added an entry for 1.44MB fd.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:34:52 +00:00
kato
39ce2d9d3b Oops, forgot to read boot.config file.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 16:31:55 +00:00
kato
51b97ee83c When SCSI IDs are not contiguous, the loader could not find correct
unit number for da device.  This commit fixes this problem.

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:48:14 +00:00
kato
8a128763f5 boot2 doesn't need to say 'Can't find file boot.config.'
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:45:06 +00:00
kato
946f760bce Fix character code of backslash. PC98 should use 0xfc instead of 0x5c.
Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-03-04 10:44:01 +00:00
dcs
eb5846a32e Don't treat empty lines as end-of-file in include(). (I can't
believe this bug is still here... :-( )
1999-03-02 16:16:57 +00:00
kato
d5b861b414 Sync with sys/boot/i386/btx/btx/btx.s revision 1.10. 1999-03-01 10:02:45 +00:00
rnordier
8a92798eb6 Save option, rather than slice, selected. This permits unattended
booting from other than drive 0, as the F5 keypress is saved and
"replayed."

Requested (some time ago) by: archie
1999-03-01 02:42:47 +00:00
dcs
dcdde55cae Make $ print different lines in, well, different lines. 1999-02-28 02:10:14 +00:00
rnordier
486a8e2e65 Implement "setdrv" option 1999-02-26 14:51:14 +00:00
rnordier
82f2f0c42c Emulate a V86 "movl %cr0,%eax" instruction.
Feedback and testing: Kurt Hopfensperger <kjhmdjd@ix.netcom.com>
1999-02-25 16:27:41 +00:00
kato
54d97fd333 Sync with sys/boot/i386/loader/Makefile revision 1.29. 1999-02-25 11:01:54 +00:00
msmith
6bade9a73d Don't try protecting page 0; it seems that BIOS writers now feel it's
appropriate to check for Windows95 by polling for state in low
memory, with fatal results.

Submitted by:	rnordier@freebsd.org
1999-02-24 01:37:23 +00:00
dcs
695080812d Fix assorted memory leak/buffer reuse problems.
Not restricted to, but including:

PR:		kern/9631
Submitted by:	Bill Fenner <fenner@parc.xerox.com>
1999-02-22 13:12:37 +00:00
tegge
90c3773c3a Enable load of i386 ELF kernels with larger KVA range (e.g. starting at
0xe0100000u or 0xc0100000u instead of the usual 0xf0100000u).
1999-02-15 17:36:58 +00:00
jkh
867f0037a8 Remove dictHashSummary internal function; it used doubles.
Submitted by:		Daniel C. Sobral <dcs@newsguy.com>
1999-02-09 16:04:19 +00:00
kato
c1bcc50cda Sync with sys/boot/i386/loader/version revision 1.3. 1999-02-08 09:59:38 +00:00
dcs
55ce2e39d9 Bumb up loader's version.
Reviewed by:	Michael Smith <msmith@freebsd.org>
1999-02-08 04:14:31 +00:00
dcs
1be95a3a32 Remove strange-looking quotes. This part of the code is #if'ed out,
and the variable doesn't even exist (though it is referenced elsewhere).
Just make sure it produces error messages when Mike get back to it.

PR:		kern/9934
Submitted by:	Adrian Filipi-Martin
1999-02-07 12:12:29 +00:00
dcs
ac11873c18 Make FICL_TRACE default.
Add freebsd.fr, for FreeBSD specific forth source. Add $ and %, to
replace the lost @ and - functionality of include. $ has the opposite
behavior of @ though, since the default behavior was inverted.
1999-02-04 17:13:49 +00:00
dcs
84a62876fc Make use of prototypes to silence warnings.
Change include() so it will be able to load files with forth code,
instead of just builtins. Remove #@- from the include section of the
help file, since they don't work in the new version of include, unless
BOOT_FORTH is not defined.

Change bf_run() so it will return the result returned by ficlExec(). Also,
make bf_run() push "interpret" to be executed by ficlExec(), since ficlExec()
doesn't do it by itself. (Things worked previously because nothing
recursed through ficlExec() by the way of bf_run()).

Change/extend comments on builtin behavior.

Search for "interpret" at the end of bf_init(), so /boot/boot.4th can
provide it's own version.

Remove dead code.
1999-02-04 17:06:46 +00:00
dcs
0315c359f3 Make ficlExec recursive. This removes vmReset and vmQuit from the
error cases, but the replacement should be doing everything they
did, except what did shouldn't be doing, and might do a little more
they ought to be doing.
1999-02-04 16:53:47 +00:00
dcs
bb2eaaf8e4 Fix ficlExecFD to take kern/9412 changes into account. Also modify it
not to vmThrow errors. This is not what the comments say it does, and
it doesn't work when there is no ficlExec environment (like it's only
use in sys/boot/common/interp_forth.c).

PR:		bin/9772
1999-02-04 13:28:56 +00:00
dcs
659022e4d0 The trace facility was full of bugs. Correct that by using the
right variable.

PR:		bin/9756
1999-02-04 13:20:30 +00:00
dcs
c08e2f20d6 Silence a warning.
PR:		bin/9754
1999-02-04 13:16:21 +00:00
dcs
96dd20c844 The previous fix for "type" was absolutely lousy. Not only the buffer
allocated was not big enough, but it ended up to being used where it
was supposed to be used. The person who did that ought to be shot, but
since I'm a good person, I'll forgive myself...

PR:		bin/9743
1999-02-04 13:06:47 +00:00
dcs
0dd4d53966 Add conditional compilation facilities to ficl. This had been previously
committed to RELENG_3 instead of HEAD, so let's HEAD catch up.

PR:		bin/9662
1999-02-04 12:57:56 +00:00
msmith
747ee6171b Mention the net.inet.tcp.tcbhashsize tunable. 1999-02-03 09:07:33 +00:00
kato
3884d3cc63 PC98 version of new boot loader. Because boot2 has not yet ported,
files in boot2 directory are copies from legacy biosboot.

Submitted by:	IMAI Takeshi <take-i@ceres.dti.ne.jp>
1999-02-03 08:39:09 +00:00
jkh
d2bdcd02d6 Whoops! Forgot to include Mr. Sobray's more command in the last set
of commits.

Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-02-01 06:08:21 +00:00
rnordier
bd2147c849 Check size of partition before using it. 1999-01-29 03:36:42 +00:00
msmith
13b179d2d9 Document the machdep.pccard.pcic_irq tunable, which allows the user to tune
the interrupt which will be given to the PCIC.  If the value supplied is
illegal or not available, interrupts will be turned off and polled mode
used instead.
1999-01-29 01:16:50 +00:00
jkh
1670aeef84 Make builtin's state-aware in loader.
Submitted by:	Daniel C. Sobral
PR:		9663
1999-01-28 06:33:03 +00:00
rnordier
8948b132e7 Fix a couple of further bugs: missing argument to sprintf() and
"==" used for "=".
1999-01-25 23:07:02 +00:00
rnordier
a732e65749 Correctly record the end of the a.out symbol table. In practice, a
bootinfo structure where bi_esymtab < bi_symtab was being passed
to the kernel.  In the case of older 2.x kernels, this was causing
garbage to be printed to the video console, followed by an exception.

This should resolve a problem reported on -current by Peter Jeremy
<peter.jeremy@auss2.alcatel.com.au>.
1999-01-25 10:34:35 +00:00
msmith
10c34c883f From the PR:
I added a FICL_TRACE-conditioned trace facility based on "see".
It is ugly because words' functions are almost all static, and ficlExec,
where the trace has to be located, can't get their pointers. So, #ifdef
this staticization, and add most of see's body into ficlExec. Duplication
of code, uglyness, etc. But it is cleanly #ifdef'ed, and works like a
charm.

	It does not provide "step" facility, though, just trace. It is
tunable at run-time through "trace!". If anyone (most likely me :) ever
wants a step facility, I'll add it. Should be easy.

PR:		bin/9652
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:06:21 +00:00
msmith
275b43da47 Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR:		bin/9651
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 06:03:44 +00:00
msmith
01bff70846 From the PR:
FICL's TYPE copies the counted string to HERE, as abial has
remarked. Answering to abial's question, this is NOT garanteed to have
enough space.
...
	We have dynamic memory. Even before memory-alloc got in, we
already had dynamic memory. Use it, then! (ficlMalloc is sysdep, so I
suppose that's why it was not used for TYPE; ficl is probably designed
to work without a working ficlFree).

Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-24 05:58:18 +00:00
msmith
02505f391b Document root_disk_unit 1999-01-24 00:12:17 +00:00
msmith
0c0cd985f7 biosdisk.c
Implement a new variable 'root_disk_unit' which supersedes
	'num_ide_disks' and makes it possible to explicitly set the
	root device unit number regardless of type considerations.

bootinfo.c
	If we can't calculate a dev_t for the root disk, complain and
	don't proceed to boot with an invalid boot device.
1999-01-24 00:12:04 +00:00
msmith
fd028a36a2 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
msmith
d10da21643 Add EXCEPTION word set.
Make TIB handling use buffer size to conform with ANS Forth.

Add ANS MEMORY-ALLOC word set.

See the PRs for extensive details.

PR:		kern/9412 kern/9442 kern/9514
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:52:59 +00:00
msmith
264d58c629 bootstrap.h
help.common
interp.c
	Rename the 'source' command to 'include' in order to avoid conflict
	with the ANS Forth command of the same name. (kern/9473)

interp_forth.c:
	Changes from kern/9412 (EXCEPTION word), kern/9442 (TIB buffer
	sizing) and an improved version of kern/9460 (set
	version numbers).

load_aout.c:
	Trim some obsolete #if 0'ed cruft.

pnp.c:
	Tidy the pnpscan output, turn off the module scanning until we
	sort out how to do it right.

PR:		kern/9412 kern/9442 kern/9460 kern/9473
Submitted by:	PRs from Daniel Sobral <dcs@newsguy.com>
1999-01-22 23:50:14 +00:00
rnordier
3dbd26cd87 Fix extraneous free() on error. 1999-01-22 21:33:52 +00:00
rnordier
825d5b5ecb Fix read error not being detected. 1999-01-22 18:32:52 +00:00
rnordier
b0e496076e Push version numbers up to 1.00. This is just intended to reflect
that the BTX code can be regarded as stable: there are no associated
code changes.

Suggested by: obrien
1999-01-22 13:07:17 +00:00
msmith
5d28ad9742 Add 'set tunables' help, list the kernel tunable values that can currently
be overridden.
1999-01-21 22:03:16 +00:00
msmith
843f30ead3 Transition from using Perl to using awk for our text-manipulation
needs.  This removes the dependancy on Perl for the generation of the
loader, allowing the world to be built on a perl-free system.

Submitted by:	Joe Abley <jabley@clear.co.nz>
1999-01-18 19:05:27 +00:00
jdp
d1534ae793 Replace duplicated "old" linker set definitions with an include of
<sys/linker_set.h>.  Note, this isn't used on the i386.
1999-01-16 03:25:24 +00:00
abial
8b15ca3be2 Fall back to /boot/boot.conf, if /boot/loader.rc was not fount. This is
to cover the transition period.

Suggested by:	msmith
1999-01-15 00:31:45 +00:00
abial
9494b7f703 Change counter-intuitive pc@ and pc! to inb and outb.
Submitted by:	jkh
1999-01-14 23:48:03 +00:00
rnordier
9be829bcc3 In the event of a disk error, boot2 is expecting an error
code to be returned: give it one
1999-01-13 23:30:07 +00:00
abial
37594f3d58 Change /boot/boot.conf to /boot/loader.rc - this name reflects what it
really is.

Agreed upon by:	jkh, msmith and many others
1999-01-13 21:59:58 +00:00
abial
47c6dbb736 Add words "pc!" and "pc@" which allow to manipulate I/O ports. This can
be helpful when directly fiddling with PC hardware.

Also, define "arch-i386" appropriately, as suggested by Daniel C. Sobral.
1999-01-13 21:31:50 +00:00
msmith
340cd27568 Typo in patch application.
PR:		kern/9459
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-13 08:11:41 +00:00
rnordier
52bec104fc Drop boot.help support. 1999-01-11 11:36:03 +00:00
msmith
a1a7a38288 No builtin command resets getopt before using it, causing
problems in case a wrong option was given previously, and no option
is given to the next command.

PR:		kern/9371
Submitted by:	"Daniel C. Sobral" <dcs@newsguy.com>
1999-01-11 06:41:32 +00:00
msmith
b2cbe7d60a Preserve the previous loader as loader.old.
Note no matching commit for the Alpha, as the alpha boot0 stage does
not have the ability to prompt for user input.

PR:		kern/9406
Submitted by:	 "Daniel C. Sobral" <dcs@newsguy.com>
1999-01-11 05:52:28 +00:00
msmith
d984bcc310 Disable kzipping the loader; it seems to be breaking the aout-to-elf build 1999-01-10 20:20:27 +00:00
steve
621ae068e7 Remove redundant line of code.
PR:		9364
Submitted by:	Daniel C. Sobral <dcs@newsguy.com>
1999-01-10 18:22:23 +00:00
rnordier
4778b8bc9a Use etc/make.conf settings for serial port and speed.
Submitted by: rvb
Reviewed by: bde
1999-01-10 14:48:05 +00:00
peter
b431721dfe 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
msmith
f94cebfd23 Enable escapes for $ to make it possible to insert variable names into
other variable values.
1999-01-10 05:08:12 +00:00
msmith
38518422b0 Explicitly look for kzip in /usr/bin, again this is a stopgap, to avoid
making kzip a build tool.
1999-01-09 20:14:46 +00:00
msmith
fc4e8e72e8 kzip the loader, this shrinks it to about 60% of its original size.
Note that this is a stopgap with dependancies on the a.out tools.
1999-01-09 02:38:40 +00:00
msmith
cb728cac10 Extend bd_print() so that it displays slices and partitions on disks. 1999-01-09 02:36:19 +00:00
msmith
5d74568db6 Add a description for 'lsdev' so that it shows up in the '?' display 1999-01-09 02:34:48 +00:00
msmith
4ef3c7f8c9 Alpha-specific help topics (currently empty) 1999-01-05 20:44:26 +00:00
peter
8b561c2d75 Fix a potential sign extension bug on 8-bit chars.
Outputting a backspace isn't supposed to be destructive..  It isn't on
most terminals, nor on the standard bios output (vs. TERM_EMU mode)
1999-01-04 18:45:08 +00:00
peter
1eaabe003d Fix variable initialization.. It was written with '==' instead of '-'.
#include <string.h> for string prototypes.
1999-01-04 18:39:24 +00:00
peter
e1aacd6020 Clean some unused variables lint 1999-01-04 18:38:23 +00:00
peter
e8366473b6 Don't forget a trailing \n when loading a kernel that has been stripped.
(This might make ELF_VERBOSE look funny, but I'm tempted to delete that
 anyway)
1999-01-04 18:37:41 +00:00
msmith
2ffac818e2 Restore dependancy to build loader.help here 1999-01-04 01:28:46 +00:00
msmith
87a6ba93eb Add dependancy to build loader.help here 1999-01-04 01:28:39 +00:00
msmith
903057bda7 First cut at generating loader.help for the alpha 1999-01-03 20:54:05 +00:00
msmith
f70015d87b Reenable generation of the loader.help file 1999-01-03 20:50:35 +00:00
jkh
cfed369515 Update for new boot block location. 1999-01-02 23:22:12 +00:00
abial
a792897eff Add support for some FACILITY words:
key? ( -- flag)  \ check to see if there's a key to be read from input
ms   ( u -- )    \ wait that many milliseconds
seconds ( -- u ) \ get number of seconds from midnight.

'words' now outputs the list page by page - this probably should go
through libstand's pager, but will have to wait for closer integration of
built-ins with Forth...

Submitted partially by:	W Gerald Hicks <wghicks@bellsouth.net>
1998-12-31 14:03:28 +00:00
abial
ce90d9c5af Add back ability to make beeps when using new TERM_EMU.
Submitted by:	W Gerald Hicks <wghicks@bellsouth.net>
1998-12-31 13:44:04 +00:00
abial
8c46b00bf5 Add simple terminal emulator, compatible with cons25. Currently supported
capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind
-DTERM_EMU - should it cause any problems, you can remove this define
to get back the old behaviour.

You'll find some examples how to use it in src/share/examples/bootforth.

Reviewed by:	jkh
1998-12-22 11:51:25 +00:00
abial
73c1ba9ace Add new word ".#" which acts like "." but doesn't output a space separator.
I found it impossible to output parametrized strings like "\033[%d;%dH"
without building them first in pad area.
1998-12-22 11:46:27 +00:00
abial
32b47360c7 * Begin integration of built-ins with Forth: leave the exit code from
a built-in command on Forth stack.
* Fix a bug which was causing a panic when loading stripped aout kernels.

Reviewed by:	jkh
1998-12-22 11:41:51 +00:00
n_hibma
e6048522a9 Removed dynamic loading of FileHandle 1998-12-16 09:09:09 +00:00
msmith
1910d87c8c Disable build/install of boot.help until we sort out how to construct it
in the makeworld environment.
1998-12-16 02:27:15 +00:00
msmith
09ed443f7a Reformat help to improve subtopic display appearance, other minor
cleaning.  The 'help' command in the loader should now be usable and
hopefully informative.
1998-12-15 14:32:17 +00:00
msmith
aa7d3efb7f Build the composite help file from the generic and architecture-specific
help files, sorting topics and subtopics to allow maximum flexibility.
1998-12-15 14:21:30 +00:00
msmith
d0ca1a94ef unlocalise build date (merge from i386) 1998-12-15 04:27:15 +00:00
ache
e2b7c19122 unlocalize date
Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
1998-12-07 16:17:41 +00:00
rnordier
2e39f2aa26 Revise some comments and labels. 1998-12-05 11:58:33 +00:00
rnordier
b4417b110a Drop EDD support detection, though retain configurable use of disk
packet interface.  Add booteasy-style F5 support.  Add no-update
option. Implement various space optimizations and consistency fixes.
1998-11-29 14:09:00 +00:00
rnordier
63547816aa Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
1998-11-22 07:59:16 +00:00
archie
44c6ae9ee9 Fix misallocation of buffer bug (too short) 1998-11-20 02:57:41 +00:00
paul
54b3506630 This fixes a bug in the bcache code whereby false cache hits occur
the first time block 0 is read. This fix initialises the block
numbers to -1 which isn't the most correct thing for a daddr_t but
it isn't likely to cause a problem in the boot blocks and it could
do with a more thought out fix later.

The bug is probably benign on the i386 but on the alpha it can
cause initial file opens to fail. This is the cause of the "can't
open /boot/boot.conf" errors.

It appears on the alpha because of a number of combining factors.
On the alpha the LABELSECTOR is 0 so block 0 needs to be read in
from the media. The first time this happens you get a false hit
because the bc_blkno field is zero initially. Also, the timestamp
check against this cache hit succeeds because on the alpha a hacked
getsecs() function can return 0 when it starts counting so that
the zero initial timestamp + BCACHE_TIMEOUT is greater than the
current time until getsecs() has counted passed BCACHE_TIMEOUT.

The overall effect is that the first open() that occurs gets a
false cache hit and returns garbage to the bd_strategy() function
which then fails the open() call. This false hit then stays in the
cache until BCACHE_TIMEOUT getsecs() ticks have passed; all open()
calls during this time fail.

This explains why you can generally access the media by the time
you get to interp() and start issuing commands but the earlier
attempts to run the boot scripts are failing.

It's possible that this is causing the problem switching to the
mfsroot floppy as well but I haven't confirmed that.
1998-11-19 18:12:03 +00:00
msmith
b34b1e8149 Add documentation for $rootdev. 1998-11-13 23:53:02 +00:00
msmith
2a559f01fc Add a new variable $num_ide_disks which is used to offset the unit number
for SCSI disks when converting from BIOS unit numbers to da unit numbers.

Prompted by Kevin Street <street@iname.com>
1998-11-13 23:40:02 +00:00
jkh
a38f0f0f5b bootforth seems to be working well enough for me and others to turn
on by default.  If it causes trouble, it's very easy to switch off again.
1998-11-12 07:40:51 +00:00
rnordier
4ec4a30d39 Revise error messages. 1998-11-11 08:56:17 +00:00
rnordier
dc45a79b52 Prevent boot.config being parsed more than once. 1998-11-08 18:37:28 +00:00
rnordier
7385d1af71 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
rnordier
7c887cb15d 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
jkh
759a9b6b00 o Add proper stack checking to all file words
o add fkey and fread
o eliminate fexists now that this can be expressed in HLL forth
  ( : fexists fopen dup -1 <> if fclose 1 else drop 0 then ; ) :-)

Once we get the ability to write files, it should be possible to do
stand-alone rescue work from the 3rd stage boot. :)
1998-11-07 17:38:40 +00:00
jkh
24dd9999f4 Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.
1998-11-07 06:18:06 +00:00
jkh
6901718ae1 Eliminate much code cruft by extending simple file I/O API to include
fopen and fclose.  Also look for /boot/boot.4th now and, if found,
load its contents.
1998-11-07 06:18:00 +00:00
jkh
c2367684c4 Take init out of here - it's a layering violation. 1998-11-07 05:01:25 +00:00
jkh
4a00a3763a Don't have debugging on by default - it makes testing annoying. :) 1998-11-07 03:44:10 +00:00
jkh
f6a4f0bcbb OK, fload/fexec work properly when both compiling and interpreting
now.  Gack.
1998-11-07 01:56:06 +00:00
jkh
5758ceac73 switch words to default mode. 1998-11-06 23:50:08 +00:00
jkh
25f1ad0807 Submit better fix to the prompt bug. 1998-11-06 23:22:26 +00:00
jkh
a171ebaacb Make fexists/fload work with existing string literals instead. Doing
my own string literal handling is just too wonky.
1998-11-06 23:20:32 +00:00
jkh
1c6cbcdb63 Argh, I had this right[er] before. More commits to follow. 1998-11-06 19:17:03 +00:00
jkh
68bf62c9c5 Use proper literal names. 1998-11-06 04:01:32 +00:00
msmith
7507d1320d Ack. Create parseable command tail properly, and eat args out of the TIB. 1998-11-06 03:50:44 +00:00
msmith
93f223abcf Don't not print the prompt string; not doing this has funny side-effects.
Make the prompt an empty string instead.
1998-11-06 03:47:08 +00:00
msmith
d55ef069f0 Don't use the poxy vmGetString interface (who uses counted strings these
days?), get the input buffer ourselves.  Add some debugging code.
1998-11-06 03:45:36 +00:00
rnordier
4b3ca37c67 Make use of BIOS int 0x13 extensions configurable, and disabled
by default.
1998-11-05 20:52:25 +00:00
jkh
60dd38c7b8 Remember a bit more of my forth and do:
o Add fexists word to check for the presence of a file
o make fexists and fload immediate words which DTRT both interpreted
  and compiled (doh!)
o add an init word which gets run at bootstrapping time to do extra
  post-coldload initialization (in the default implementation, we
  look for /boot/boot.4th and load it if found).
1998-11-05 08:39:43 +00:00
jkh
e6a8d1ef2a 1. rebuild all elements of testmain properly for safety.
2. add fload and key prims for doing simple file and terminal I/O, respectively
1998-11-05 07:27:55 +00:00
msmith
4b888331ac Explicitly invoke perl to run the softwords.pl script in case the
script is not executable.
Submitted by:	Don Lewis <Don.Lewis@tsc.tdk.com>
1998-11-05 04:54:05 +00:00
msmith
6824b5990c Improve the assertion testing for successful softword compilation.
The excessive use of assert() vs. robust error checking is annoying.
1998-11-04 07:07:18 +00:00
msmith
e9af97476d Turn off -g accidentally left in from testing. 1998-11-04 03:42:36 +00:00
msmith
d41cd1ae0c Fix includes; we were still pulling in <stdlib.h> in some places.
Support building a standalone interpreter with 'make testmain', remove
win32 and egregious gets() in testmain.c
1998-11-04 03:42:16 +00:00
msmith
82d864ae88 Use a smaller default dictionary to waste less space. 1998-11-04 03:41:09 +00:00
jkh
be0dff737a Respect ${.OBJDIR} properly when looking for libficl.a 1998-11-04 02:36:18 +00:00
msmith
c8040ed425 Add required parts for BootForth building (currently disabled and
untested).  Only suitable for i386 at the moment, as we are missing
setjmp/longjmp on the Alpha.
1998-11-04 00:30:47 +00:00
msmith
80f2880bed Make this work in the libstand environment; don't use stdio/stdlib headers. 1998-11-04 00:29:33 +00:00
msmith
6717117558 Add BootForth hooks; if BOOT_FORTH is defined, pass every line read
to the Forth interpreter.  Instantiate all of our inbuilt commands
as Forth words, and handle them being called from there.

Add my copyright to the bcache module (oops).
1998-11-04 00:29:01 +00:00
msmith
c2a6784bfe Include "bootstrap.h" to get a definition for bcache_devdata.
Submitted by:	jkh
1998-11-03 23:44:49 +00:00