summaryrefslogtreecommitdiff
path: root/common/cmd_boot.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2003-07-24 23:38:38 +0000
committerwdenk <wdenk>2003-07-24 23:38:38 +0000
commit27b207fd0a0941b03f27e2a82c0468b1a090c745 (patch)
tree4d339d7a2a00889f09a876425ce430be57de56e9 /common/cmd_boot.c
parent2535d60277cc295adf75cd5721dcecd840c69a63 (diff)
downloadu-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.zip
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.gz
u-boot-imx-27b207fd0a0941b03f27e2a82c0468b1a090c745.tar.bz2
* Implement new mechanism to export U-Boot's functions to standalone
applications: instead of using (PPC-specific) system calls we now use a jump table; please see doc/README.standalone for details * Patch by Dave Westwood, 24 Jul 2003: added support for Unity OS (a proprietary OS)
Diffstat (limited to 'common/cmd_boot.c')
-rw-r--r--common/cmd_boot.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/common/cmd_boot.c b/common/cmd_boot.c
index fe8025d..b2f0331 100644
--- a/common/cmd_boot.c
+++ b/common/cmd_boot.c
@@ -27,13 +27,15 @@
#include <common.h>
#include <command.h>
#include <net.h>
-#include <syscall.h>
/* -------------------------------------------------------------------- */
int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
+#if defined(CONFIG_I386)
+ DECLARE_GLOBAL_DATA_PTR;
+#endif
ulong addr, rc;
int rcode = 0;
@@ -50,6 +52,13 @@ int do_go (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
* pass address parameter as argv[0] (aka command name),
* and all remaining args
*/
+#if defined(CONFIG_I386)
+ /*
+ * x86 does not use a dedicated register to pass the pointer
+ * to the global_data
+ */
+ argv[0] = (char *)gd;
+#endif
rc = ((ulong (*)(int, char *[]))addr) (--argc, &argv[1]);
if (rc != 0) rcode = 1;