Commit Graph

7 Commits

Author SHA1 Message Date
Mark Cave-Ayland d6a5ca977b forth: implement load/init-program as per IEEE-1275 specification
load should place the file at load-base, whilst init-program should parse
the memory at load-base and set up the context accordingly.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
2016-09-11 12:53:49 +01:00
Mark Cave-Ayland fbea11468a libopenbios: rename saved-program-state to load-state
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>
2016-09-11 10:32:17 +01:00
Blue Swirl 988f780aa5 loaders: fix open_ih return value checks
open_ih() returns -1 on error and 0 is a valid return value.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@839 f158a5a8-5612-0410-a976-696ce0be7e32
2010-08-07 12:49:52 +00:00
Mark Cave-Ayland 78863dfcc9 Switch Forth loader over to using an ihandle rather than a direct path reference.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@799 f158a5a8-5612-0410-a976-696ce0be7e32
2010-06-27 13:06:38 +00:00
Mark Cave-Ayland d4451ae216 Move the *_init_program() functions into the main loader source files so that everything is in one place. Part of this
involves taking the existing parts of the XCOFF loader and putting them into a new loader file xcoff_load.c. Also fix a 
dependency order change these changes introduce when building openbios-unix.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@720 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-28 23:47:36 +00:00
Mark Cave-Ayland c60fad9646 Add is_fcode(), is_forth() and is_aout() functions which take a pointer to an area of memory which may contain a valid loader
image.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@719 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-28 20:55:10 +00:00
Mark Cave-Ayland 126f9ee43e Move the Forth loader forthload.c from arch/*/forthload.c to libopenbios/forth_load.c. While the Forth loader source was
included and built as part of the SPARC64 and SPARC32 builds, it was never actually invoked in the boot sequence. Hence this 
patch maintains the existing behaviour in that only X86 builds included the Forth loader.

Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@712 f158a5a8-5612-0410-a976-696ce0be7e32
2010-03-27 11:53:59 +00:00