History log of /freebsd-10-stable/sys/boot/common/interp_forth.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 294985 28-Jan-2016 smh

MFC r293835:

Improve non-interactive forth cmd error reporting

Sponsored by: Multiplay


# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 245148 08-Jan-2013 grehan

Bring in some userboot changes from the bhyve branch to reduce diffs.

r238966
Bump up the heap size to 1MB. With a few kernel modules, libstand
zalloc and userboot seem to want to use ~600KB of heap space, which
results in a segfault when malloc fails in bhyveload.

r241180
Clarify comment about default number of FICL dictionary cells.

r241153
Allow the number of FICL dictionary cells to be overridden.
Loading a 7.3 ISO with userboot/amd64 takes up 10035 cells,
overflowing the long-standing default of 10000.

Bump userboot's value up to 15000 cells.

Reviewed by: dteske (r238966,241180)
Obtained from: NetApp


# 242145 26-Oct-2012 mav

Fix loader crash when some unhalted exception happens during `include`
command execution. In case of such unhandled exception, vmReset() inside
ficlExecC() flushes the VM state. Attempt to return back to Forth after
that cause garbage dereference with unexpected results. To avoid that
situation call vmThrow() directly instead of expecting Forth to do it.


# 119483 25-Aug-2003 obrien

Use __FBSDID().
Also some minor style cleanups.


# 94313 09-Apr-2002 dcs

Upgrade FICL to 3.02. Forgot this one, sorry.

PR: 36308
Submitted by: dcs


# 87599 10-Dec-2001 obrien

Update to C99, s/__FUNCTION__/__func__/,
also don't use ANSI string concatenation.


# 86608 19-Nov-2001 obrien

Upper case the FreeBSD loader prompt.
On OFW based machines, it is just too confusing having the firmware and
OS loader giving the same prompt. This is a nice compromise that 99% of the
users on non-OFW platforms will probably not even notice.


# 64187 03-Aug-2000 jhb

Cleanup warnings. Most of these are signed/unsigned warnings, as well as
some added const's.


# 61720 16-Jun-2000 dcs

Fix vocabulary juggling so that builtins voc is always searched before
forth vocabulary when initially creating the builtins. FICL 2.05 has a
better way to do this, but this works for now.

Fixes "?".


# 61693 14-Jun-2000 dcs

Remove the setting of sourceid from bf_vm(), as bf_vm() really has
no clue.

Set sourceid to 0 when booting, which is the correct setting for stdin.

Set sourceid to an arbitrary fd when include'ing, preserving and restoring
the previous sourceid. This is possibly broken(), as 0 is a valid fd. Maybe
we should +1 to this value.

This fixes the version problem widely reported.


# 61371 07-Jun-2000 dcs

Place original builtins in a vocabulary called "builtins". This
is intended mainly for debuging purposes, but it can be used by
other words if done carefully.


# 51786 29-Sep-1999 dcs

Bring in ficl version 2.03. No version bump for loader.


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 44571 08-Mar-1999 dcs

Increase ficl's dictionary size, in preparation for the newer loader.rc.


# 43614 04-Feb-1999 dcs

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.


# 43321 28-Jan-1999 jkh

Make builtin's state-aware in loader.

Submitted by: Daniel C. Sobral
PR: 9663


# 43077 22-Jan-1999 msmith

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>


# 42290 04-Jan-1999 peter

Fix variable initialization.. It was written with '==' instead of '-'.
#include <string.h> for string prototypes.


# 42000 22-Dec-1998 abial

* 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


# 40988 07-Nov-1998 jkh

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.


# 40984 07-Nov-1998 jkh

Don't have debugging on by default - it makes testing annoying. :)


# 40950 06-Nov-1998 msmith

Ack. Create parseable command tail properly, and eat args out of the TIB.


# 40948 06-Nov-1998 msmith

Don't use the poxy vmGetString interface (who uses counted strings these
days?), get the input buffer ourselves. Add some debugging code.


# 40929 05-Nov-1998 jkh

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).


# 40882 04-Nov-1998 msmith

Use a smaller default dictionary to waste less space.


# 40875 03-Nov-1998 msmith

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).