summaryrefslogtreecommitdiff
path: root/forth/debugging
Commit message (Collapse)AuthorAgeFilesLines
* libopenbios: add PReP boot partition loader for PPCMark Cave-Ayland2018-05-261-0/+1
| | | | Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* Make current CPU context available in ForthMark Cave-Ayland2016-10-161-0/+6
| | | | Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* libopenbios: move go() function into libopenbiosMark Cave-Ayland2016-09-111-5/+9
| | | | | | | | | Add an (arch-go) hook for architectures that need to do their own thing before starting an image, and switch the callers over to use it. Also clarify the state-valid check: any non-zero value is considered true. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* client.fs: add load-state param variableMark Cave-Ayland2016-09-111-0/+1
| | | | | | | This is in case we need to pass elf-boot parameters into the client executable. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* libopenbios: rename saved-program-state to load-stateMark Cave-Ayland2016-09-111-8/+7
| | | | | | | The per-arch context is held via __context, so what we hold here is effectively just information about the last loaded file. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
* bootcode_load.c: use new get-bootcode-info plus minor bootcode fixesMark Cave-Ayland2014-03-091-3/+0
| | | | | | | | | | | | | | | | | | Bring the bootcode loader in line with all of the other existing loaders, making use of our new get-bootcode-info word to pass the parameters instead of creating global variables for them all. Here we remove all global variables and references to the fixed load address used by the quik bootcode loader as this is handled by get-bootcode-info. This exposes a minor bug where we need to return success as soon as a valid bootcode is detected; otherwise we inadvertently drop into the filesystem detection code which is invalid. Based upon a patch by Andrei E. Warkentin <andrey.warkentin@gmail.com>. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1280 f158a5a8-5612-0410-a976-696ce0be7e32
* load: fix generation of /chosen bootpath propertyMark Cave-Ayland2013-06-281-12/+72
| | | | | | | | | | | | | | | | | | | | | | | It seems that some OS require the bootpath property to be the full, unaliased path to the selected boot device, so use get-instance-path to ensure that this is the case. There is a slight issue here when auto-probing a partition, since the package arguments won't contain the chosen partition id which semms to be mandatory for bootpath. In order to resolve this, scan for a special selected-partition-args property in the instance chain before generating the bootpath, and if it exists use that for the device package arguments instead. Using this mechanism, we can set this property once we have auto-probed a partition in mac-parts.c so bootpath is generated correctly. Finally it is possible to remove the current hack of overwriting bootpath when calling open-dev on a mac-parts partition, which would confuse some bootloaders if they read bootpath after opening a new device. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1167 f158a5a8-5612-0410-a976-696ce0be7e32
* loader: implement new loader type for CHRP/Apple partition bootcode (%BOOT)Mark Cave-Ayland2013-04-051-0/+4
| | | | | | | | | | | | | | | | | | | | | One of the primary reasons that issues with the quik bootloader were not detected earlier was because arch/ppc/qemu/main.c has a separate code path for forcing an old-world boot when -boot c is passed to QEMU. This commit implements the bootcode loader as a core OpenBIOS loader which enables old-world payloads such as quik to be executed using: load hd:,%BOOT go Note that we also fix a bug in mac-parts.c to ensure that we don't try and interpose a filesystem package when %BOOT is passed as a filename. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Alexander Graf <agraf@suse.de> CC: Andreas Färber <afaerber@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1105 f158a5a8-5612-0410-a976-696ce0be7e32
* mac-parts.c: Fix auto-partition selection for the dir word.Mark Cave-Ayland2013-03-221-1/+1
| | | | | | | | | | | | | | | Commit r1100 fixed the quik bootloader but broke automatic partition selection for the dir word. Differentiate between the package having no arguments (argstr == NULL) and the package having empty arguments (argstr == ""), and alter the dir word to use the latter version to invoke the automatic partition selection code when required. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> CC: Alexander Graf <agraf@suse.de> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1103 f158a5a8-5612-0410-a976-696ce0be7e32
* Improve dir word by reducing complexity and adding some more diagnostics.Mark Cave-Ayland2012-11-241-3/+5
| | | | | | | | | | | Since the OF path resolution algorithm automatically passes anything following a ':' as an argument to the specified device, we don't need to bother with handling this ourselves. As a side effect, the auxiliary word split-path-device is no longer needed as we can isolate the path by doing a simple split on ','. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1071 f158a5a8-5612-0410-a976-696ce0be7e32
* Make select-dev and unselect-dev compatible with OBP.Bob Breuer2011-08-081-16/+0
| | | | | | | | | | | | | | | | From the 1275 errata for section H.8, select-dev and unselect-dev are pre Open Firmware, but not the same as open-dev/device-end. Make them Sun OBP compatible by pulling the functionality for select-dev/ unselect-dev out of (and simplifying) begin-package/end-package. For the Sun OBP definition of begin-package/end-package, along with descriptions and example usage, see the "Debugging and Testing FCode Programs" chapter of "Writing FCode 3.x Programs". Signed-off-by: Bob Breuer <breuerr@mc.net> Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@1046 f158a5a8-5612-0410-a976-696ce0be7e32
* Alter (encode-bootpath) so that it processes a string on the stack rather ↵Mark Cave-Ayland2010-08-211-10/+9
| | | | | | | | | | | | than using the parse buffer directly. This enables us 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
* Rework the OpenBIOS internals so that boot, load and init-program now all ↵Mark Cave-Ayland2010-08-011-14/+50
| | | | | | | | | | | | | | | | | | | | | use the unified libopenbios loader code with improved 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
* Switch dir over to use the new static filesystem dir methods.Mark Cave-Ayland2010-07-111-1/+2
| | | | | | | Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@817 f158a5a8-5612-0410-a976-696ce0be7e32
* Fix up parse word so that it can correctly handle empty arguments and ↵Mark Cave-Ayland2010-06-281-6/+14
| | | | | | | | | | | | (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
* Now that we have a C version of go available, rework client.fs so that it ↵Mark Cave-Ayland2010-04-021-16/+10
| | | | | | | | | | | | will automatically detect if a platform has execution 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
* The new loader APIs in libopenbios already have routines to detect the type ↵Mark Cave-Ayland2010-04-021-295/+13
| | | | | | | | | | | | of executable at a given address and react 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
* Introduce the concept of the OF saved-program-state structure and modify all ↵Mark Cave-Ayland2010-03-261-4/+14
| | | | | | | | | of the loaders (except PPC) to make use of it. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@708 f158a5a8-5612-0410-a976-696ce0be7e32
* Add Fcode as a suitable executable payload for init-program.Mark Cave-Ayland2010-01-031-0/+38
| | | | git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@659 f158a5a8-5612-0410-a976-696ce0be7e32
* dir command cleanupLaurent Vivier2009-11-261-7/+5
| | | | git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@635 f158a5a8-5612-0410-a976-696ce0be7e32
* Implement command "dir <path>".Laurent Vivier2009-11-221-0/+17
| | | | | | | | | | | 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
* actually print value of a (lit)Stefan Reinauer2009-11-201-1/+2
| | | | git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@619 f158a5a8-5612-0410-a976-696ce0be7e32
* Reworked version of Forth Source debugger (Mark Cave-Ayland)Blue Swirl2009-11-151-4/+12
| | | | | | | | | | | | | | | | | | | | | | 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
* Correctly encode strings of bootpath and bootargs properties.Laurent Vivier2009-11-101-2/+2
| | | | | | | Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@602 f158a5a8-5612-0410-a976-696ce0be7e32
* Manage state-valid.Laurent Vivier2009-09-211-3/+4
| | | | | | | | | | "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
* Add bootinfo-loader.Laurent Vivier2009-09-201-1/+11
| | | | | | | | Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@584 f158a5a8-5612-0410-a976-696ce0be7e32
* When "load" is used, correctly set bootpath and bootargs.Laurent Vivier2009-09-201-4/+7
| | | | | | | Signed-off-by: Laurent Vivier <Laurent@Vivier.eu> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@583 f158a5a8-5612-0410-a976-696ce0be7e32
* Implements XCOFF loader (to be able to boot Apple BootX bootloader)Laurent Vivier2009-09-191-1/+12
| | | | | | | | Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@581 f158a5a8-5612-0410-a976-696ce0be7e32
* Allows to boot openSUSE from install CD-ROMLaurent Vivier2009-09-181-4/+268
| | | | | | | | | | | Implements "init-program" using loader packages Write a first loader package: elf-loader Signed-off-by: Laurent Vivier <Laurent@vivier.eu> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@578 f158a5a8-5612-0410-a976-696ce0be7e32
* Implement load methodLaurent Vivier2009-08-301-0/+18
| | | | git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@575 f158a5a8-5612-0410-a976-696ce0be7e32
* Remove unnecessary trailing newlinesBlue Swirl2008-12-134-4/+0
| | | | git-svn-id: svn://coreboot.org/openbios/openbios-devel@285 f158a5a8-5612-0410-a976-696ce0be7e32
* initial import of openbios--main--1.0--patch-26Stefan Reinauer2006-04-265-0/+357
git-svn-id: svn://coreboot.org/openbios/openbios-devel@1 f158a5a8-5612-0410-a976-696ce0be7e32