to ensure that execution of any platform-specific boot code can occur before the main "load & go" boot, even if they invoke
Forth commands that alter the parse buffer.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@854 f158a5a8-5612-0410-a976-696ce0be7e32
IEEE-1275 spec compliance.
This patch implements the following:
1) Fix bootpath/bootargs handling so that default values are read from NVRAM, and allow multiple space-separated values to be
specified.
2) With correct bootargs handling in place, move the ELF loader over to the new libopenbios unified loaders.
3) Remove all the loader code from all architecture directories sine we don't need it anymore.
4) Simplify the boot word so it invokes platform-specific code where required, then calls load and go as per the specification.
Tested on all my available images for SPARC32, SPARC64 and PPC, and compile-tested on x86.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@828 f158a5a8-5612-0410-a976-696ce0be7e32
This patch originally started as a fix for PPC, in that the NVRAM initialiser wasn't been run on startup (this is why printenv
on PPC always showed much much less than on SPARC). However, it also showed up some inconsistent logic for boot device
selection, which must also happen *before* boot is called in order for load to work correctly. With this patch applied, bootpath
and bootargs are set from boot-device and boot-args respectively on startup for SPARC32, SPARC64 and PPC.
Note: there is a small chance SPARC32 may break on some images - please let me know if it does.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@805 f158a5a8-5612-0410-a976-696ce0be7e32
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
hierarchy is correct, we can simply pass an ihandle into the loader and it will work correctly regardless of whether it is being
invoked on an entire disk, partition or individual file.
In order to test the new code, start by switching the Fcode loader over to the new infrastructure for testing on SPARC64. Note
this patch also contains a correction to load-base on SPARC which was being set to a value other than 0x4000 which is the
documented default.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@798 f158a5a8-5612-0410-a976-696ce0be7e32
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
i) client-call-iface did not set a return value of 0 on success; hence the top stack argument was dropped as part of the status
check causing an off-by-one error.
ii) instead of setting pb->nret to be the number of arguments returned, the (random) value being passed in was being used to
control the number of arguments being returned.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@732 f158a5a8-5612-0410-a976-696ce0be7e32
capability based upon the existence of the lower level (go) word. Also add standard ELF image support to (go) for SPARC32,
SPARC64 and x86.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@728 f158a5a8-5612-0410-a976-696ce0be7e32
accordingly. Hence since the loaders are currently written in C, it makes more sense to drop down into C and re-use the same
code rather than have a second implementation in Forth.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@726 f158a5a8-5612-0410-a976-696ce0be7e32
This change fixes node unit address matching on arch
where cell is not 4 byte integer (tested with sparc64.)
Since we encode "reg" property chunks with encode-int
we need to use the same encoding while preparing unit
phys addr for comparison at path resolution time.
- (exact-match): calculate phys addr length using 4 byte
member encoding with /l* not cells
- find-child: encode phys addr components similar to
encode-int with 4 byte stores
Signed-off-by: Igor V. Kovalenko <igor.v.kovalenko@gmail.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@674 f158a5a8-5612-0410-a976-696ce0be7e32
Build broke with:
GEN openbios.dict
undefined word.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@660 f158a5a8-5612-0410-a976-696ce0be7e32
the private wordlist by default. This is required for executing Milax Fcode which defines package words which need to be externally
visible.
As a consequence, it is now possible to remove lots of "external" words used building the device tree since this is now the
default.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@655 f158a5a8-5612-0410-a976-696ce0be7e32
later). This allows us to proceed further with SPARC64 boot.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@642 f158a5a8-5612-0410-a976-696ce0be7e32
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
are not in forth stack order but in reversed (heh!) order. Our implementation
confused this.
This second patch is fairly straightforward; probably the only unexpected part is
the need to rename the existing /openprom/client-services "claim" and
"release" words to "cif-claim" and "cif-release" respectively. This is
because we need to use the "claim" and "release" words in
forth/system/ciface.fs to reverse the argument order before calling the real
underlying words.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@637 f158a5a8-5612-0410-a976-696ce0be7e32
This is the generic command, it needs support from the filesystem
packages.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@630 f158a5a8-5612-0410-a976-696ce0be7e32
are not in forth stack order but in reversed (heh!) order. Our implementation
confused this.
This might / will need some more work, but get this in so more people can test
easily.
From Mark Cave-Ayland and me.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@624 f158a5a8-5612-0410-a976-696ce0be7e32
- dummy implementations for peek, poke, ms and get-msecs
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@617 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
"go" can be done only if init-program has set state-valid to true.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@587 f158a5a8-5612-0410-a976-696ce0be7e32
Annexe H.8, "User interface name changes", "select-dev" and
"unselect-dev" have been obsoleted and replaced by "open-dev" and
"device-end".
But some scripts (like BootX) are using the obsoleted name, so we need
to
define them.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@582 f158a5a8-5612-0410-a976-696ce0be7e32
comments.
This as been reported by Steven Noonan.
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@573 f158a5a8-5612-0410-a976-696ce0be7e32
CHRP boot method.
It finds the CHRP bootscript using the file attribute 'tbxi' and
the blessed directory.
This method allows to boot easily Fedora (the bitness detection is done
by the script and yaboot is called with the according yaboot.conf) but
openSUSE is broken (you have to use "boot cd:,\suseboot\yaboot")
Debian works well (as usual...).
The openSUSE needs the missing forth words: "load" and "go".
The MacOS bootloader (BootX) is also loaded automatically but forth
script is too complex to be executed correctly.
Signed-off-by: Laurent Vivier <Laurent@vivier.eu>
git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@571 f158a5a8-5612-0410-a976-696ce0be7e32