Age | Commit message (Collapse) | Author | Files | Lines |
|
Old OS X bootloaders need this in order to execute without throwing an
exception.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
Otherwise the Forth intepreter fails due to lack of buffer space when
trying to execute large boot scripts on platforms that use CR instead
of LF for line endings (particularly MacOS 9).
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Cormac O'Brien <cormac@c-obrien.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
When an evaluate string is split across a newline, the current string
position is assumed to be the top-most item on the stack. However
in the case of yaboot, items are left on the stack to be used by a
subsequent line within the same evaluate statement and so subsequent
lines are parsed incorrectly.
Fix this by saving the current string position on the r-stack across calls to
(evaluate) so the stack remains correct for subsequent lines.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
|
|
These words always output to the debug (serial) port even if video mode is
enabled. This makes debugging the video routines much easier when starting
QEMU with the -serial stdio option.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1189 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
a standard value.
BootX appears to be able to want to change the current package phandle by
executing Forth statements in the form "<value> to active-package". This won't
work correctly in OpenBIOS, since changing packages requires calling the
active-package! word to perform additional housekeeping such as changing
wordlists.
The proposed solution here is to redefine "to" at the end of device.fs so that if
package support is included, we perform an additional check on the destination xt
to see if it matches that of active-package. If it does, then we manually invoke
the active-package! word to select the new package.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1077 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
Some bootloaders, particularly OS X, execute Forth strings that make use
of Forth local variables. This patch provides an implementation that allows
OpenBIOS to execute such code.
A couple of examples are included below:
: diff.squares { A B -- A*A-B*B }
A A *
B B * -
;
: myword { ; cat dog }
4 -> cat
5 -> dog
cat \ cat's value pushed onto stack ( - cat)
dog \ dog's value pushed onto stack (cat - cat dog )
+
cr
." Total animals = " .
cr
;
Since the Forth locals stack and temporary dictionary take up extra space,
the locals implementation is protected by a new CONFIG_LOCALS build
variable.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1068 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
As pointed out by Tarl, since these are called as separate words (and not inline), we need to preserve the top-most R stack item
as this is return address of the word itself.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@912 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
extensions as they are required for OpenSolaris.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@911 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
to execute "' kmem64-tte is va>tte-data" for setting
the va>tte-data defer.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@878 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
(encode-bootpath) word so that it can handle optional
arguments. With these fixes in place we can now switch the boot word to use (encode-bootpath) which means that the bootpath and
bootarg properties are now set exactly the same when executing boot and/or load.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@803 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
spurious dictionary overflow messages appearing due to
setup-tmp-comp switching dictionaries to memory outside of the initial dictionary space.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@761 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
data stack items, and fix the Fcode evaluator to use
this new information to correctly resolve destination (b<mark) references. See the email archives for further discussion on why
this is required.
Hopefully this should finally resolve the Fcode backward branch problem; at least all previous incorrect resolutions now appear
correct and the Fcode evaluator no longer crashes or gets stuck in a loop while attempting to boot Milax.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@641 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
According to the specification, the destination for a backwards Fcode branch must be resolved from the bottom rather than the
top of the cstack. The existing version of the code was simply doing a swap, and so nesting any branches within a backward branch
would fail since the wrong destination would be resolved from the stack.
This patch adds a new cstack-startdepth variable to keep track of the cstack base location within an execution context
(setup-tmp-comp and execute-tmp-comp) and alters the backward branches to make use of it.
With this patch in place, Milax under Qemu doesn't crash anymore but sits in an infinite loop reading sectors from the CDROM.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@638 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
simpler version s" that does not contain a complex parser for
" "(0a) type of strings.
Also use handle-text in " instead of the hand crafted version. This fixes
strings in "see".
Signed-off-by: Stefan Reinauer <stepan@coresystems.de>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@613 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This patch implements the following Forth words:
debug <xt> - Mark word for debugging
debug-off - Unmark all words for debugging
resume - Return from subordinate Forth interpreter
The source debugger also implements the following commands when it has
been activated:
Up - Unmark current word for debugging, mark parent and continue
Down - Mark next word for debugging
Trace - Continue execution until end of word displaying
debug information
Rstack - Display contents of the Rstack
Forth - Launch subordinate Forth interpreter
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@611 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@572 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@511 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@502 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@498 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
This changes pocket index calculation to support more than two pockets.
As an example default number of pockets is set to 4.
This should ease nesting more than two levels using pockets as
temporary storage.
Signed-off-by: Igor Kovalenko <igor.v.kovalenko@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@494 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@492 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/openbios-devel@285 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/openbios-devel@231 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/openbios-devel@43 f158a5a8-5612-0410-a976-696ce0be7e32
|
|
git-svn-id: svn://coreboot.org/openbios/openbios-devel@1 f158a5a8-5612-0410-a976-696ce0be7e32
|