Implement a basic C loader function in load.c that tries to load each supported executable file format. Now that the ihandle

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
This commit is contained in:
Mark Cave-Ayland
2010-06-25 20:42:00 +00:00
committed by Mark Cave-Ayland
parent add30adb7d
commit 3d7832bba9
13 changed files with 98 additions and 19 deletions

View File

@@ -177,7 +177,7 @@ dlabel_load( __attribute__((unused)) dlabel_info_t *di )
xt = find_ih_method("load", di->part_ih);
if (!xt) {
forth_printf("load currently not implemented for /packages/disk-label\n");
forth_printf("load currently not implemented for ihandle " FMT_ucellx "\n", di->part_ih);
PUSH(0);
return;
}

View File

@@ -16,6 +16,7 @@
#include "config.h"
#include "libopenbios/bindings.h"
#include "libopenbios/load.h"
#include "mac-parts.h"
#include "libc/byteorder.h"
#include "libc/vsprintf.h"
@@ -328,8 +329,8 @@ macparts_read(macparts_info_t *di )
static void
macparts_load( __attribute__((unused))macparts_info_t *di )
{
forth_printf("load currently not implemented for /packages/mac-parts\n");
PUSH(0);
/* Invoke the loader */
load(my_self());
}
NODE_METHODS( macparts ) = {

View File

@@ -14,6 +14,7 @@
#include "config.h"
#include "libopenbios/bindings.h"
#include "libopenbios/load.h"
#include "libc/byteorder.h"
#include "libc/vsprintf.h"
#include "packages.h"
@@ -352,8 +353,8 @@ pcparts_read(pcparts_info_t *di )
static void
pcparts_load( __attribute__((unused))pcparts_info_t *di )
{
forth_printf("load currently not implemented for /packages/pc-parts\n");
PUSH(0);
/* Invoke the loader */
load(my_self());
}

View File

@@ -14,6 +14,7 @@
#include "config.h"
#include "libopenbios/bindings.h"
#include "libopenbios/load.h"
#include "libc/byteorder.h"
#include "libc/vsprintf.h"
#include "packages.h"
@@ -284,8 +285,8 @@ sunparts_read(sunparts_info_t *di )
static void
sunparts_load( __attribute__((unused))sunparts_info_t *di )
{
forth_printf("load currently not implemented for /packages/sun-parts\n");
PUSH(0);
/* Invoke the loader */
load(my_self());
}