[OpenBIOS] [commit] r728 - in trunk/openbios-devel: arch/sparc32 arch/sparc64 arch/x86 forth/debugging
repository service
svn at openbios.org
Fri Apr 2 16:03:42 CEST 2010
Author: mcayland
Date: Fri Apr 2 16:03:38 2010
New Revision: 728
URL: http://tracker.coreboot.org/trac/openbios/changeset/728
Log:
Now that we have a C version of go available, rework client.fs so that it 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 at siriusit.co.uk>
Modified:
trunk/openbios-devel/arch/sparc32/boot.c
trunk/openbios-devel/arch/sparc64/boot.c
trunk/openbios-devel/arch/x86/boot.c
trunk/openbios-devel/forth/debugging/client.fs
Modified: trunk/openbios-devel/arch/sparc32/boot.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/boot.c Fri Apr 2 15:29:12 2010 (r727)
+++ trunk/openbios-devel/arch/sparc32/boot.c Fri Apr 2 16:03:38 2010 (r728)
@@ -107,6 +107,13 @@
break;
+ case 0x1:
+ /* Start ELF image */
+ entry = (void *) address;
+ image_retval = entry(romvec, 0, 0, 0, 0);
+
+ break;
+
case 0x5:
/* Start a.out image */
entry = (void *) address;
Modified: trunk/openbios-devel/arch/sparc64/boot.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/boot.c Fri Apr 2 15:29:12 2010 (r727)
+++ trunk/openbios-devel/arch/sparc64/boot.c Fri Apr 2 16:03:38 2010 (r728)
@@ -20,12 +20,12 @@
uint64_t qemu_cmdline;
uint64_t cmdline_size;
char boot_device;
+void *boot_notes = NULL;
extern int sparc64_of_client_interface( int *params );
static int try_path(const char *path, char *param)
{
- void *boot_notes = NULL;
ucell valid;
#ifdef CONFIG_LOADER_ELF
@@ -94,7 +94,12 @@
switch (type) {
case 0x0:
/* Start ELF boot image */
- image_retval = start_elf(address, (uint64_t)NULL);
+ image_retval = start_elf(address, (uint64_t)&boot_notes);
+ break;
+
+ case 0x1:
+ /* Start ELF image */
+ image_retval = start_client_image(address, (uint64_t)&sparc64_of_client_interface);
break;
case 0x5:
Modified: trunk/openbios-devel/arch/x86/boot.c
==============================================================================
--- trunk/openbios-devel/arch/x86/boot.c Fri Apr 2 15:29:12 2010 (r727)
+++ trunk/openbios-devel/arch/x86/boot.c Fri Apr 2 16:03:38 2010 (r728)
@@ -19,10 +19,10 @@
#include "boot.h"
struct sys_info sys_info;
+void *boot_notes = NULL;
static int try_path(const char *path, char *param)
{
- void *boot_notes = NULL;
ucell valid;
#ifdef CONFIG_LOADER_ELF
@@ -91,6 +91,11 @@
switch (type) {
case 0x0:
/* Start ELF boot image */
+ image_retval = start_elf(address, (uint32_t)&boot_notes);
+ break;
+
+ case 0x1:
+ /* Start ELF image */
image_retval = start_elf(address, (uint32_t)NULL);
break;
Modified: trunk/openbios-devel/forth/debugging/client.fs
==============================================================================
--- trunk/openbios-devel/forth/debugging/client.fs Fri Apr 2 15:29:12 2010 (r727)
+++ trunk/openbios-devel/forth/debugging/client.fs Fri Apr 2 16:03:38 2010 (r728)
@@ -97,23 +97,17 @@
;
: go ( -- )
- state-valid @ not if exit then
- elf saved-program-state >sps.file-type @ = if
-[IFDEF] CONFIG_PPC
- saved-program-state >sps.entry @ " (go)" evaluate
-[ELSE]
- ." go is not yet implemented"
-[THEN]
+ state-valid @ not if
+ s" No valid state has been set by load or init-program" type cr
+ exit
+ then
+
+ \ Call the architecture-specific code to launch the client image
+ s" (go)" $find if
+ execute
else
- xcoff saved-program-state >sps.file-type @ = if
-[IFDEF] CONFIG_PPC
- saved-program-state >sps.entry @ " (go)" evaluate
-[ELSE]
- ." go is not yet implemented"
-[THEN]
- else
- ." go is not yet implemented"
- then
+ ." go is not yet implemented"
+ 2drop
then
;
More information about the OpenBIOS
mailing list