From 27b207fd0a0941b03f27e2a82c0468b1a090c745 Mon Sep 17 00:00:00 2001 From: wdenk Date: Thu, 24 Jul 2003 23:38:38 +0000 Subject: * 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) --- common/cmd_boot.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'common/cmd_boot.c') diff --git a/common/cmd_boot.c b/common/cmd_boot.c index fe8025d3b..b2f0331dc 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -27,13 +27,15 @@ #include #include #include -#include /* -------------------------------------------------------------------- */ 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; -- cgit v1.2.3